[erlang-questions] How to cluster mochiweb?

Bob Ippolito bob@REDACTED
Fri Aug 22 19:39:26 CEST 2008


There isn't really any reason to cluster mochiweb (or any other HTTP
server). If you need to share session state amongst a couple machines
the web servers don't need to talk to each other, you just need a
distributed session store (e.g. mnesia).

When you do load balancing/failover the HTTP servers don't need to
talk to each other. Whatever is doing the load balancing normally does
its own polling to see which servers are alive and send requests to
only those.

On Fri, Aug 22, 2008 at 7:24 AM, Bharani <bharani_vms@REDACTED> wrote:
>
> I have come across gen_server_cluster in the cookbook. Is that the way to
> cluster mochiweb as well?
> The way i think i "could" work is that
> 1) Start a global mochiweb that listens on the port X which is visible to
> the client
> 2) Start other mochiweb instances but they run as local server on different
> random port
> 3) If the global server dies then one of the local server becomes global and
> binds on the port X -- not sure how this is going to work though
>
> Have any one clustered http servers with session replication? (Although i
> prefer to avoid sessions as much as possible - some time it is just too
> natural to have it )
>
> Thanks
> Bharani
> --
> View this message in context: http://www.nabble.com/How-to-cluster-mochiweb--tp19108320p19108320.html
> Sent from the Erlang Questions mailing list archive at Nabble.com.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list