1

Say that i have a server that has 1Gbit bandwidth and i serve static files.Does adding another identical server and using a load balancer(running on the first server perhaps)double the bandwidth?Or since it's routed from the first server,it maxes out at 1Gbit?If that's the case how could i increase available bandwidth of a server running on a cloud provider?

Best Regards,

Alex

2 Answers 2

2

Assuming your load balancer (wherever it is placed) and servers are all 1 Gbit then the maximum throughput can only ever be 1 Gbit, since everything is served through the load balancer.

The load balancer, if separate from both servers, is providing failover and dividing the processing load between the servers (which for serving static files would be minimal).

In order to increase the bandwidth outbound (note, not to a single client), one would need to use something like a DNS based solution that resolved the one host name for the static assets to the two different servers. This would not provide more than 1 Gbit bandwidth to a single client, however would allow saturation of both 1 Gbit servers at full load when at least one client was connected to each. If you're doing it yourself it's more complicated to have failover since you need to remove a DNS entry if a server is down.

This is how Content Delivery Networks (CDNs) like Akamai / AWS CloudFront / many others work and what they excel at, especially when serving static content as in this use case. Dynamic and transactional content is another conversation.

If you did want to implement the DNS solution with failover yourself then you're basically building your own tiny CDN. You could roll your own or there are also DNS hosting providers who can do this as part of their service.

2
  • Something like round-robin DNS?digitalocean.com/community/tutorials/… or using cloudflare as my dns which does automatic round-robin if you add more than one A record.It's either that or upgrading my NIC card? Commented Apr 27, 2020 at 18:54
  • Yep round-robin DNS would work for simple load balancing resulting in both servers being able to theoretically max out their bandwidth. Upgrading your NIC will give more bandwidth, but everything is still going through a single server so you're still not using your total available bandwidth. A reminder also that simple DNS round-robin will not account for a server being down so provides rudimentary availability benefits. Commented Apr 28, 2020 at 18:09
0

With the example you're providing, no, you would not see any bandwidth increase. Your inbound traffic will be routed through your load balancer (assuming 1Gbit NIC) and be split across both member servers, each getting ~500MB/s or so of traffic at most.

You'll need to increase capacity on your gateway NIC before you see any increase.

6
  • If i am running a VPS and i don't have that ability what other options do i have?If i have two servers running on 1Gbit each and the provider has hundreds of Gigabits output,isn't there a way to leverage that? Commented Apr 27, 2020 at 17:17
  • That's something you'll need to speak to them about. You can set up the servers to serve different content, but if you're wanting requests to go to one url/resource that they're both serving, you'll need some type of traffic manager to handle which server is tasked with which request, which is what creates your bottleneck. What kind of static content are you serving? If this is a simple webserver your bottleneck is likely not your uplink capacity Commented Apr 27, 2020 at 17:22
  • I am serving images.I have not hit any bottleneck of my uplink bandwidth.It's more of academic question,should i require the knowledge in the future. Commented Apr 27, 2020 at 19:03
  • The way that I suspect you're set up with, there's no feasible way to have more than 1Gbit of capacity. Your bottleneck is going to be your VPS provider's uplink. If you have a second VPS (second server you mentioned), it would technically be possible to set up some kind of round robin DNS/CDN with each individual link for 2Gbit, but that has it's own technical challenges that aren't likely to be small ones. Commented Apr 27, 2020 at 19:09
  • Even using Hetzner's dedicated server offering they only offer 1Gbit port.So,my options are either go to another company that let's me upgrade the network card,go to a company that offers a load balancer, use the round robin DNS we discussed or set up a server in a colocation datacenter.Did i get this right? Commented Apr 27, 2020 at 19:37

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.