FORWARDThe version after 1.0 will support lua and ini configure language. You can select which you like. If you select ini, you don't need to install extra lib, because dolphin has integrated iniparser internal. But you have to install lua5.1 lib, if you select lua. INI NOTESExampleIt looks like very cool. HAHA!!! [server]
port = 80
bind_addr4 = "0.0.0.0"
max_size_in_shm = "128m"
max_size_in_mem = "128m"
worker = 4
objects = 12582910
debug_mode = 0
debug_level = 1
max_object_size_in_mem = "8k"
maxfds = 204800
[cache_dir]
dir1 = "/var/cache 500G"
dir2 = "/var/cache1 100G"
[timeout]
client_life = "1d"
server_life = "1d"
request = 60
reply = 60
connect = 60 Description- server
Some settings about dolphin runtime.
- port
Dolphin listen on the port which is you configured. Default value is 80.
Its type is integer.
- bind_addr4
The ipv4 socket address where dolphin will listen for HTTP client request.
Now you may specify only one address. Default is 0.0.0.0 . Its type is
string.
- max_size_in_shm
The space of /dev/shm used to store some hot content. Its type is integer or
string. If the value is string, support keywords k/K, m/M, g/G at the end. For
example, "500M" and so on.
- max_size_in_mem
The space of user process memory used to store some hot content. Its type is
integer or string. If the value is string, support keywords k/K, m/M, g/G at
the end. For example, "500M" and so on.
- worker
You can configure worker thread number include main thread. The type is integer.
- objects
How many objects will be stored? Hash table length is decided by objects. The
type is integer.
- debug_mode
Some useful information about dolphin will be printed out in the dolphin.debug.log,
if debug_mode is true. The type is integer. 1 represent true, 0 represent false.
- debug_level
The level is more big, more debug information out. The type is integer.
- max_object_size_in_mem
How much memory can be used to store a object? You can write its value
like max_size_in_shm.
- maxfds
The parameter specifies maximun open files. Default is 204800. The type is integer.
- cache_dir
Information about cache dir. I advise you configure it, else dolphin use /var/cache
as cache dir, maximum size is 2 G.
Of course, you can specify multiple cache dir to spread cache among different
disk partitions.
The configure value must be seperated by space. For example, dir1="/var/cache 100".
Meanwhile you can use any string as key.
- timeout
All life about connection is configured here.
- client_life
The life of client connection live in dolphin. Default is 1 day. The type is string
or integer. If the value is string, support h(hour), m(minute), d(day) at the end.
- server_life
The life of server connection live in dolphin. Default is 1 day. You can write its
value like client_life.
- request
The parameter specifies how long to wait for HTTP client request. Default is 60
secondes. You can write its value like client_life.
- reply
The parameter specifies how long to wait for the server response. Default is 60
secondes. You can write its value like client_life.
- connect
The parameter specifies how long to wait for the TCP connect to the original server.
Default is 60 secondes. You can write its value like client_life.
LUA NOTESExampleDescription
|