skip to Main Content
Welcome to Gimasys!
Hotline: +84 974 417 099 (HCM) | +84 987 682 505 (HN) gcp@gimasys.com

13 sample architectures to start your “Google Cloud journey”

Regardless of your organization's performance or cost needs, Google Cloud is an incredibly flexible platform that supports a wide variety of application architectures. Whether you want to learn how to deploy hybrid cloud or mobile apps, microservies, CI/CD, machine learning (ML), or security, by the end of this post you'll have a clear understanding of how to get started. Start your journey to Google Cloud.

If you don't know how your organization fits into the Google Cloud architectural model, this is the article for you!

1. Set up hybrid architecture on Google Cloud and On-premise

When it comes to migration or running part of the application on On-Prem and the rest on the Cloud, Hybrid architecture is quite a popular choice. Hybrid architecture is where you will deploy the frontend and/or application server on Google Cloud and the backend on On-premise.

  • In that case, users request applications over the internet and the global load balancer routes them to your application on Google Cloud or On-Prem.
  • From there, the global load balancer distributes traffic to balance the load to the appropriate service. Services can be on any cloud platform, e.g Compute Engine, Google Kubernetes Engine (GKE), App Engine, etc
  • Applications that need to communicate with backend systems in your data center must connect via Cloud VPN or Interconnect, depending on the bandwidth of your needs. Not sure which one to choose? See here.
  • On-Prem application requests reside on the load balancer, which distributes the load across application servers.
  • The application server connects to backends such as search, cache, and databases to respond to user requests.
Hybrid architecture
Hybrid architecture

To learn more about hybrid solutions, take a look at this solution.

2. Set up hybrid architecture on Cloud

Increasing traffic to the cloud can be a great way to start using the cloud. If your application is deployed On-Prem, you can use it for baseload and temporarily switch to Google Cloud Platform when you need more capacity due to a sudden increase in traffic. The main reason to do this is to avoid keeping additional capacity on site. And because in the cloud you only pay for what you use, bursting can help save costs.

Build Hybrid architecture
Building Hybrid architecture (On the Cloud)

Click here to learn more about hybrid solutions and models.

3. Preserve confidential data in chatbots using Data Lost Prevention API (DLP)

Imagine a situation where your business or users request to share sensitive information with a chatbot. To do so, you can use Dialogflow, which helps create conversational experiences for your users without having to learn machine learning (ML) or artificial intelligence (AI).

DLP API model
Model DLP API

For example, in this architecture, users interact with a chat experience on the phone or the web, calling a Dialogflow agent. Requests are made according to business logic using serverless Cloud Functions or virtual machines. If you then want to de-identify sensitive information from your chat experience, you can use the DLP API and store that information in BigQuery for further processing.

4. Build mobile application backend on Google Cloud

When building mobile apps on GCP, Firebase is a good option for hosting, user authentication, storage etc. You can integrate Firebase with many backends such as Serverless Cloud Functions to tie business logic together or Cloud Run to run serverless containers as application backends. You can also connect to Application and Computer, if that's where your backend programs exist.

Build backend for mobile applications
Build backend for mobile applications

To find more about, Check out this series.

5. Migrate Oracle database to Spanner

What is the best way to migrate Oracle to Cloud Spanner? If you are using an Oracle database and are looking to migrate it to Spanner for global scale, then you need to first export your Oracle database to a portable file format like CSV and store it in Google Storage. Then, import the data into Dataflow where you will read and parse the files, transform the data and create Spanner mutations, handle any errors, and finally write to Spanner.

Migrate Oracle database to Spanner
Migrate Oracle database to Spanner

To find more about, take a look at this solution.

6. Build Data Lake on Google Cloud (Data Warehouse)

