How to synchronize data between backend instances in load balancing?

500 Views Asked by At

This is my first time trying load balancing in GCE, or at all to be honest. I have followed the GCE document for creating a cross-region load balancing and successfully created a work HTTP(S) load balancing to 2 instances in us-central1-b and 2 instances europe-west1-b.

After following the tutorial for creating a load balancing with an unmanaged instance group, I was desperately looking for ways to synchronize data between the instances around the world. When I mean synchronizing data, I mean sharing the same website files and database information. I know I can manually upload files to each instance but that would take quite a while if I have instances in more than two locations.

I've heard of using Cloud Storage for sharing the same (static) data across the instances, but I am not sure if that is applicable to cross-region load balancing (I've only found content-based load balancing document for that). What I am concerned with this method is that I will need to create multiple Cloud Storage in multiple regions (where instances are located) to decrease latency. Otherwise, for example, instances from Singapore will have to request data from Cloud Storage in the United States, which would decrease latency and potentially the purpose of cross-region load balancing (or am I wrong?)

I've also heard of creating a master Cloud SQL and external (slave) MySQL in each instance for synchronized databases, but are there any other recommended methods (and potentially better in terms of performance?)

0

There are 0 best solutions below