hands-on lab

Balance the Traffic to Compute Engine Instances Through a Load Balancer

Beginner
45m
1,433
4.8/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Because of high availability and scalability, when you deploy and application in the cloud, one of the most chosen solutions is using a pool of instances. By using an instance pool, you have several servers that run the application you deployed sync with the latest version of it. One of the tasks to perform when choosing this kind of solution is to let the traffic reach the instances in the pool. You don't want to let public access to every single instance, but you should create a single endpoint from where instances can be reached. This is the main usage of a load balancer. It is a resource that allows you to create a single entry point for your resources, apply filters and then dispatch the traffic to the resources depending on a load of each one. In this lab, you will create an instance group and attach to it two Compute Engine instances that you will find in your GCP environment. Then, you will create a load balancer that will be associated with the instance group. This way, you will able to create a single entry point for your virtual machines and balance the traffic directed to them.

Learning Objectives

Upon completion of this lab you will be able to:

  • Create an instance group associated with several Compute Engine VMs
  • Define a load balancer attached to the instance group
  • Create a single entry point for a pool of resources instead of having one for each resource

Intended Audience

This lab is intended for:

  • Google Cloud Professional Cloud Developer (PCD) certification candidates
  • Individuals who want to learn a solution for handling and managing traffic to a pool of resources
  • Solutions architects who want to better understand the concepts of load balancing

Prerequisites

This lab has no prerequisites.

Updates

October 9th, 2023 - Updated the instructions and screenshots to reflect the latest UI

February 3rd, 2023 - Updated the instructions and screenshots to reflect the latest UI

August 3rd, 2022 - Resolved deployment issue

Environment before
Environment after
About the author
Avatar
Stefano Cascavilla
Junior Data Engineer
Students
39,553
Labs
106
Courses
2
Learning paths
10

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics
Lab steps
Signing In to the Google Cloud Console
Defining an Instance Group for the Compute Engine Instances
Allowing Traffic to the Compute Engine Instances
Creating a Load Balancer for the Instance Group
Testing the Functionality of the Load Balancer