Handling disaster recovery and geographic distribution with Nginx

Davide Cerbo
4 min readSep 28, 2019

Clustering a microservice, or a web application, in a single datacenter can help us in performance and availability, but what’s happens when our users are distributed worldwide, or there is a disaster and our data center isn’t more available?

TL;DR: Jump directly to the Demo section!

So, we decide to serve our application from the closest datacenter to the user, to improve network latency, database load, and in general performance, and, moreover, we will use the other datacenter as a backup…