Reputation: 281
As per my knowledge, GCP does not provide multi regional VM instance. Just wondering why is it so? How to scale VM instances to different region?
Upvotes: 2
Views: 3123
Reputation: 1994
GCP VMs are zonal resources. If you want to scale horizontally you have to build your own infrastructure leveraging some of the services offered by google cloud.
For example, let's assume you want to deploy the frontend of your ecommerce in asia and europe to reduce latency explicitly on those regions, what you can do is use google HTTPS load balancer, which uses a single global (virtual) ip, configure it with two different backends, one with an instance group in asia and the other with an instance group in europe. The load balancer automatically routes traffic in the zone where the user can get less latency. If this is not enough, you can set an instance group to scale automatically, giving you even more flexibility in scaling vertically where it's needed, moreover an instance group can be regional, meaning that if a zone fails you can have a VM spin up in another one.
This picture pretty much explains the infrastructure needed.
Upvotes: 0
Reputation: 1382
Google Compute Engine Instances are Zonal Resources:
Zonal resources operate within a single zone. If a zone becomes unavailable all of the zonal resources in that zone are unavailable until service is restored. An example of a zonal resource is a Google Compute Engine instance that resides within a specific zone.
Zonal Resources consist within regions:
A zone is a deployment area for Cloud Platform resources within a region. Zones should be considered a single failure domain within a region. In order to deploy fault-tolerant applications with high availability, you should deploy your applications across multiple zones in a region to help protect against unexpected failures.
For zonal failure i.e. within a region, you would select multiple zones within that region however this would not cater for a regional failure, for which there needs to be 100 Mile separation.
Data that is geo-redundant is stored redundantly in at least two separate geographic places separated by at least 100 miles. Objects stored in multi-regions and dual-regions are geo-redundant, regardless of their storage class.
Regardless, this is not automatically handled by Compute Engine Instances i.e. as some of the non-instance data stores (Spanner, BigQuery) and specialised services (Functions, AppEngine) would be. Compute Engine HA would need to be handled by a DR strategy that, depending on the type of instance data, could be as simple as doing a snapshot and building an instance from that snapshot on a scheduled basis.
https://cloud.google.com/docs/geography-and-regions#regional_resources
Upvotes: 2