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:

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:

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. Internally the epoll Linux API is used. If used on operating systems other than Linux it it uses select() like the select backend, with the same limitations.

To use this backend, add the following in the global section of the config: