[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1153
  • Last Modified:

Load balancing web servers

I know next to nothing about load balancing web servers.
I am trying to distribute load of a web app across multiple servers in multiple locations.

Because of the nature of the web app it has to be on a dedicated server (or virtual instance).
It can't be on shared hosting.

My thought is to have one central web server on Amazon EC2 that does nothing but load balancing and then sends the request to one of the multiple servers.

I can't afford to have all the servers at Amazon so I am trying to take advantage of multiple office locations where I can host the web servers at minimal cost.  All web servers would contain same information sync'd up nightly so it wouldn't matter which server a user was directed to.

Does this sound like a potential solution?
If not, can someone suggest a better alternative that would still be cost effective.


2 Solutions

i once tried to configure a simple webserver loadbalancing...
Have a look on this page... Maybe it is what you are looking for...

this is great idea.
You can't use the Amazon load balancer because your servers are not in EC2. so you will we using a software LB like Apache httpd, or nginx or HAproxy (there are also other open source and lots of commercial ).
I used apache and HAProxy and both are solid solutions.

Another option is to use DNS round robin. A simple DNS round robin setup can probably be had at your current DNS service for free.
A more complex DNS load balancer, with weights and geolocation, and with a heartbeat test, is provided as a service by companies like UltraDNS. I used  their service in a previous incarnation and they are expensive but do deliver.

Costs for our server in amazon include cpu costs and traffic costs. Storage cost is negligent in your case, unless you decide to store the http logs.

You will pay for traffic 2X the amount coming into the web site and going out of it.
Depending on your site's popularity, you may need a server with lots of memory which also can be pretty costly.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now