Possible to load balance across nodejs servers using apache
The use of apache is independt of the server used behind if you use the mod_proxy module. So you can also look at all the apache->tomcat examples using mod_proxy.
After questions how to do it I added the following example:
<VirtualHost *:80> ProxyRequests off ServerName domain.com <Proxy balancer://mycluster> # WebHead1 BalancerMember http://10.176.42.144:80 # WebHead2 BalancerMember http://10.176.42.148:80 # Security "technically we aren't blocking # anyone but this the place to make those # chages Order Deny,Allow Deny from none Allow from all # Load Balancer Settings # We will be configuring a simple Round # Robin style load balancer. This means # that all webheads take an equal share of # of the load. ProxySet lbmethod=byrequests </Proxy> # balancer-manager # This tool is built into the mod_proxy_balancer # module and will allow you to do some simple # modifications to the balanced group via a gui # web interface. <Location /balancer-manager> SetHandler balancer-manager # I recommend locking this one down to your # your office Order deny,allow Allow from all </Location> # Point of Balance # This setting will allow to explicitly name the # the location in the site that we want to be # balanced, in this example we will balance "/" # or everything in the site. ProxyPass /balancer-manager ! ProxyPass / balancer://mycluster/</VirtualHost>
Yes it is possible, if you are asking how to setup Apache Load Balancers, Check this out.
Have you seen node-http-proxy
? Great little walkthrough here not too intimidating if you want to keep it all Node.