[erlang-questions] What is the right way to update cowboy dispatch rules on-fly?
Loïc Hoguin
essen@REDACTED
Mon Sep 3 21:41:18 CEST 2012
On 09/03/2012 09:34 PM, Max Lapshin wrote:
> I see the problem: you don't use undocumented call
> prim_inet:async_accept and thus you can't catch message in
> acceptor, that something has changed.
>
> It really cannot be changed, unless proper undocumented feature is used here =(
The code in Ranch has async accept through a documented method. So the
protocol options upgrade is more instantaneous there (as opposed to "the
connection after next"). Cowboy will be able to make use of that soon.
But that doesn't really change anything about currently running requests
which still use the old options. It shouldn't give you any problem
unless you use release upgrades and API/data changed though. Old options
and new options can run side-by-side without issue.
I'm not sure what you are doing, especially since you said it requires
restarting Cowboy? I'll need more details to be able to help you. What
are you trying to do?
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
More information about the erlang-questions
mailing list