1

I'm setting up HTTP load balancers for Tomcat servers. I'm looking at a few different VPS plans that the load balancer will run on. I assume the load balancer would use very small amounts of traffic? If a website gets about 4 Million visits a month, how much bandwidth can I expect the load balancer to use?

david
  • 123
  • 5

3 Answers3

2

Depends on the size of the request, whether direct server return is in use, and a dozen other variables.

Do capacity planning yourself. Observe your real traffic to get an idea of request size, and multiply it by your number of requests estimate. Have a procedure to upgrade capacity or switch providers, if you exceed your provider's limits or your budget.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32
1

Actually load balancer will probably consume most of your traffic in the system.

Martynas Saint
  • 1,211
  • 7
  • 15
1

Like others have mentioned. It depends. Since you specifically mention HTTP load balancing then the load balancer will serve 100% of those 4 million visits.

How much bandwith is 4 million visits? You need to measure yourself from your own code. But let's try to do some back-of-the-envelope calculations:

What is a visit? Is it a "hit" or a "unique visit"?

  • If it's a hit then it's simple. We just use the 4 million number as the number of requests.

  • If it's a unique visit then how I do it is take an average experience to do the main task of the website (for example to book a place for Airbnb, to book a ride for Uber etc.). Let's say user go to landing page -> search result -> browse a couple of pages -> select item -> book item -- that's 5 pages. So the number of requests is 4 million * 5 = 20 million requests.

Now you need to guesstimate how big each page is. Most of the projects I work with average around 1MB per page so let's go with that. Assuming an average page size of 1MB (including all ajax requests, images etc) the estimated outgoing bandwidth is:

1MB * 20 million = 20 Terabytes per month

Which is a very, very busy site. That's almost Google's search bandwidth usage per year as estimated at around 2009 (around 24TB / year).

OK. Let's say the 4 million is "hits":

1MB * 4 million = 4 Terabytes per month

Still a very respectable web service. I don't know.. probably on the scale of Twitter?

Let's say your service is more like Twitter where you send mostly small packets. Let's assume around 4k per request on average:

4kB * 4 million = 16 Gigabytes per month

Now it's starting to look reasonable.

I hope you get the general idea of how to guesstimate these things but you only really know the answer once you get your service up and running.

slebetman
  • 163
  • 6
  • Note: I've worked for very successful and profitable web services that can only manage around 10 requests / second max. So you don't really need a lot of bandwidth to run a typical web service like JIRA or Github – slebetman May 15 '19 at 03:46