Change for standalone in single-threaded mode (i.e concurrency=none)

Skip to first unread message

Jocelyn Fiat

Oct 19, 2017, 5:17:45 AM10/19/17
to Eiffel Web Framework
Hi all,

We revised our position for persistent connection support in single-threaded mode (concurrency=none).
Even if we recommend using concurrency=scoop, one may want to use EiffelWeb standalone without any concurrency.

So now the EiffelWeb standalone supports persistent connections in all concurrency modes (none, thread and scoop).

If ever you were already using standalone connection without concurrency in your project, you may notice delay if you connect with different clients.
Indeed in single threaded mode, when a persistent connection is created, the server will not close it before the keep_alive_timeout delay (by default it is now 5 seconds, before it was 15 seconds).
So unless the client closes the connection itself, between two consecutive persistent connections, the server waits at most keep_alive_timeout.

You can disable persistent connection supports (and have same behavior as before) using
- max_keep_alive_requests=0
Or you can also put a small value for keep_alive_timeout, for instance "1"   (remember that "0" means .. wait for ever).

The motivations for this change (support persistent connection even without concurrency) are:
- previous behavior is still possible by setting max_keep_alive_requests to 0
- reusing the connection will improve performance (mainly with a unique client)
- it enables the use of websocket (with a unique client)

Note it impacts only standalone connector, in single threaded mode. For the thread and the recommended SCOOP concurrency mode, there is no change.

-- Jocelyn for the EiffelWeb team.

Reply all
Reply to author
0 new messages