5

There is a Caching Server (Varnish): it receives data from Amazon S3 on request, saves it for some time and gives it to the client. We have encountered the problem of insufficient channel capacity of 1GBit. Peak load within 4 hours completely chokes the channel. Server performance is sufficient for now. Approximately 4.5TB of data are transmitted per day. More than 100TB are accumulated per month.

The first thought that comes to mind is simply to add one more 1GBit port and sleep peacefully until 2GBit are not enough (it may happen quite quickly) or one server is not able to handle it.

And then we just need to add new Caching Servers. But now we need a Load Balancer, which will send requests on one and the same URL, always on one and the same server (to avoid multiple copies of the same cached objects).

Here are the questions:

  1. Does a Balancer need a band equal to sum of all bands of Caching Servers? What shall we do in case there are no ports in a Balancer? Should we add more Balancers or solve the problem by means of Round robin DNS?
  2. What are the standard approaches to such problems?
  3. Can anyone advise hosting-companies, which can solve this problem? We are interested in American and European markets.

2 Answers2

2

Does a Balancer need a band equal to sum of all bands of Caching Servers? What shall we do in case there are no ports in a Balancer?

Yes. Add bigger pipes or use CDN geographical load balancing.

Should we add more Balancers or solve the problem by means of Round robin DNS?

This is actually the same solution. You add more balancers and insert them in round robin DNS. Or as I said before, the smarter alternative is to use geographical load balancing.

What are the standard approaches to such problems?

Use a DNS that will answer with the closest server to the user and put such servers around the world. This has other advantages such as giving a low-latency experience to your users.

Can anyone advise hosting-companies, which can solve this problem? We are interested in American and European markets.

For geographical DNS load balancing, you should google it. You will need higher-end DNS service but you should be able to find it. In Europe, you should definitely have a look at OVH which has a really big network and can supply you with multi-gigabit bandwidth. For the US, I don't know.

Antoine Benkemoun
  • 7,314
  • 3
  • 41
  • 60
1

Yes, the load balancer should be able to handle all the accumulated traffic from/to all servers. So, I would recommend using a load balancer with one uplink of 10Gb and other 1Gb ports connected to several caching servers. A hardware load balancer can be more efficient to handle such huge traffic.

Your limit will be 10Gb as a maximum assuming the load balancer is able to handle all traffic without problems.

The load balancer can also check the servers health before directing a request to any server which provider higher availability.

A suitable load balancing algorithm has to be chosen to avoid caching duplicate and to present the right data to the right user.

Khaled
  • 35,688
  • 8
  • 69
  • 98