Age | Commit message (Collapse) | Author |
|
Also update the CHANGELOG and copyright years.
|
|
Otherwise acceptors will not be upgraded properly until after the
next request comes in.
Thanks to DeadZen for pointing it out.
|
|
This allows any application to upgrade the protocol options without
having to restart the listener. This is most useful to update the
dispatch list of HTTP servers, for example.
The upgrade is done at the acceptor level, meaning only new connections
receive the new protocol options.
|
|
This is a big change in the internal cowboy API. This should not
have any impact on existing applications as only the acceptor is
expected to use these API calls.
The function cowboy_listener:wait/3 has been removed. max_connections
checking now occurs directly in cowboy_listener:add_connection/3.
If the pool is full and the acceptor has to wait, then it doesn't
return, waiting for a free space to be available.
To accomodate these changes, it is now cowboy_listener that will
inform the new connection that it is ready by sending {shoot, self()}.
This should be a great improvement to the latency of responses as
there is one less message to wait for before the request process
can do its work.
Overall the performance under heavy load should also be improved as
we greatly reduce the number of messages sent between the acceptor
and the listener process.
|
|
|
|
Also sends a message 'shoot' that can be received by the protocol
to make sure Cowboy has had enough time to fully initialize the
socket. This message should be received before any socket-related
operations are performed.
WebSocket request connections are now moved from the pool 'default'
to the pool 'websocket', meaning we can have a lot of running
WebSockets despite having a low 'max_connections' setting.
|
|
Currently only supports limiting the maximum number of
connections by managing connection pools.
|
|
This is probably not perfect yet but it should be better than
nothing. We'll improve things with feedback received from the
many users.
|
|
Following discussions on #erlounge.
Also fixes compilation in R14B03 and fixes a few underspecs
dialyzer warnings.
|
|
Limits the number of parallel requests processed at once.
Waiting requests are kept in the accept queue.
The limit is not explicitly observed, but it should be
around the given value at any time. Defaults to 1024.
Thanks to ostinelli's benchmark to point out the issue hopefully
solved by this and the previous commit.
|
|
|
|
|
|
Thought it was already there, but I guess not. Anyway it's here now
so everything is back to normal. ;)
|
|
* Cowboy isn't an OTP application anymore; just a supervisor.
* All processes started by Cowboy are now anonymous.
* All processes related to a listener are now part of its supervision tree.
|
|
Crashes can happen if we close the connection too fast, leading to
controlling_process returning {error, closed} instead of ok. This can
happen when we receive bad requests, reply with 404 Not Found and more.
Simply do not match the return value of controlling_process to avoid this.
|
|
|