-3

I have a few VPS - same files and NGINX, PHP-FPM and stuff. How would I make it so that when the user goes to pingrglobe.com that they get redirected to the nearest server?

Thanks, Samuel.

matrixdevuk
  • 145
  • 2
  • 7

2 Answers2

3

You would use Anycast for this.

MDMarra
  • 100,734
  • 32
  • 197
  • 329
2

AnyCast is a transparent way of doing this, as MDMarra suggests, and is pretty hardcore. It's a way of having a single IP address in multiple locations. This is akin to haing a single IP address in multiple worldwide locations and should work with pretty much everything.

Another way is to get a DNS provider that provides geo-based DNS. People from different regions will resolve a different IP address for your domain name. As a price point, DNS Made Easy charge $55/month/domain (not sure how many records per domain you get), so $660/year. This will only work with services that use DNS resolution as a connection step (i.e. going directly to an IP address will still connect you to that region).

Another way of doing it is having your primary domain as a light-weight landing page, that compares the users IP address against a known list (like maxmind) and redirects them to us.example.com or emea.example.com or apac.example.com. This is an extra step and will only work for web browsers, or services that use HTTP and respect a 301 redirect.

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
  • This seems to be very hard! What would you recommend for a newbie to multi-location? – matrixdevuk Sep 26 '13 at 23:14
  • It is hard. It entirely depends on what you want to achieve, and what your goals are, and ultimately - whether or not you even need it. It's cool and nice to have, but ultimately there are very few people who actually need it. – Mark Henderson Sep 26 '13 at 23:33
  • 2
    @LeSamAdmin If it were easy, a lot of us wouldn't have jobs. – MDMarra Sep 26 '13 at 23:46