From: Roberto S. <rs...@gm...> - 2006-07-15 17:32:05
|
I didin't found any info in the yaws docu about running multiples yaws behind a loadbalancer in a server farm. For mnesia I think nothing special needs to be done at yaws, just creating the tables as replicated is enough, but please correct me if that is wrong. But what about the yaws HTPP session, which are kept in an ETS tables ? Can / or should that data be replicated among cluster-nodes ? If yes, how ? If no, then probably a loadbalancer with sticky sessions such as http://haproxy.1wt.eu/ (injecting info about the selected cluster node into the HTTP header should be used. Or does anybody have a better suggestion ? regards -- Roberto Saccon |
From: Yariv S. <ya...@gm...> - 2006-07-17 20:06:05
|
I'm not sure about the load balancing, but it sounds like if you want session state to be shared between all Yaws instances, you should put this state in a Mnesia table that can be accessed from all instances. Maybe somebody else has a better idea... On 7/15/06, Roberto Saccon <rs...@gm...> wrote: > I didin't found any info in the yaws docu about running multiples yaws > behind a loadbalancer in a server farm. > > For mnesia I think nothing special needs to be done at yaws, just > creating the tables as replicated is enough, but please correct me if > that is wrong. > > But what about the yaws HTPP session, which are kept in an ETS tables > ? Can / or should that data be replicated among cluster-nodes ? If > yes, how ? If no, then probably a loadbalancer with sticky sessions > such as http://haproxy.1wt.eu/ (injecting info about the selected > cluster node into the HTTP header should be used. Or does anybody have > a better suggestion ? > > regards > -- > Roberto Saccon > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Erlyaws-list mailing list > Erl...@li... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > |
From: Torbjorn T. <to...@to...> - 2006-07-17 20:41:22
|
Idea: If you connect the info: which IP address your interface had where the client first entered your system, to your cookie, then check it and do a HTTP redirect if necessary, etc... Cheers, Tobbe Roberto Saccon wrote: > I didin't found any info in the yaws docu about running multiples yaws > behind a loadbalancer in a server farm. > > For mnesia I think nothing special needs to be done at yaws, just > creating the tables as replicated is enough, but please correct me if > that is wrong. > > But what about the yaws HTPP session, which are kept in an ETS tables > ? Can / or should that data be replicated among cluster-nodes ? If > yes, how ? If no, then probably a loadbalancer with sticky sessions > such as http://haproxy.1wt.eu/ (injecting info about the selected > cluster node into the HTTP header should be used. Or does anybody have > a better suggestion ? > > regards |
From: Alex A. <ale...@gm...> - 2006-07-18 12:32:00
|
I have just started looking into this problem myself. >From a chat with a friend Java expert (yes, Erlang fans are allowed to keep some of those around :) ), it would seem that Java Application Server clusters commonly replicate session IDs and objects between them. So Yariv's suggestion would probably be the closest method. Using a RAM-only mnesia table would be fastest, I guess. On 7/17/06, Torbjorn Tornkvist <to...@to...> wrote: > > > Idea: > If you connect the info: which IP address your interface had > where the client first entered your system, to your cookie, > then check it and do a HTTP redirect if necessary, etc... > > Cheers, Tobbe > > > Roberto Saccon wrote: > > I didin't found any info in the yaws docu about running multiples yaws > > behind a loadbalancer in a server farm. > > > > For mnesia I think nothing special needs to be done at yaws, just > > creating the tables as replicated is enough, but please correct me if > > that is wrong. > > > > But what about the yaws HTPP session, which are kept in an ETS tables > > ? Can / or should that data be replicated among cluster-nodes ? If > > yes, how ? If no, then probably a loadbalancer with sticky sessions > > such as http://haproxy.1wt.eu/ (injecting info about the selected > > cluster node into the HTTP header should be used. Or does anybody have > > a better suggestion ? > > > > regards > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Erlyaws-list mailing list > Erl...@li... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > |
From: Yariv S. <ya...@gm...> - 2006-07-18 13:41:35
|
After thinking about it more, I came at the following two options: - Have a session-aware load balancer that always sends clients to the same web server. This lets you avoid storing session data in Mnesia, but it's also more failure prone because if the web server goes down, the session data is lost. Not exactly ideal. - Use a simple load balancer that round robins requests between web servers, and keep all session data in a replicated Mnesia table. This is a simpler setup in a sense and it's more resilient too. The downside is that the replication may slow things down, but everything has a price :) Yariv On 7/18/06, Alex Arnon <ale...@gm...> wrote: > I have just started looking into this problem myself. > From a chat with a friend Java expert (yes, Erlang fans are allowed to keep > some of those around :) ), it would seem that Java Application Server > clusters commonly replicate session IDs and objects between them. So Yariv's > suggestion would probably be the closest method. Using a RAM-only mnesia > table would be fastest, I guess. > > > > On 7/17/06, Torbjorn Tornkvist <to...@to...> wrote: > > > > Idea: > > If you connect the info: which IP address your interface had > > where the client first entered your system, to your cookie, > > then check it and do a HTTP redirect if necessary, etc... > > > > Cheers, Tobbe > > > > > > Roberto Saccon wrote: > > > I didin't found any info in the yaws docu about running multiples yaws > > > behind a loadbalancer in a server farm. > > > > > > For mnesia I think nothing special needs to be done at yaws, just > > > creating the tables as replicated is enough, but please correct me if > > > that is wrong. > > > > > > But what about the yaws HTPP session, which are kept in an ETS tables > > > ? Can / or should that data be replicated among cluster-nodes ? If > > > yes, how ? If no, then probably a loadbalancer with sticky sessions > > > such as http://haproxy.1wt.eu/ (injecting info about the selected > > > cluster node into the HTTP header should be used. Or does anybody have > > > a better suggestion ? > > > > > > regards > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys -- and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Erlyaws-list mailing list > > Erl...@li... > > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Erlyaws-list mailing list > Erl...@li... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > > > |
From: Roberto S. <rs...@gm...> - 2006-07-18 15:20:51
|
thanks for the inputs. One needs probably also to consider / decide about preference for high availability or high scalability before going any of the routes suggested. I am not there yet anway, still in early development of my web app ... -- Roberto Saccon |