0

my client is using Magento for it's ecommerce global solution. Main country are US / EU / CN. For now only 1 VM in Italy, serving all traffic.

I would like to create 3 VMs, one for each country, on AWS or Google Cloud, not important at this stage.

maine DNS 1.2.3.4 should point to a www.mydomain.it , where 1.2.3.4 it's a nginx VM (in europe datacenter) configured with MaxMind GeoIP module.

this becouse website has multiple languages and multiple catalog/prices/qty for each country and with nginx i can pass necessary headers and variable to Magento so the cms knows wich language to show to customers from different countries.

My question is: when traffic will hit nginx vm, and it will proxy_pass to eg US server, will the US server actually serve US traffic, or US traffic will flow always via nginx VM so it will lag and slow down?

My goal is to just forward traffic to correspondin VM based on visitor country, so this VM will serve traffic and not the nginx VM

1
1

If you read the first answer in this question https://stackoverflow.com/questions/25678049/how-to-setup-global-load-balancing-using-digital-ocean-dns-and-nginx you will see several ways to achieve this, 30x Redirect, Anycast (taking advantage of BGP routing) and Geo-DNS. Route53 (mentioned by @frederico-sierra) is not enough on its own you would have to add CloudFront.

3
  • Thank you very nice reading. Although, my maine question remains: if i place a reverse proxy to eg EU datacenter and i proxy_pass traffic to a VM in US datacenter, even if end user is in the US traffic still need to go US -> EU (geoIP reverse proxy) -> US vm. Corretct? Any way to "only" bounce traffic to US vm and then serving traffic only from that VM?
    – x86fantini
    Sep 22 '16 at 18:28
  • The idea is to use Geo-DNS and have a proxy say in each country or continent you want to serve then all these proxies can use the same webserver as backend. If you setup proxy_cache then there shouldn't be much issue with speed since each nginx will serve most of the data from its local cache. Sep 22 '16 at 18:33
  • So "yes" if i set a proxy_pass in EU to a US VM, always the traffic will flow via this nginx reverse proxy in EU...i was looking at Rage4 GeoDNS, and since i do not need and extra reverse layer in my region ,i can hit directly the VM in each region. Thank you then for helping me to understood
    – x86fantini
    Sep 22 '16 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.