lighttpd mod_sockproxy is a transparent socket proxy. For a given $SERVER["socket"] config, connections will be forwarded to backend(s) without any interpretation of the protocol.

mod_sockproxy config options:

sockproxy.server: backend server definition(s) for hosts to which to send requests; options for each backend host. Every file-extension can have its own handler. Load-balancing is done by specifying multiple hosts for the same extension.

sockproxy.debug: debug level (value between 0 and 65535)

sockproxy.balance: might be one of 'fair' (default), 'hash', 'round-robin' or 'sticky'.

'fair' or 'least-connection' is the normal load-based, passive balancing.

'round-robin' chooses another host for each request.

'hash' is generating a hash over the request-uri and makes sure that the same request URI is sent to always the same host. That can increase the performance of the backend servers a lot due to higher cache-locality.

'sticky' (since 1.4.44) sends requests from the same (client) IP to the same backend.