0

I currently have a website that is used globally around the world with around 7000 users. I do host my website on a VPS on https://www.netcup.de - now for users outside Germany, like people in Brazil or so, this causes higher latency. I wonder what I can make to reduce this latency.

First, I thought maybe I could use a "cloud hosting" on AWS, DigitalOcean, Azura, etc. So I tried out DigitalOcean, and I realized if I create a "node" I have to pick a location.

I guess "cloud hosting" means you still have a VPS, but its not a limited resource from one PC, but instead from a collection of PCs. And you have to pick the location where the bunch of PCs is stored, is that correct? So the advantage of "cloud hosting" would only come, if I do horizontal scaling, create multiple VPS in different countries and put a load balancer behind it, and also do database-read-replicas in those countries? If I simply switch from netcup to a single VPS in Germany on DigitalOcean, I would probably not improve the global latency a lot, correct?

3
  • Yeah, It Does. I have started using cloud hosting a few days ago. The page speed was amazing. May 20 at 7:39
  • 2
    If you're interested in reducing latency to different geographical locations, then you probably want to look at using a CDN, which will cache your content among distributed nodes located around the world. Many cloud hosting services will offer a CDN either in addition to hosting (e.g., Amazon's CloudFront) or in conjunction with it (e.g., Digital Ocean's Spaces CDN). Or you can just add an independent CDN service to any hosting (e.g., CloudFlare).
    – dan
    May 20 at 8:12
  • 1
    To answer your question more directly though, cloud hosting distributes resources among multiple servers (often at a single datacenter) to reduce failures and bottlenecks that can occur with a single server, but generally do not distribute resources among servers located in different regions - that's the job of a CDN (which some cloud hosts incorporate).
    – dan
    May 20 at 8:25
2

"The cloud" is a buzzword which just means "Other peoples computers" - thus if you ask "Does hosting on other peoples computers improve latency on a small global website" thr answer may more obviously be "no"

Latency is largely defined by distance and the speed that signals can travel. Thus to get low latency in multiple places in the world you need to have servers located in multiple locations. Using the cloud here can be helpful because you can find cloud providers in multiple places, but you still need multiple servers in multiple locations, and handle the routing if requests to these servers.

One way of getting a large part of the way there is to use a CDN - contrnt delivery network - to syndicate your static data to multiple locations and let the experts running them handle traffic routing (which is tricky to achieve)

Another way is to deploy multiple servers and appropriately co-ordinate data to the servers as appropriate for your application which could be anything from a distributed database to proxies routing requests to cloned servers eith different domains. (no doubt there are otherimplementstions and hybrids of the above as well) - but the point is that its not as simple as just hosting in the cloud.

2
  • For static content that can be CACHED (most GET routes) a CDN would work just fine. But for user-dashboard where they can upload picutres and edit their profile CDN would probably not help, but only multiple servers scenario, right?
    – Adam
    May 20 at 13:22
  • Practically speaking, thats correct.
    – davidgo
    May 20 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.