Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I think you should add a disclaimer about the possible SEO implications of having duplicate content across multiple domains.
With that said, this sounds like an awesome solution smaller operations. If I ever find myself in a global website-situtation again I’ll definitely keep this method in mind. Setting up BIND and then patching it just seems overkill unless you have an infrastructure team that does that for you.
You can achieve the very same result with 30-40 lines of code - in my case PHP.
@ivan.denkov87 the problem is that that logic must exist before the app server is reached. if you’re saying that you use a php proxy “app” just to do this, it will be much slower compared the an nginx module (less overhead).
Apparently another option is to use anycast (not route55) so that it returns a geographically appropriate response from the DNS query. ref: https://news.ycombinator.com/item?id=7896335
@miguelwmonteiro What do you mean by “app server”. I am not sure if it will be slower as well too as I haven’t run tests on the script or a configuration like this with Nginx. With the nginx there is big disadvantage - what are you going to do if you have Magento or WordPress or any other CMS - can you exclude your IP, or you need to disable the redirection for all the visitors?
@ivan.denkov87: This sits in front of the CMS, so if you wanted to do this with something like WordPress you’d also have separate database instances in the different regions with replication between them.
its dose not work for me . i dont know why … did all the steps but nothing i keep having errors
Great post!
Just would like to put this quick note: if you are downloading the GeoIP database from http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz, you don’t need to install the geoip-database package via apt-get too.
Great post!
Just would like to left a quick note: if you are downloading the GeoIP database from http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz, you don’t need to install the geoip-database package via apt-get too.
What would be the way to redirect to a subdirectory for a specific language, like /en/ , /fr/ …?