process pools? (for gen_servers)
Wed Oct 10 10:40:31 CEST 2001
Julian Assange writes:
> The context is persistant http connections. Tearing down the socket
> and rebuilding it for each url would be dramatically slower.
We had plenty of similar problems, and we ended up writing a generic
'pool_server' process which masquerades as a gen_server and
load-balances requests to a pool of actual gen_servers.
Incidentally this pool_server is the right place to do things like
load regulation (keeping track of how many requests there are in each
server's queue), failover, static routing, retry-on-failure, etc.
A typical use is to multiplex SQL requests over several persistent
connections to a replicated database (switching to the secondary db
when all primary connections are dead, etc). In another context, the
load regulation stuff helps guarantee some kind of fairness among
several pool_servers which share the same workers.
-- Pascal Brisset <pascal.brisset@REDACTED> +33141986741 --
----- Cellicium | 73 avenue Carnot | 94230 Cachan | France -----
More information about the erlang-questions