Wednesday, June 26, 2013

nginx

engine x is a HTTP/Web Server / reverse proxy and IMAP/POP3 reverse proxy.
A reverse proxy is a front end to to Web servers. Connections from Internet come via reverse proxy to the web server. So reverse proxy can act as a load balancer.

Architecture: Layer approach.
Layer 1: High Availability nginx reverse proxy for load balance the Web servers located in Layer 2.
Layer 2: nginx that server web sites.We can add more web servers to the cluster as per need (scalability depends on load)
Layer 3: Database servers

Install nginx:
#apt-get install nginx

Configure nginx on Web servers (Layer 2).
Copy original nginx.conf file.And modify nginx.conf.as per needs. Put a Hello World HTML file in root dir.
Then test the nginx configuration and start it.
#nginx -t
#invoke-rc.d nginx start

Configure the reverse proxy (Layer 1).
Open /etc/sites-available/rev-proxy-lb file.
The upstream directive is in the nginx_http_upstream module that balances load. It uses RR load-balance algo.

Bottleneck:
Active-passive clustering between two nginx reverse proxy servers is needed.






No comments:

Post a Comment