This lab walks you through Cloud Load Balancing.
You will be creating a TCP Load Balancer.
You will be creating a Firewall Rule.
You will be reserving an External IP Address.
You will be configuring the target pools.
You will be creating health checks.
Duration: 60 minutes
Load balancers are used to distribute the traffic load between a group of instances. It is done to ensure that system or servers doesn't get overwhelmed and all the requests are served easily and efficiently
Many high traffic websites serve numerous concurrent requests(can be hundreds of thousands or millions) from users or clients and return the correct response including text, images, video, or application data, all in one in a fast and reliable manner. Sometimes you might have all experienced visiting your favorite website, and getting connection timeout errors, or images and videos buffering a lot of the times, this might be because the website backend is not able to effectively scale to meet these high volumes.
The solution here is to add more backend servers to help serve the traffic and then distribute the traffic to those backend servers based on the capacity and health of servers. That's where load balancing comes into the picture.
It helps you distribute traffic in single or multiple regions.
It meets your high availability requirements.
It scales your instances up or down with intelligent Autoscaling.
To manage load at Layer 4, Google Cloud refers to this as TCP/UDP Load Balancing.
You should always try to handle traffic at the lower layers of the network stack, it will provide the best performance.
To manage load at Layer 7, it handles complex traffic side, such as HTTP and HTTPS requests. Google Cloud refers to this as Google Cloud HTTP(S) Load Balancing.
Load balancing can be complex at the higher layers but it comes with more advanced options such as you can route traffic based on content.
You can scale your applications without pre-warming using Cloud Load Balancing. You can distribute your resources in single or multiple regions, close to your users, or based on health to meet your high availability requirements because the IP is anycast.
Load Balancing can be done on existing instances or Instance groups.
You can reserve an External IP Address behind which you can put your Load Balancer. You can use this IP to run your application.
It will detect unhealthy instances.
The above architectural diagram shows users in India, New York, and Sydney. They're all connecting into their backend resources, which are App A, App B, and App C. When a user in Sydney connects into the US backend server, the traffic ingresses closest to Sydney because the range is anycasted, then the traffic is routed to the regional backend.
Login into GCP Console.
Creating a Firewall Rule.
Reserving an External IP address.
Creating Target pools.
Creating forwarding rules.
Creating a health check.