Getting Started with Google Cloud in general
GCP, cloud computing, regions and zones

I am currently working as a Quality Analyst @Cognizant. As of now, I have been part of six production releases and made sure to have zero production defects.
Apart from being a tester, I am interested in figuring out how applications are built and have a huge interest in security and cloud computing and will be sharing some of my learnings here @hashnode.
Hey Good Day Hashnode community, and happy learning, Let's get started :)
Google Cloud Platform (GCP) :
Google Cloud is Google's own cloud computing service which offers a wide range of services starting from computing service, networking, storage, database, big data etc.
This is the same infrastructure that Google uses to host some of its most widely used internal applications having more than a billion users around the world Gmail,Google Search and Youtube are among a bunch of applications.
GCP is one of the three big cloud service providers (CSPs) around the world, the other two being Amazon Web Services (AWS) and Microsoft Azure. Together these three providers have a market share of around 64% with AWS being the leader followed by Azure and GCP.
What is Cloud Computing?
Cloud Computing in the on-demand availability of different IT services like : computation power, network infrastructure, storage options, databases and all other IT resources which are required to get your application up and running.
It is like renting a home, but instead of a home, you rent infrastructure and services from some Cloud Service Provider, in this case, Google. Google will be renting us the infrastructure and services. This infrastructure and services will help you host your application onto the cloud via the internet.
Just like you pay based on the amount of time you stay in a rented apartment. Here also we have a pay-as-you-go model i.e based on your use of the cloud provider's infrastructure you will be charged and if you are not using the resources you won't be charged. But the pricing is a bit complicated compared to your rent for an apartment.
You might have two questions in your mind, as of now :
- If we use cloud computing now, what did we use before cloud computing?
- Why do we need cloud computing, if we had an existing solution?
Let's answer the questions one by one as both questions are fair if you are new to the cloud.
If we use cloud computing now, what did we use before cloud computing?
Companies or organisations used to host applications locally inside their office premises mostly and that's why it was called on-prem. So, the companies used to buy hardware and they had to build infrastructure from scratch before they could host their applications.
It was complicated and expensive because before you can host your application in the on-prem servers you have to purchase servers, hard disks, and network cables and hire a team of experienced network engineers to get the entire server up and running.
But this only will not solve your problem as you have to hire a team of security experts who will be responsible for the data security ( i.e physical security of the servers from theft and digital security from hackers) as your application might have sensitive client details which you don't want to give away easily.

After taking care of the above problem you may start to think that now I will be able to deploy my application. Not really as there are other things that you need to take care of like :
Let's suppose you are an e-commerce company and there is a sale coming. You want to give your users a seamless shopping experience and you are expecting a lot of traffic to your website.
But the number of users who visited your website has surpassed the number of users you were expecting by a huge margin. This resulted in your site crashing down. What do you do now? The only thing thing that you can do is spin up more servers but you already did that. So, hosting applications on-prem poses this problem also where you have to predict the user's traffic and based on that you have to scale your application.
Let's consider the opposite scenario, like the amount of traffic onto your website is significantly less than what you predicted. Then the amount of money you spent on getting that additional infrastructure is also wasted.
Then there is a problem with availability. Suppose the area that you were hosting your application from is hit by a cyclone or tornado resulting in electricity not being available for more than 72 hours in the region. This will have a huge impact on your application's overall availability and will cost a loss of business.
I hope I have been able to answer the above question. I also hope that I have given you key insights into the problems that companies had while hosting the application on-prem. Now let's try to answer the second question.
Why do we need cloud computing, if we had an existing solution?
I guess you were able to understand all the problems listed above.
The main reason cloud computing became popular or as they call it the cloud computing business took off is because of something called the shared service model.
What is a shared service model?
Well, the shared service model turned out to be a revolutionary concept as it helped to bring down the cost of hosting your application in the cloud to a very reasonable number.
Shared service means you and other clients of the Cloud service provider will be sharing the computing resource based on the needs of your organisations and the uptime of your application i.e multiple clients will be able to share the same server without compromising on the data security part.

This was a game changer for the industry, as now the small company will also be able to host an application on the cloud without worrying about setting up the complicated infrastructure. The small company also no longer needs to rent out the entire server for itself for the CSP because it can share its computing resources with a large corporation that also doesn't need the entire computation power of a server, resulting in cost-sharing.
The other benefit was you don't need to hire experienced network engineers to get your server up and running as it is taken care of by the cloud service provider. You also don't need to worry about the availability of the servers as in most cases the availability of the cloud service providers is very high.
The cherry on top is that you don't have to worry about predicting how many users are going to visit the website during a sale. Because whether the traffic onto the website is high or low you can always spin up servers and spin-off servers with a few simple clicks.
That's why we see so many companies migrating to the cloud leaving behind their legacy applications on-prem. It is so easy to spin up a server and scale when traffic onto your website is high and scale down when traffic is low. No need to worry about the availability of the service as cloud services generally have very high availability. You don't have to worry about setting up the infrastructure.

We answered two of the most important questions, now let's see some GCP-specific facts, like how google solves the problem of availability.
For that we need to understand two things Region and Zone :
Google has its computing infrastructure hosted all around the globe. For better visibility and understanding google has divided its infrastructure spread across the world into regions and zones.
Regions :
Regions are collections of zones. Zones have high-bandwidth, low-latency network connections to other zones in the same region. If you want to deploy fault-tolerant applications that have high availability, Google recommends deploying applications across multiple zones and multiple regions.
These solve one of the problems that we discussed above, the availability of resources in case of some mishap.
Zone:
You can think of a zone as a subset of regions i.e zone is a smaller area within a region where google's infrastructure is present for you to host your application.
Google makes sure that each region has at least three zones, so that problem of not being able to build fault-tolerant applications is solved.
And you can host the same application in multiple zones. So, in case of failure in one zone your application will be able to serve traffic from the other zone. This will help you build a resilient application.
That's it for this blog, see you in the next one where we will explore the various services offered by GCP.
Note: Some of the images used in this blog are royalty-free and some are just been taken from the internet, so I would like to give credit to the respective image creators where it is due. Thanks!