The purpose of Data Lake is to ingest and store data for mining and other workflows like data mart, real-time analytics, ML, etc! Here are some things to consider when setting up a data lake in Google Cloud:

  • You can import data from different sources like IoT, On-Prem, user activities like clickstream, online transactions, etc.
  • Real-time data can be ingested using Pub/Sub and Dataflow, easily scaling for different data volumes.
  • Bulk data can be imported using Transfer Appliance, Transfer Service or gsutil, depending on your bandwidth and capacity. Refined real-time data can be stored in Bigtable or Spanner.
  • You can mine data in a data lake using Datalab and Dataprep. Or, for machine learning, use Datalab or ML Engine to train and store predictions in Bigtable.
  • For warehousing, you can send data to BigQuery or to Dataproc if you are a Hive ecosystem user.
Building Data Lakec
Build Data Lake

To find more about, check out this solution on how to use Cloud Storage as a datastore.

7. Website hosting 

To scale a website based on traffic is not an easy task. Google Cloud provides simple and cost-effective ways to host websites and scale to support the growing number of requests on the website. Here's how to scale (expand infrastructure) on your website with Cloud Google:

  • When a user sends a request to your website, Cloud DNS translates the host name into the web server's IP address.
  • Then request to move in Cloud CDN, this request will respond from cache. If there is no cached response, the request goes to Global Load Balancing to balance the load across web servers on Compute Engine. You can even set on-prem or another cloud configuration as the backend.
  • Static files such as images are served from Cloud Storage. The internal load balancer then sends requests to the app servers and ultimately to any databases.
  • Use Firestore document database for activities and user profiles.
  • Use CloudSQL for realtional data
  • To protect your backend from layer 3 and 4 DDoS attacks, enable Cloud Armor with a Global load balancer.
  • This example uses Compute Engine as the backend, but you can also deploy your backends in containers running on GKE, Cloud Run or App Engine.
  • To scale your infrastructure using Compute Engine, use Managed instance groups to help automatically balance as load increases (App Engine and Cloud Run scale with autoscaling)
Website hosting
Website hosting

8.Set up CI/CD pipeline on Google Cloud

CI/CD is an effective way to support application developers more easily and increase performance, maintaining faster system deployments. Setting up CI/CD with Google Cloud is simple:

  • Developers will write code and push it to the Google Cloud source repository, bitbucket or git repo.
  • As soon as code appears in the repo, Cloud Build kicks in—it runs tests and security scans, while building a docker image, then pushes that code to Spinnaker, an open-source platform that continuously distributes multi-cloud (you can also use Jenkins or Gitlab).
  • Spinnaker then deploys the container to a cluster on GKE, Cloud Run or Compute Engine; it can also deploy a canary application to ensure changes are tested against real traffic.
  • Incoming user traffic hits the load balancer and is routed to the canary or prod application.
  • If the canary application fails, you can automatically restore quickly.
Set up CI/CD pipeline
Set up CI/CD pipeline

To find more about, check out the CI/CD solution.

9. Build serverless microservices on Google Cloud

Microservices and serverless offer greater scalability, more flexibility, and faster release times, all at a low cost. A good way to build a serverless microservice architecture on Google Cloud is to use Cloud Run. Let's use an example of an e-commerce application:

  • When a user places an order, the frontend on Cloud Run receives the request and sends it to Pub/Sub, an asynchronous messaging service.
  • Further microservices are also deployed on Cloud Run, monitoring Pub/Sub events.
  • Suppose the authentication service makes a call to Firestore, a serverless NoSQL document database. Fully managed document database DB query inventory service Cloud SQL or in Firestore. After that, the order service will receive an event from Pub/Sub for further processing.
  • Static files are stored in Cloud Storage, which can then trigger cloud functionality to analyze data using ML APIs.
  • There can be microservices like address lookup deployed deployed on Cloud Functions.
  • All logs are stored in Cloud Logging.
  • BigQuery stores all data for serverless warehousing.
Build serverless microservices
Build serverless microservices

To find more about, See our guide to choosing a serverless platform.

10. Machine learning on Google Cloud

