Showing posts with label Load Balancing. Show all posts
Showing posts with label Load Balancing. Show all posts

HAProxy (High Availability Proxy)

HAProxy(High Availability Proxy) is an open source load balancer which can load balance any TCP service. It is particularly suited for HTTP load balancing as it supports session persistence and layer 7 processing.





HA Proxy Setup  :

I was working with Apache Webserver from very long but when I jumped into the world of NodeJS I started loving websockets. Soon I was planning to integrate my PHP applications with NodeJS. I was happy to use both, till I was not running both the applications on default web service port 80. But when I tried to configure Apache virtual hosting for proxying my request to NodeJS server port, it was not allowing my websocket communication to happen. I tried alot of modules but didn’t got success. And after alot of googling I found something which helped me to achieve what I need. Once I configured HAProxy on my system I was able to serve both applications, PHP and NodeJS through port 80 just by virtual hosting of HAProxy.