Howtos / Articles

Load Balancing with Nginx

Nginx is a high performance web server, which can also act as a great reverse proxy. Reverse proxy’s are placed in front of the web server handling the processing, to speed the site up, by either caching data, and/or load balancing across multiple back-end web servers. This howto will outline the steps required to set up Nginx as a load balancing reverse proxy.…

Read more [...]

Sticky Session Load Balancing with HAProxy

HAProxy provides a number of methods for maintaining a record of which backend server should handle a specific connection. This is known as creating a ‘sticky’ connection (other terms for this are ‘connection persistence’ and ‘connection affinity’). HAProxy can use the source ip address, url hash, cookies, sessions (checks cookies and url parameter), headers, and more, to determine which backend server to pass the connection to. Add one of the following lines to the HAProxy config file, in the section…

Read more [...]

Installing HAProxy on CentOS 6

This guide will step you through the process of installing HAProxy on CentOS 6. To install HAProxy on CentOS 6 you first need to set up your installation to use the epel software repository. HAProxy is not available in the default CentOS repositories. (Note: All commands below require root privileges.) rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm You can now install haproxy. yum -y install haproxy Now that HAProxy is installed, you can configure the haproxy.cfg file. vi /etc/haproxy/haproxy.cfg Once you have configured HAProxy,…

Read more [...]

Viewing HAProxy Statistics

HAProxy is a very capable load balance, but unless you set up the statistics site, you wont easily be able to view the statistics, and in later versions, take down, and bring up back end servers. This is a great feature that allows you to take one of your back end servers offline without shutting down the back end server, or changing any config files. Simply turning off the back end server would do the trick, but sometimes you may…

Read more [...]

Reload HAProxy Config with Minimal Downtime

Restarting HAProxy using the default init scripts will kill any existing connections, and prevent any new connections while it restarts. With the init script restart method (eg ‘/etc/init.d/haproxy restart’), if there are any configuration errors, the service wont start up again. This might be fine for low volume sites, but if you are dealing with heavy traffic, you would want to reload the configuration with the smallest amount of downtime possible. Thankfully HAProxy provides the ability to do this. The…

Read more [...]



Page 1 of 212