Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Configuration > listener

listener

Anvil server has a simple yet effective HTTP/1.1 listener. It supports thread-pooling and persistent connections. While not recommended for production sites, it is extremely useful for development purposes. Listeners serve requests under the server, domain, or zone that they are plugged into, so you can even have a dedicated listener for each directory (although on different ports).

Attributes
name default description
port 8080 Port of service. Note that on *NIX, you need to be root to get a port number under 1024.
backlog 4 Server socket's backlog capacity. The default setting should go nicely here.
timeout 60 Timeout value for read and write operations. This value should be less than 60 seconds.
keepalive 4 Timeout value (in seconds) to wait between persistent HTTP connections. Zero indicates no persistent connections. This value should be less than 10 seconds.
maxthreads 10 Maximum number of threads. The number of client threads will not exceed this number. If this limit is reached, clients wait in a queue and get served when threads become available.
maxclients 10 Maximum number of clients. If all threads are used up to maxclients - maxthreads, incoming connections are still added to the service queue. If this figure is exceeded, incoming clients will get "403 service unavailable" errors.

Example:
  listener:
    port = 8080
    timeout = 30
    keepalive = 6
    maxthreads = 10
    maxclients = 30
  end
See also  | Configuration  | Installation  | Anvil features
Contributes notes:
Add a note
What's new | Anvil