Introduction

Migrating to a public cloud is never an easy task. It triggers very often questions like:

  • Will the application have compatibility issues that could interfere with the migration process?
  • Could the private data be accessed by the owners of the cloud or by anyone else outside of the company?
  • Because it is a public cloud and it is exposed to the internet, is there any risk for the system to be hacked?

All these questions express reasonable fears that keep companies from migrating to the public cloud, but if we analyze them more deeply, we can realize that they are not real. 

For example, all main cloud providers encrypt by default all the data at rest and offer strong mechanisms of authentication and authorization to ensure that only the right people can access them. Moreover, you can use your own keys to encrypt the information to ensure that nobody outside your company can access it. In addition to this, these cloud providers are some of the biggest internet companies , this means they have much better security solutions than any other company in the world, and because of that, it is less feasible that they can be hacked.

So, in general, it is more secure and cost-effective to migrate to a public cloud than to build and maintain your own data center, and in the following sections, we are going to see how to do it using GCP.

GCP features

We have already seen some of the fears that companies have about migrating to a public cloud and why they are not real, and now, we are going to see all the benefits that this migration could have for the company. In particular, we are going to see some of the advantages that GCP (Google Cloud Platform) has, that makes this cloud more attractive than its main competitors (AWS, Azure).

First of all, Google is one of the most committed companies to open-source projects, and in fact, many of the top open-source projects nowadays were born inside Google, like Kubernetes, Tensorflow, Angular, etc… And because of that, most of the services offered by Google are compatible with open-source projects, and this allows you to avoid vendor lock-in easily. 

Another great feature is that in GCP all the network infrastructure including routers, firewalls, and load balancers, are not physical but virtual components, so there can’t be hardware failures. In addition to this, it is possible to create virtual networks and subnetworks that spawn across different geographical zones making the high availability solutions easier to implement.

Another important thing is that the solutions offered by GCP are in general more affordable than the ones offered by its competitors thanks to features like preemptible machines or sustained use discounts.

And last but not least, you are using the same infrastructure that some of the most scalable applications in the world use,  like Google Search, Gmail, or Google Maps, with all the benefits that this provides.

Example Case Study

Once we have seen the main features of Google Cloud and the benefits that it has over its competitors, we are going to use a case study of a hypothetical company that wants to migrate to Google cloud. We are going to see what is its current situation and what are the goals they want to achieve with the migration, and then we will review what are the choicOnce we have seen the main features of Google Cloud and the benefits that it has over its competitors, we are going to use a case study of a hypothetical company that wants to migrate to Google Cloud. We are going to see what its current situation is and what the goals they want to achieve with the migration are, and then we will review what choices are offered by Google for every aspect of the migration (networking, compute, storage, …) and what is the best option regarding the requirements:

Current situation

The company is a bicycle rental company that has grown rapidly in the last few years and its CEO is considering migrating to the public cloud to avoid buying new infrastructure and improve customer service.

There is currently an application that registers users and has a list of bicycle exchange locations, and it works as follows: 

When a user arrives at an exchange point, the user  selects in the application the bike they want to rent(by scanning the code of the bicycle), this allows them to unlock the bicycle for use, when they arrive at the destination, the point of arrival is registered. With this data, the application calculates the distance and time spent on the journey.

In the event that a certain amount of time passes without the user having left the bike at another point, they will be charged a fine for the value of the bike if it is not recovered.

This is a company that only offers service in western Europe and they do not plan to expand due to the logistics costs (bikes, exchange points, etc.).

The technology stack used consists of a single monolithic application deployed on its own server with a web front-end and REST APIs that are consumed by the mobile application. The data is persisted in a PostgreSQLv12 database.

Goals

One of the first things they want to do is to break their existing application into smaller ones that can be developed and scaled independently.

In addition to this, the company wants to equip the bikes with GPS that periodically send their position to better calculate the distance traveled as well as to be able to recover it in case of loss or theft. Right now it can’t be done because the application can’t support streaming data from all bikes sending information simultaneously.

They would also like to be able to make an analysis of the data sent by the bicycles to find popular routes and thus be able to exploit areas that their users usually visit and expand the number of collection points.

Finally, because they are not yet 100% sure that Google’s solution may be the best one, they would like to avoid vendor lock-in whenever possible.

GCP choices

With this current situation and requirements in mind, we are going to analyze the best oWith this current situation and requirements in mind, we are going to analyze the best options GCP can offer to achieve the goals.

Compute choice

These are the alternatives of compute engines in GCP:

Because one of the goals they want to achieve is to break its monolithic application into smaller independent services, we have to think of a solution compatible with microservices. In the case of GCP, it can be “App Engine”, “GKE”, or even “Cloud Functions”. But because it is not an event-driven application and they want to use open-source tools to avoid vendor lock-in the most suitable solution will be Kubernetes.

Network choice

These are the main components offered by GCP in terms of networking:

Because this is a regional company that doesn’t want to expand its business due to the logistic cost. It will only require a VPC that has a unique subnet in the western Europe region. In this network, we have to define firewall rules that only allow HTTP traffic because the communication between the services will use this protocol. And also we will need to define an HTTP load balancer that will be used by “GKE” as an ingress controller to work as an entry point for all the internet requests.

Storage choice

These are the alternatives of Datastores in GCP:

Regarding the requirements, there are two clear storage use cases. One of them will store relational data such as user and bicycle information and the other will store the stream of location data sent by the bikes when they are moving. 

For the first one, the best option is to use Cloud SQL with a PostgreSQL implementation because it is exactly the same as the one they are using currently. 

For the second one, the best option is “Cloud Big Table” because it is very performant and it is specially designed to store time-series data, moreover, it is compatible with HBase API,this way all the tools that can be used to access and process the data could be used in another HBase implementation avoiding vendor lock-in.

Data processing choice

These are the alternatives of Data processing tools in GCP:

To meet the requirements of data processing, we have two options, the first one is very easy to configure and very performant, and the second is based on open-source in order to avoid the vendor lock-in. 

In the first case, we can use BigQuery, a very powerful analytic tool to process terabytes of data in seconds using SQL. On the other hand, if we don’t want to use any Google-specific technology, we can use any open-source tool that can be used to process data stored in an HBase database like Drill, Impala or Hive.

Conclusion

As we can see, migrating to public cloud has a lot of advantages in terms of cost and elasticity, and if you choose GCP in particular you could take advantage of many features that make this choice more favorable than others offered by its competitors. 

In addition to this, we have seen what some of the options in terms of computing are , data store and network offered by Google and what the best choices regarding the requirements of a particular use case are.

Also, it is worth noting that you can test GCP for free for 3 months thanks to the free tier offered by Google to make some POCs before paying for it.

Author

admin
Author