-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow working without cowboy_listener #188
Comments
We implemented this in cowboy_acceptor.erl in nivertech@9e087b8 |
Hi! I've toyed with the idea of separating the protocol options upgrades and connection limiting in https://github.com/klaar/cowboy/compare/pool-monitors Both me and @essen agree that a replacement for |
To be clear, the main issue with the current |
Thanks for the links. It'll take a while to review and discuss all this though. |
I have done an experimental branch of a modification I've been wanting to do for a long time. Using async acceptors we do not need a call anymore, it can all be cast, and the listener can have greater control over the acceptors by sending messages directly to them. https://github.com/essen/cowboy/tree/async-accept In your case though, you probably want to disable the listener process entirely, in which case I'd just recommend to maintain a fork with the few direct calls removed. You're a very special case on that one so I'm not sure it really warrants adding and supporting another option. I'm not convinced either way yet though. |
Ok, lets try to summarize my main reservations against including the current version of the async-accept branch. I produced a small wall of text on IRC, but it's good to have a copy here as well. Let's keep it brief. The
Starting the connection handling process before a connection has been accepted also breaks the current behavior of the |
To be continued in Ranch! Thanks. ninenines/ranch#6 |
It seems like cowboy_listener offers two features:
Is it possible to add a flag to cowboy that allows disabling usage of cowboy_listener in cowboy_acceptor, as losing the two features above might be worth not having all acceptors doing gen_server calls to the cowboy_listener singletons. Note that it may possible to approximate max connection limit by enforcing it per acceptor instead.
@nivertech
The text was updated successfully, but these errors were encountered: