Persistent Connections #15

Open
wants to merge 2 commits into
from

Projects

None yet

1 participant

@dergraf
dergraf commented Oct 21, 2011

Basic implementation for persistent connections

The request record now contains the pid of the receive_term process #request.con_pid which allows to report back once the processing is done. After the receive_term function kicked the queue it waits for this signal (#request.con_pid ! done) that the request has been executed and calls itself with an extra receive-timeout parameter (e.g. 10 seconds) preventing socket starvation. From here either a new request is received over the same connection or the receive times out which closes the socket.

This is implemented for call/cast in external and native handlers.

@dergraf dergraf persistent connections
The request record now contains the pid of the receive_term process #request.con_pid which allows to report back once the processing is done. After the receive_term function kicked the queue it waits for this signal (#request.con_pid ! done) that the request has been executed and calls itself with an extra receive-timeout parameter (e.g. 10seconds) preventing socket starvation.
This is implemented for call/cast in external and native handlers.
c9f2bbf
@dergraf

10s seems not a good value for production setups, we should make this configurable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment