Network backends
Prosody ships with several alternative modules for keeping track of network connections, reading incoming data when available and sending outgoing data when appropriate.
select
The default network backend is called net.server_select
. It needs only LuaSocket to work. It uses the select()
system call, is suitable for smaller servers. It has bad scaling properties and a limit of 1024 connections.
Since this is the default, no configuration is required to use it. If you enjoy explicit configuration, you can add the following in the global section of the config:
= "select" network_backend
libevent
The first alternative network backend, net.server_event
introduced with Prosody 0.7 uses the luaevent binding of the libevent event notification library to handle connections.
See documentation on using Prosody with libevent.
To use this backend, add the following in the global section of the config:
= "event" network_backend
epoll
First available in Prosody 0.11, net.server_epoll
uses the included util.poll
library to keep track of connections. It has been written from scratch to be easier to maintain, without having external dependencies. Despite the name it is not bound to the Linux epoll
API, but uses an abstraction that can also use the POSIX poll
1 or the select()
APIs.
To use this backend, add the following in the global section of the config:
= "epoll" network_backend
recent addition in trunk↩︎