I have a HTTP web server providing static html pages.
Within the page, it loads images & css from a fixed domain like:
<img src="http://assets.mysite.com/1.jpg" />
Actually there are several different domains serving the same files. For example.
- assets-us.mysite.com
- assets-eu.mysite.com
- assets-asia.mysite.com
I wanna the load balance to replace the domain "assets.mysite.com" to others according to the visitor's geolocation.
For example, when I access the same url from Europe, the html I get is:
<img src="http://assets-eu.mysite.com/1.jpg" />
When I access the same url from Japan, the html I get is
<img src="http://assets-asia.mysite.com/1.jpg" />
I prefer to NGINX(or G-WAN). Is it possible with only some configuration or script setup for the load balance to achieve this? how is the performance affected by this replacement?