准备工作
- 实验会创建一个 Google Cloud 项目和一些资源,供您使用限定的一段时间
- 实验有时间限制,并且没有暂停功能。如果您中途结束实验,则必须重新开始。
- 在屏幕左上角,点击开始实验即可开始
Create Instance Groups
/ 50
Configure the load balancer
/ 50
Create Instance Groups
/ 50
Configure the load balancer
/ 50
An External passthrough Network Load Balancer is typically used when a service needs to be publicly accessible and handle high-volume, performance-sensitive non-HTTP/S traffic while needing to see the client's true IP address.
Non-HTTP/S Protocols: Ideal for load balancing traffic using TCP or UDP that is not HTTP/S (e.g., mail servers, gaming servers, VPN tunnels, or custom protocols).
Source IP Preservation: Critical when backend applications must see the original client's source IP address for logging, security, or custom logic.
Maximum Performance: For applications requiring the highest throughput and lowest latency because it is a passthrough (non-proxied) load balancer operating at Layer 4.
Global Reach (TCP/UDP): It can provide a single global IP address to distribute TCP/UDP traffic across backends in multiple regions (when configured globally), offering high availability for non-web protocols.
In this lab you learn how to configure an External passthrough Network Load Balancer by deploying and linking all of its essential componets and verifying public traffic distribution across the instances.
In this lab, you learn how to:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the right is the Lab setup and access panel with the following:
Note that the lab timer is located near the top of the page, showing the remaining time.
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab setup and access panel.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab setup and access panel.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
network-lb-tag network tag)Verify that the resources are ready:
In the Google Cloud Console, go to Navigation Menu > Compute Engine > Instance groups.
First, click Create Instance Group and select New unmanaged instance group for the
| Property | Value |
|---|---|
| Name | web-server-1 |
| Region | |
| Zone | Select the zone |
| Network | default |
| Select VMs | Add backend-vm- |
Click Create.
Repeat the process for a second instance group named web-server-2.
| Property | Value |
|---|---|
| Name | web-server-2 |
| Region | |
| Zone | Select the zone |
| Network | default |
| Select VMs | Add backend-vm1- |
Click Check my progress to verify the objective.
This is the core task where you build the load balancer itself. A Google Cloud Load Balancer isn't a single box; it's a set of distinct resources that work together. You will now create and link them:
The health check ensures the load balancer only sends traffic to healthy instances.
Navigate to Health Checks: In the Google Cloud Console, go to Navigation Menu > Compute Engine > Health checks.
Click Create a health check.
basic-http-check
TCP
Leave the default settings and click Create.
The backend service manages the backends (your VM instances) and distributes traffic to them.
Type Load balancing in the search bar on the top. Under Products & Pages, click on Load balancing.
Click Create Load Balancer.
On the Network Load Balancer (TCP/UDP/SSL), click Next.
Select Passthrough load balancer, click Next.
Select Public facing (external), then click Next and Configure.
Set the following values:
| Property | Value |
|---|---|
| Load Balancer Name | network-lb-backend-service |
| Region | |
| Backend type | Instance group |
| Protocol | TCP |
| Health Check | basic-http-check |
In the New backends, select Instance group as web-server-1.
Click Done.
Click Add a backend then specify Instance group as web-server-2.
Click Done.
| Property | Value |
|---|---|
| IP version | IPv4 |
| IP address | click Create IP Address |
| Name | network-lb-ip, click Reserve |
| Port | 80 |
Click Check my progress to verify the objective.
This final step is to verify that your entire configuration works. You will send repeated test requests to the load balancer's single public IP address. The goal is to confirm that your requests are being distributed across both of your backend instances, proving that the load balancer is successfully spreading the traffic.
network-lb-backend-service load balancer you created.You successfully configured an external passthrough Network Load Balancer. You created and configured backend VM instances with a firewall rule, set up all the necessary load balancing components including a health check and backend service, and tested that the load balancer correctly distributed traffic between your instances.
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated: December 09, 2025
Lab Last Tested: December 09, 2025
Copyright 2026 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
此内容目前不可用
一旦可用,我们会通过邮件告知您
太好了!
一旦可用,我们会通过邮件联系您
一次一个实验
确认结束所有现有实验并开始此实验