I'm not sure if you discussed this but based on my experience, the JSESSIONID cookie is used most often in Jetty/Tomcat/J2EE environments for load balancing (over using client IP).
I haven't used nginx for load balancing yet but I've used both HAProxy and Varnish in the past. http://haproxy.1wt.eu/download/1.2/doc/architecture.txt alex On Wed, Jan 13, 2010 at 4:22 AM, Timothy Perrett <[email protected]>wrote: > To follow up this thread for completeness, I communicated to Marius that he > needs to use: > > http://wiki.nginx.org/NginxHttpUpstreamRequestHashModule > > Which should do what he wants. > > Cheers, Tim > > On 13 Jan 2010, at 12:02, Marius wrote: > > > > > > > On Jan 13, 1:42 pm, Timothy Perrett <[email protected]> wrote: > >> Nginx offers weighted round robin requests if memory serves... what does > your config look like? The upstream module should be cool for what you want. > >> > >> http://wiki.nginx.org/NginxHttpUpstreamModule > >> > >> See that it uses class-c ip hashing to always distribute requests to the > same backend node... making the query string redundant :-) > > > > I'm not sure about that. The flow I have is this: > > > > 1. client sends a login request with not server_id info. > > 2. LB needs to dispatch to any node > > 3. The node that responds back is setting the server_id information in > > the HTTP response header (based on config files info from each node) > > 4. The next subsequent requests for this session will also include the > > server_id information received and here is the balancing rules I > > need. > > > > I'm not sure I should use client's IP address because clients may be > > behind NATs etc. and this may unbalance the cluster. > > > > Currently I have no config, so I'm still not sure how to config my > > case described here. > > > >> > >> Cheers, Tim > >> > >> On 13 Jan 2010, at 11:29, Marius wrote: > >> > >>> Hi all, > >> > >>> Did anyone here used nginx with sticky sessions? What I'm looking for > >>> is: > >> > >>> if a request comes in with e certain HTTP header or query string > >>> paramers the request should be dispatched to a given node. So I have a > >>> header like server_id=1 -> dispatch the request to node1, if > >>> server_id=2 dispatch the request to node2 and so on. > >> > >>> Is it possible to configure nginx like this? > >> > >>> Br's, > >>> Marius > >>> -- > >>> You received this message because you are subscribed to the Google > Groups "Lift" group. > >>> To post to this group, send email to [email protected]. > >>> To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > >>> For more options, visit this group athttp:// > groups.google.com/group/liftweb?hl=en. > > -- > > You received this message because you are subscribed to the Google Groups > "Lift" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > >--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
