

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
11 messages in ru.sysoev.nginxRe: HAProxy, NGINX and Rails anyone?| From | Sent On | Attachments |
|---|---|---|
| Redd Vinylene | Jul 30, 2008 1:46 pm | |
| Igor Sysoev | Jul 30, 2008 2:07 pm | |
| mike | Jul 30, 2008 2:15 pm | |
| Almir Karic | Jul 30, 2008 10:14 pm | |
| Brian Gupta | Jul 31, 2008 12:19 am | |
| István Szukács | Jul 31, 2008 5:44 am | |
| Willy Tarreau | Jul 31, 2008 3:04 pm | |
| Brian Gupta | Aug 1, 2008 8:43 am | |
| Barry Abrahamson | Aug 1, 2008 8:58 am | |
| Willy Tarreau | Aug 1, 2008 9:00 am | |
| Jon Singler | Aug 1, 2008 12:52 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: HAProxy, NGINX and Rails anyone? | Actions... |
|---|---|---|
| From: | Igor Sysoev (is-G...@public.gmane.org) | |
| Date: | Jul 30, 2008 2:07:04 pm | |
| List: | ru.sysoev.nginx | |
On Wed, Jul 30, 2008 at 10:46:41PM +0200, Redd Vinylene wrote:
Is there any chance nginx' load balancing will ever be as good as haproxy?
There is third-party module: http://wiki.codemongers.com/NginxHttpUpstreamFairModule
And I'm going to improve nginx load balancing.
On Wed, Jul 30, 2008 at 7:19 PM, Brian Gupta
<bria...@public.gmane.org> wrote:
On Mon, Jul 28, 2008 at 8:57 AM, Patrick Viet
<patr...@public.gmane.org> wrote:
Yes : don't use haproxy. Why would you want to use haproxy over nginx when nginx can already do your balancing ? Sure, haproxy is a little faster than nginx, but if nginx is there anyway, just use it. That will definitely be lighter.
Nginx's load balancing algorithm's is fairly simplistic. If you are going to be seeing any sort of sustained traffic, and are running with more than 2 or three backend mongrels, Rails can really benefit from haproxy's ability to limit connections to a single connection per back end rails/mongrel instance. (Fro those that don't know each backend Rails instance is a single threaded app. So they can only handle one web request at at time. If more are sent the go into a block IO wait state.)
Where this really helps is when a web request that initiates a 10-30 second database query. The slow web request isn't gonna stall any other web traffic as haproxy won't send any additional traffic to that webserver instance until that request either times out or is fulfilled.
In addition for those cases when you have bursts of traffic that temporarily overwhelm your backend, Haproxy queues those overflow connections on the front end and then drains them off to the backend mongrels in the most efficient and expedient manner. (So the end user experience is the best).
That all said, I still run with nginx in front of haproxy to intercept statics, and do SSL offload.
Cheers, Brian
P.S. - It all really depends. You might want to start with just haproxy, if it is a small internal site, but if you plan to see any level of internet scale traffic, you are really gonna want to add haproxy into the mix.
Patrick
On Mon, Jul 28, 2008 at 2:21 PM, Redd Vinylene
<redd...@public.gmane.org>
wrote:
Hi there!
I'm working on my first HAProxy, NGINX and Rails setup, and I was wondering if anybody could help me improve my configuration:
I wish to keep things as simple as possible, but from what I hear, I'm lacking quite a few "exciting" options ;)
-- Redd Vinylene http://www.home.no/reddvinylene
-- - Brian Gupta
http://opensolaris.org/os/project/nycosug/
http://www.genunix.org/wiki/index.php/OpenSolaris_New_User_FAQ
-- Igor Sysoev http://sysoev.ru/en/







