Forum OpenACS Q&A: Load balancing with NGINX

Collapse
Posted by Malte Sussdorff on
I have written up a document on how to do load balancing with NGINX instead of pound and what you need to remember when running it before an OpenACS site.

Could those few of us who run a load balanced site please chime in and tell me what else we need to think about for the load balanced OpenACS solution?

http://cognovis.de/developer/en/nginx-loadbalancing

Collapse
Posted by Jose Agustin Lopez Bueno on
Hi, Malte!

Could you, please, tell me what are the differences between
pound and nginx?

Regards,
Agustin

Collapse
Posted by Malte Sussdorff on
I would love to, but I can't because that would imply that I had knowledge of POUND.

NGINX was chosen by me because I heard a lot of good things and the documentation for what I needed was easy to understand (I needed the ability to run multiple site behind one IP address, based on host name). From there on I explored more of it's capabilities (run static files from its own directory, act as a reverse proxy to shape traffic, act as a real load balancer, cache images on the harddisk) and with each single step the conf files grew a little bit but are still easy to understand.

Good things I heard: It is blazingly fast and does not harm the resources. It also doubles as an IMAP proxy and has FastCGI support built in. I can verify the blazingly fast. It serves 10 pages per second as a load balancer with cache on a Pentium 4 with 2GB of Ram and the load seldomly gets beyond 0.05, not to mention that pages come up much faster than with just one AOLserver.

Collapse
Posted by Jose Agustin Lopez Bueno on
Hi again!

Thanks for the info.

I am reading the NGINX docs and it appears more
powerfull than Pound.

In our cluster, we send the static files with apache.
The equation could be:
nginx + aolserver = pound + apache + aolserver

Is it stable nginx? Pound is working very stable
in our installation.

Please, could you send your conf file?

Regards,
Agustin

Collapse
Posted by Claudio Pasolini on
Hi Malte,

the link to nginx-loadbalancing is broken.

Could you kindly repair it or send me a copy?

TIA

Claudio Pasolini

Collapse
Posted by Malte Sussdorff on
Use http://sussdorff.de/node/56 for the time being
Collapse
Posted by Richard Hamilton on
From what I understand, Pound is a load-balancing tool whilst Nginx is in fact a fully featured web server in its own right.

Nginx therefore addresses a much larger problem set than Pound whilst still proving extremely efficient and 'easy-to-configure' reverse-proxy and load sharing capabilities.

Nginx seems to be particularly well suited to acting as a front-end dispatcher, serving static resources itself and handing off other requests to other webservers behind the scenes. So if you have a whole load of different technologies in action (e.g. some OpenACS services, perhaps a PHP service and some other CGI based content), Nginx can serve the static resources immediately, and can reverse-proxy the other requests to the various backend webservers. This can be done whilst preserving the integrity of your access logs.

Furthermore, Nginx can be configured to handle the ssl element of https transactions so that you can have a single certificate providing encrypted access to several backend servers without having to configure an https listener on each one.

Just a few of my first thoughts.

Hope it helps
R.

Collapse
Posted by Malte Sussdorff on
We use nginx to do the following:

Serve Drupal sites using php-fastcgi
Serve OpenAcs sites using DNS based forwarding
Serve content repository files as static files when accessed through acs-subsite
Serve static pages

And load balancing was one of the use cases which we don't need anymore.