Your missing a trick here - there is a fork of nginx done by Ezra that includes a fair load balencer.
Google for it and you'll find the link as I don't have it handy - this version would remove the need for your intermediate proxy. Cheers, Tim Sent from my iPhone On 20 Nov 2009, at 06:59, monty chen <montyc...@qq.com> wrote: > Hi,David Pollk! > > Nginx only comes with a round-robin balancer and a hash-based > balancer, so if a request takes a while to load, Nginx will start > routing requests to backends that are already processing requests -- > as > a result, some backends will be queueing up requests while some > backends will remain idle. You will get an uneven load distribution, > and the unevenness will increase with the amount of load subject to > the load-balancer. > > Haproxy as a LB can: > 1: Plenty of load-balancing algorithms, including a "least > connections" strategy that picks the backend with the fewest pending > connections. Which happens to be just what we want. > > 2: Backends can be sanity- and health-checked by URL to avoid routing > requests to brain-damaged backends. (It can even stagger these checks > to avoid spikes.) > > 3: Requests can be routed based on all sorts of things: cookies, URL > substrings, client IP, etc. > > So, I use nginx + haproxy + tomcat(jetty). > > > On 11月20日, 上午11时27分, David Pollak > <feeder.of.the.be...@gmail.com> > wrote: >> I recommend Nginx + Jetty. >> >> Apache is the worst front end for this situation... it can only >> support a >> few hundred simultaneous connections before it falls over. Ngnix >> on the >> other hand can proxy tens of thousands. >> >> Jetty's continuations make it a much better choice than Tomcat. >> You can >> have thousands of open Comet request to a Jetty instance where >> Tomcat is >> capped at a couple of hundred. >> >> Once the Servlet 3.0 spec in implemented in Glassfish, etc., Lift >> will >> support 3.0 continuations and any 3.0 container will have the same >> scaling >> characteristics that Jetty currently does. >> >> >> >> On Thu, Nov 19, 2009 at 5:35 PM, Neil.Lv <anim...@gmail.com> wrote: >>> Hi all, >> >>> I have a silly question about the deploy. >> >>> Which web container is recommended to use to deploy the Lift app ? >>> Jetty or Tomcat ? >> >>> I want to use the Comet to push the data in the app. >> >>> * Apache + Tomcat ? >>> * Apache + what ? >>> * Nginx + what ? >> >>> Thanks for any suggestion ! >> >>> Cheers, >>> Neil >> >>> -- >> >>> 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<liftweb >>> %2bunsubscr...@googlegroups.com> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/liftweb?hl=. >> >> -- >> Lift, the simply functional web frameworkhttp://liftweb.net >> Beginning Scalahttp://www.apress.com/book/view/1430219890 >> Follow me:http://twitter.com/dpp >> Surf the harmonics > > -- > > 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= > . > > > -- 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=.