PRIYANKA VERGADIA: Welcome to Google Cloud Drawing
Board, where we learn our way through the cloud.
Today's topic-- what is Cloud Load Balancing?
This video is divided into chapters.
Watch the full video or skip ahead
to any section of your choice.
Sam's new application has been a hit.
Users are growing across the world, but Sam is worried.
How would she scale, optimize, and secure the app,
while keeping the users happy?
That's where Cloud Load Balancing comes in.
It is a fully-distributed, software-defined solution
that balances user traffic to multiple backends
to avoid congestion and ensure low latency.
There are different types of load balancing,
depending on the type of traffic you are dealing with,
global or regional.
Let's understand these options with a use case.
Say you have user Shen in California.
You deploy your backend instances in that region
and configure a load-balancing virtual IP.
When your new users grow to another region,
all you need to do is to create instances
in the additional regions.
There is no change in the virtual IP or the DNS service
settings.
As your app grows global, the same pattern can follow.
You see that Maya from India is routed
to the instances in India.
Now, if the instances in India are overloaded
and are autoscaling to handle the load,
that user will seamlessly be redirected
to the other instance in the meantime,
and routed back to India when instances
have scaled sufficiently to handle that load.
We just saw that Cloud Load Balancing
uses anycast virtual IPs, giving you a single global frontend
virtual IP address.
It also provides cross-regional failover, fast autoscaling,
and scales to millions of queries per second.
That is external load balancing at layer 7.
But in any three-tier app, after the frontend,
you have the middleware and the data sources
to interact with in order to fulfill a user's request.
That's where you need layer 4, internal load
balancing between the frontend and the other internal tiers.
Layer 4 internal load balancing is really for TCP/UDP traffic
behind RFC 1918 VIP, where the client IP is preserved.
You'll get the automatic health checks,
and there's really no middle proxy.
It leverages the software-defined networking
controls and data plane for load balancing.
Now let's see how the data model for Cloud Load Balancing
actually works.
For global HTTPS load balancing, you
have the global anycast virtual IPs, IPv4 or IPv6,
associated with the forwarding rule, which directs traffic
to a target proxy.
The target proxy terminates the client's session.
And for HTTPS, you deploy your certificates here.
This is not a single device, but distributed logic
throughout the infrastructure.
The URL map configured provides layer 7 routing
and directs the client request to the appropriate backend
service.
The backend services can be managed instance groups
or network endpoint groups for your containerized workloads.
This is also where service capacity and health
is determined, and Cloud CDN is enabled to cache content
for improved performance.
You can set up firewall rules to control traffic
to and from your backend here.
Internal load balancing setup works the same way.
We still have a forwarding rule, but here, it points directly
to a backend service.
The forwarding rule has the virtual IP address, protocol,
and up to five ports.
Now, security-- as a best practice,
we encourage you to run SSL everywhere.
With HTTPS and SSL proxy load balancing,
you can use Google-managed certs,
where Google takes care of the provisioning
and managing the SSL certificate lifecycle for you.
And Cloud Load Balancing supports multiple SSL
certificates, as well, if you wanted
to serve multiple domains using the same load-balancing IP
address and port.
Global load balancing absorbs and dissipates
layer 3, 4 volumetric attacks across Google's
global load-balancing infrastructure.
Additionally, by using Cloud Armor,
you can protect against layer 3 to 7 application level attacks.
And by using Identity Aware Proxy and firewalls,
you can authenticate and authorize access
to your backends.
How to choose the right load-balancing option?
For deciding which load-balancing option is right
for you, consider factors such as internal versus external,
global versus regional, type of traffic--
HTTPS, TLS, UDP.
And based on these factors, decide
which one is right for you.
If you are looking to reduce latency, improve performance,
security, and optimize cost for your backend systems,
then check out Cloud Load Balancing.
It is easy to deploy in just a few clicks, set up the frontend
and backends associated with the global VIPs,
and you're good to go.
Want to learn more?
Check out cloud.google.com/loadbalancing.
[MUSIC PLAYING]