Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


[Dumb Question] Globally available website
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[Dumb Question] Globally available website

(Sorry for ambiguous title - I'm not sure what the technical term is)

Ok so I'm aware this is something of an odd post and probably more suited to /r/ELI5 but roughly how do you set up a website so that its equally speedy no matter where you are in the world.

In my naive head I thought the answer was just to put Cloudflare/CDN in front of your webserver and then let them magically sort it but when I check my site its a lot slower in america than in europe (actual physical servers in europe).

So in a pre-CDN world how did people do this? I understand you can run servers across the world, but then how do the clients know which one is local to them? and if they all hit a load balancer somewhere surely that's going to be a problem if your load balancer isn't geographically near?

Comments

  • 4n0nx4n0nx Member

    You can use geolocation with your own nameservers to redirect visitors to their closest server. Page load speed from a server in Europe to USA should not be slow...

  • HyperSpeedHyperSpeed Member
    edited May 2015

    It's quite hard to get it perfect in every single place because obviously it depends on the carriers in the area and quite a few factors. It is possible to use anycast to achieve a better speed per location (Cloudflare).

    It is also possible to almost create a few webserver instances like a 'CDN' in the sense using Nginx webserver alongside varnish cache to point the user to the closest server based on their IP address. For example you could send the IP range 1.0.0.0 to 15.0.0.0 to a Netherlands webserver if you knew the majority of IP's within this range belonged to Netherlands and surrounding area.

    I'm sure the configuration "upstream backend" comes to mind with load-balancing. Such as: http://nginx.com/resources/admin-guide/load-balancer/

  • IshaqIshaq Member

    overclockwise said: I understand you can run servers across the world, but then how do the clients know which one is local to them?

    They don't, you use GeoDNS and it will reply with the closest server for the one doing the query.

    Thanked by 1KwiceroLTD
  • Like Hyper said, NGINX is the way to go. If you really wanted to, just buy a bunch of VPSes fromfrom around the world (Europe, Canada, the U.S, China, India, etc.) and setup one main server where it'd run a CRON job to sync the data between all of them.

    After that, you can simply point your domain to all of those IP addresses (your computer should choose the closest VPS/the one with the best latency).

  • FrankZFrankZ Veteran
    edited May 2015

    @overclockwise - I tried CDN(s), tried NGINX reverse proxy, tried BIND Views, tried someone else's anycast, etc. They all work to various degrees to make things faster, but IMO they all had issues as well. Then a member here turned me on to gDNSd, a self hosted geocast DNS server, with auto failover. I like it as the best cheap solution. For me, it also means six regionally diverse DNS servers and six regionally diverse web servers, that all have to be kept in sync. So this is not a fast and easy solution, although it is cheap and it does five 9's with short TTLs (IMO).

    EDIT: you could also go RAGE4 anycast/geoDNS for a small fee and work on setting up and keeping your web servers in sync as a start :) You can get a Rage4 DNS account from Prometeus for $15/year. Although I am not sure if this includes GeoCast, or just anycast DNS.

  • ClouviderClouvider Member, Patron Provider

    Geolocation enabled DNS service should be able to help with selecting the best server, based on rules.

  • @FrankZ said:
    tried NGINX reverse proxy

    This defeats the purpose of having geolocated servers...

    Thanked by 1Traffic
  • FrankZFrankZ Veteran

    deadbeef said: This defeats the purpose of having geolocated servers...

    I tried scattered NGINX reverse proxies with caching, among other things, before going with GeoCastNS. Sorry, if I did not make that clear above :)

    Thanked by 2deadbeef Traffic
  • vldvld Member
    edited May 2015

    As others said, use a geographically-aware DNS setup. gdnsd is a great start.

  • TrafficTraffic Member

    @FrankZ said:
    I tried scattered NGINX reverse proxies with caching, among other things, before going with GeoCastNS. Sorry, if I did not make that clear above :)

    That makes much more sense :)

    Thanked by 1FrankZ
Sign In or Register to comment.