Hello Cloud Gurus,
I was reading documentation around Zonal Vs Regional Services in GCP and watching the lecture on Compute Services. The first thing in the lecture is GCE. This is a Zonal Service. What I understand from that is it can only use resources in the same zone. So my question is if a GCE instance wants to write to a Storage bucket then does that bucket also need to be in the same zone as the GCE Instance. I believe that a VPC Network can be set up to access the bucket or a service account could be configured with access (Please correct me if I am wrong and let me know how this will be done).
So the first question is What is the significace of GCE being zonal ? It implies that if a zone is down then the instance is down and no service. So lets say I have a GCE instance running that has my web server to serve a web application. If there is a problem in the zone then my customers cannot access my application ? (I understand that we can set up multiple instances and use Load Balancing to resolve it but I want to understand what does GCE being zonal) exactly means.
Secondly, a lot of text on the internet suggests e.g. CloudSQL should not be used where the application has to be used Globally instead other option like Spanner should be preffered. I do not understand this as CloudSQL is not directly being used by geographic traffic. It is being accessed with an application that can read/write to it. I got this from a video from the (cloud Tech Guy Joe) as one of the exam tips that whenever regional vs global requirements it is best to not consider cloudSQL. I would like to understand that.
About the GCS point, you can tranfer files between your GCE instances and GCS, even across regions. However, those transfer may end up incurring data transfer charges. This may not be a problem if you’re dealing with a few files occasionally, but if you’re doing large file transfers frequently, these costs could definitely add up, so consider that in any architecture planning
On your first question, you’re exactly right. GCE being zonal means if you’re hosting your web server on a single instance located in us-west1-a, and that zone experiences an outage, your website would become inaccessible. That’s because GCE at an individual instance level is impacted by the loss of the zone. Like you say, you can mitigate this by load balancing and autoscaling.
So if you had your website deployed on instances in us-west1-a, us-west1-b and us-west1-c, the loss of a single zone would not take your website down. From that perspective, you’ve made it a regionally fault toleranct service. Likewise, if you wanted extreme availablity, you might also host three servers across the zones of australia-southeast1. That gives you a multi-regionally/globally fault tolerant service.
I’m still studying for my own GCP ACE, and not quite up to speed enough to tackle that second question yet. Open to other students providing some thoughts!
I dug in further and found the answer. The Regional Vs Global availability of Database has to be considered for scalability. For example Cloud SQL is not horizontolly scalable. Means we cannot add Globally available nodes with the database to scale it. However in Spanner we can. What I was missing was the scaling aspect. Thanks again Stephen for your thoughts. I appreciate it
Thank you for your thoughts and I appreciate the validation of my understanding. You brought up an excellent point about the charge. A lot of times while reading stuff I take it for granted that money is not an object.
Absolutely, and it’s one of those things you only ever really see at scale with production systems. This is why so many instructors make such a big point of data charges, because whilst they seem small, they can become one of your biggest expenses in the cloud