Google Cloud Platform (GCP) - Load balancing - Understanding load balancer architecture in networking


 Or it could be TCP UDP load balancer. Also, it depends. It depends. So for now, understand that this is an internal load balancer which is within the GCP, within the realm of GC. Hello friends, welcome to this Part two of load balances series.


We have to create two different parts because it was getting very Lendy. In part one, we understood the basic load balancer how it works with the layman example, generic types of load balancers, layer four, layer seven, and the algorithms which we have. And also we ended with a basic understanding of basic types of load balancers on GCP. Now, in Part two, we will dig deep into the architecture of a normal generic Google Cloud load balancer. And at the end we will see a table which I have created to explain all the six different load balancers with specific unique features of every load balancer on GCP.


So I hope you will like this part two. And if you haven't watched Part one, go check that out as it will help you understand it in full context. So enjoy the rest of the video. So friends, I have created this basic architecture diagram of a load balancer on GCP. Now as we know that there are six different load balancers, every load balancer has its own architecture.


The way it works is different from the other, but that would be too vast a topic to cover. So I have created a generic model. And by learning this and by going into the links which I will give in the description, you will get to know more in depth of each load balancer. So suppose there is an application which I have created, and suppose that application is my website, it funded dot com which I have created. And now I want all the users to use that particular website globally.


And then it might happen that the couple of users are from us, from San Francisco and Iowa, and one is maybe from Singapore. And then we have this load balancer configured in front, and then this is the back end. So now this is this particular load balancer is working as an external load balancer because this is allowing all the external users to interact with my backend application. Now this particular what is unique about this particular external Https load balancer is it has a single Anycast IP, or you can say virtual IP, which is common for all these users.


So all these users will interact using one common IP, so they don't have to worry about all these different architecture which is sitting behind the scenes.


Okay, so the Http load balancer will give them this flexibility. So once they will hit that particular IP, they will come into the internal working of Https load balancer. Now there are different components which varies across different load balances, but more or less it will remain the same, be it a TCP UDP or any other network load balancer. Some components will be there. Some components would not be there.


But in Https load balancer, you have a global forwarding rule. So as soon as the request come, this global forwarding rule forwards this to the next step, which is a target proxy. Now when we say target proxy, that means that from this point onwards the IPS of the client will not be preserved. And from this particular point onward, the proxy server will take the ownership to pass on the request further. And then we come to URL map.


Now, URL map is a very important stage for Https load balancer, because in this you can do content based load balance. What is content based load balancing? Suppose if someone wants to directly go and see the playlist my channel, I'm just giving an example. So it funded com playlist. Once they will hit, then maybe this URL map will go back to that particular backend service which is only taking care of that particular module.


Suppose if someone wants to hit and go to videos, then it could be that URL map here itself decides that. Okay, if the URL which is coming is at it under com videos now videos, there could be a separate service which is catering to the video module. So URL map is very important when we do a content based load balancing in Https. Now, when I say Http and https, this is again, as I said, it's a layer seven protocol. And when we sell layer seven protocol, it could be the Http protocol also in Https.


So what ports are coming into picture here? Port 80 80, Port 80, Port 443. All this will come. We will have a summarized view of all these different six load balances at the end. So after the URL map, we will go to the back end service.


Now, this module is the module which goes and interact with the actual servers which are running behind the scenes and this is facing the customer. And this is, you know, this is the back end. So backend service will have a health check module. This health check module will continuously go and check the health of these different back end servers to decide which particular server is the healthiest to take on this new job or take on this new request. And based on the feedback coming from HealthCheck service, back end service will route that into the back end layer.


Now we understood this particular layer, which is the external load balancer. For this case, we have taken Https load balancer. Now moving on in this particular layer once the backend service understands that. Okay, this particular user is from San Francisco. I understand it because the header information tells me our IP address tells me because it is an Https load balancers.


So you can read the content of the request which is coming in because it is that application layer. So based on the request which has come so far, this backend service will now decide that. Ok, I want to go for US central region. But within this central region, which particular zone I have to target? Because as you can see, there are two different web tiers layers which are deployed in zone one and zone two within US central region.


So back end service will decide that once this request is passed on to this particular service, this particular layer, web tier layer, well have an internal load balancer, can have an internal load balancer which will again, now this internal load balancer is specific to the GCP network. And this particular load balancer could be internal Https load balancer also. Or it could be TCP UDP load balancer. Also, it depends. It depends.


So for now understand that this is an internal load balancer which is within the GCP within the realm of GCP. And now this particular load balancer will decide that in the back end instance which is actually. So this is the web tier. This is the application layer. So which particular application node is available to cater to this request, and then you have in the back end you have also your database layer.


Now you can put a network load balancer here also because you can have multiple DB instances here. So you can put it here as well. Now suppose it's Singapore user is coming now Singapore user. Again, the load balancer is intelligent enough to route this request to Asia East. So within Asia East, we have only one zone unlike US, where we have two zones.


So it depends because we always knew that in Singapore we have or in Asia we have less users. We have a bigger user based in US. So that's why we have a different design architecture, highly available architecture in US here. Also, you can have your internal load balancer which will do the same thing. So France, this is the way a load balancer architecture looks.


Now you have different types of load balancer. For example, SSL proxy is a load balancer. It's an external load balancer. It can be used for non Https traffic. So you could have your SSL base connections which would be load balanced using SSL proxy.


Tcp proxy again will not have the SSL encryption. It will simply have unencrypted traffic going through TCP protocol. So it will also be known as TTPs. So in that manner, every load balancer is slightly different from each other. So now we will have a summary of all the different load balances which GCP offers with some features of all these different load balances.


So friends, now this is the crux of this video where I have created this table where we will see specific all six different load balances and some features of these specific load balances. So to start with, we'll start with the external load balancer which have four. So Http has load balancer. It works on Http or Https protocol. As I explained, it is a layer seven load balancer globally distributed.


So you have a unique IP given to the customers, then it is a global load balancer. But when we say global, it depends on what kind of services you are taking from Google in your networking. If you're taking standard service, then it would be regional. But if you're taking premium network service, then it would be global. So it depends on what kind of networking services you are taking proxy or pass through.