Skip to content

Load Balancer

Cloud Load Balancing allows you to put your resources behind a single IP address that is externally accessible or internal to your Virtual Private Cloud (VPC) network.

Different Types of Load Balancers

The following diagram summarizes all the available deployment modes for Cloud Load Balancing.

To determine which Cloud Load Balancing product to use, you must first determine what traffic type your load balancers must handle.

As a general rule, you'd choose an Application Load Balancer when you need a flexible feature set for your applications with HTTP(S) traffic. You'd choose a proxy Network Load Balancer to implement TCP proxy load balancing to backends in one or more regions. And, you'd choose a passthrough Network Load Balancer to preserve client source IP addresses, avoid the overhead of proxies, and to support additional protocols like UDP, ESP, and ICMP.

You can further narrow down your choices depending on your application's requirements: whether your application is external (internet-facing) or internal and whether you need backends deployed globally or regionally.

Use Cases

Use Case #1

You want to build a publicly accessible website. The website needs to have multiple instances running on Compute Engine. And the VMs need to be hosted in the US, Europe, and China.

Okay, so since this website is going to be public, we need an external load balancer. And because it is a website, that means we are going to need to be using HTTP and/or HTTPS. We are using VMs in multiple regions, so it canโ€™t be regional. So in this case, you would select the Global external HTTP(S) load balancer.

Use Case #2

You are building a private, internal web service. All backend instances will be running on Compute Engine and you will connect to them via REST API. All client connections are expected to originate from a specific Google VPC.

Okay, since this is a private service, you are going to choose an internal load balancer. The REST API means we will be using HTTP and/or HTTPS. So your best choice here is the Internal HTTP(S) load balancer.

Use Case #3

You need to build a VoIP solution for your company using SIP. SIP is a peer-to-peer protocol that is transported by UDP over TCP.

Now, for your employees to be able to connect to the service, your load balancer needs to be external. And you know you need to support the UDP protocol. So, the right choice should be the External TCP/UDP network load balancer.

Alright, so now you should have a good understanding of the available load balancing options on Google Cloud Platform. If you can remember the four main attributes, you should have no problem identifying the correct load balancer for any scenario.

-->