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 <timo...@getintheloop.eu> 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 lift...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> liftweb+unsubscr...@googlegroups.com. >>> 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 lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com. > 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 lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.