Organizations continuously generate data and can use ML techniques to better understand that data. Here are the steps to complete ML configuration on Google Cloud:

  • First, import data using Transfer Appliance or Transfer Service into Cloud Storage or BigQuery
  • Then, prepare and preprocess the data using BigQuery, Dataprep, Dataflow, or Dataproc.
  • Use AI Hub to explore existing AI content and pipelines.
  • When ready, use AI Platform's Data Labeling Service to label the data.
  • Build your ML applications using managed Jupyter notebooks and Deep Learning VM image.
  • Then, use AI platform training& prediction to train your model and deploy to Google Cloud in a serverless environment or use Kubeflow on-prem.
  • Use explainable AI to explain your model results to business users, then share them on AI Hub.
Machine Learning Architecture
Architecture Machine Learning

To learn more, take a look machine learning technology 

11. Serverless image, video or text processing in Google Cloud 

Most applications require a certain amount of image, video, or text processing. In this architecture, let's assume a blogging website where users create content in the form of videos, images, and text.

  • User-generated content from the frontend is stored in Cloud Storage, generating Pub/Sub events and triggering cloud functions.
  • Cloud Functions then forwards to the Vision API, Video Intelligence API, or NLP API, depending on the type of file uploaded by the user.
  • The cloud function will receive the JSON response from the corresponding ML API, then do further processing and send the results to BigQuery for analysis.
  • Google Data Studio or another visualization tool can be used to create a custom dashboard to analyze it.
Serverless image, video or text processing
Serverless image, video or text processing

To find more about, see AI Platform.

12. Internet of Things (IoT) on Google Cloud

If you have a large number of data-generating devices, you can use IoT workflows to easily and securely connect, manage, and ingest data to use it for applications. downstream. Here is a sample IoT workflow:

  • A sensor sends data to an edge device equipped with Edge TPU, a chip that runs ML models.
  • There, the Cloud IoT Edge software layer enables the execution of ML models and runs on Android Things or Linux OS.
  • From the edge device, data is sent to Cloud IoT Core via MQTT or HTTP(S), generating events in Pub/Sub.
  • Pub/Sub then enables Cloud Functions to update any device configuration.
  • For longer storage, Dataflow will filter and process the data and send the data to Bigtable NoSQL or BigQuery database.
  • From BigQuery, you can train an ML model using BigqueryML or AI Platform.
  • You can visualize data in Data Studio or on another dashboard.
IoT architecture
IoT architecture

To find more about, check out Cloud IoT Core.

13. Set up a security model on BeyondCorp

BeyondCorp is Google's implementation of the zero trust security model. It was built after 8 years of building zero-trust networks at Google, combined with ideas and best practices from the community. Let's take an example of a company where an employee is trying to access an internal application.

  • The request is passed to the Cloud Load Balancer, which sends it to an Identifiable Proxy (IAP).
  • The IAP then connects to the device inventory and checks if the user is legitimate, connects to Cloud identities for endpoint management, Active Directory for authentication, Identity and Access Management (IAM) and Access Context Manager for policy-based contextual access. These checks may be configured differently for employees versus contractors.
  • Once passed, the check is transferred to the service. If the check fails, the user will be denied access.
  • If the backend is on-premise, then the on-premises IAP connector and Cloud Interconnect or Cloud VPN will connect directly to the data center.
Security architecture on BeyondCorp
Security architecture on BeyondCorp

To learn more, take a look BeyondCorp here.

Conclusion

Start-up businesses with high requirements for a strong, simple infrastructure platform expand at the pace of development At the same time, it does not cost a lot of resources to build and operate the underlying platform, but only needs to focus on developing business applications. 

Gimasys hopes you enjoyed this roundup of the most popular Google Cloud reference architectures. If your organization or business is still struggling or looking for the right architecture for you, Gimasys supports Vietnamese start-ups with a fund of more than $200K, program details here.

For technical support, you can contact Gimasys - Google's Premier Partner in Vietnam with the following information:

Source: Gimasys

Back To Top
0974 417 099