How to make a website was loaded at the user from the nearest server?

Is there a site that people visit from all over the world. The server is in Germany, respectively, people from the US or say Australia's relatively high first response time. I would like to have multiple servers in different locations, and that the site was loaded from the nearest server to the user.

Are there any solutions on this? I know about CDN, but they are for static content and website pages are generated dynamically.
March 19th 20 at 08:52
3 answers
March 19th 20 at 08:54
CloudFlare to deliver, you get exactly the same thing and raise a few of their servers with geo distribution. Only free.

Are there any solutions on this?

Google for
geo dns
geo nginx upstream
etc.

https://gist.github.com/kmjones1979/fcabb4731bbf85...
geo dns

In real Internet is not working
https://habr.com/ru/company/ivi/blog/237349/

Only works in laboratornih/greenhouse conditions, within local networks.

Cause: a hierarchical system of organization of the DNS, DNS caching.
Put the small life time of write caching DNS will not help either, many routers, this setting is generally ignored. - Larue30 commented on March 19th 20 at 08:57
@Larue30, there's one of the first comments under the article that it's not so bad, if not bad: https://habr.com/ru/company/ivi/blog/237349/#comme... - Florin commented on March 19th 20 at 09:00
@Florin,
there is in fact written that "it is hoped that, most likely, probably most, use the DNS provider that is geographically closer."

1) most likely, maybe no confidence.

2) for large providers is not working

Example:

I'm in Siberia now. My Russian ISP has its head office in St. Petersburg. I always defined as being in St. Petersburg.

And it is not uncommon.
And with the major providers and mobile Internet (which is now 60% of the traffic) - so very often.

And yet - you need to determine how the location of the IP to give the correct mirror.

There's not always a guarantee

I have servers from major European hoster. Located in the same datacenter. But one IP French, the other Irish, the third German.

Routing and IP identity now everything is very confusing.

That comment - it only works for large cities and small providers. - Larue30 commented on March 19th 20 at 09:03
@Larue30,
But one IP French, the other Irish, the third German.
it is not excluded that the service that determines the geolocation of IP delivers outdated info - Laurie.Raynor commented on March 19th 20 at 09:06
@Laurie.Raynor,
it is not excluded that the service that determines the geolocation of IP delivers outdated info

not.
largest hosting company, has branches throughout Europe.
owns IP blocks from different countries. - Larue30 commented on March 19th 20 at 09:09
March 19th 20 at 08:56
For engine dynamics:

Multiple entries A/AAA in DNS.
The browser sends a request to all the servers who is the first answer from the server list - so in the future is communication.

And for the statics, for heavy content (video, photos) - there are specialized CDN solutions
The browser sends a request to all the servers who is the first answer from the server list

Is there any confirmation of these words?

Multiple entries A/AAA in DNS.

Most NS servers return only 1 IP, which is selected randomly. So there is no guarantee that you will get the nearest IP - Johnathan_Christians commented on March 19th 20 at 08:59
@Johnathan_Christians,
Is there any confirmation of these words?

It's, like, a forum of programmers?
Just look in the source code browser. They're still open.

Most NS servers return only 1 IP, which is selected randomly.

Depends on how its asked. - Larue30 commented on March 19th 20 at 09:02
March 19th 20 at 08:58
In fact, you wonder about the statics. The CDN may not cache the content or to cache for a short period. The bonus here is that if you, for example, in AWS, then there is the whole network connected with broadband and all the content transfer is relatively small compared with the generation time of the content and just faster tie between the client and the CDN itself.

Find more questions by tags Web DevelopmentHosting