1
00:00:00,500 --> 00:00:06,530
Let us now look at another type of service known as the load balancer type.

2
00:00:07,700 --> 00:00:15,530
So we have seen the port service that helps us make an external facing application available on a port,

3
00:00:15,530 --> 00:00:22,130
on the worker notes, so let's turn our focus to the front end applications, which are the voting app

4
00:00:22,130 --> 00:00:23,090
and the result app.

5
00:00:23,840 --> 00:00:28,820
Now, we know that these pods are hosted on the worker nodes in the cluster.

6
00:00:29,090 --> 00:00:36,770
So let's say we have a four node cluster and to make the applications accessible to external users,

7
00:00:37,040 --> 00:00:40,400
we create these services of type node port.

8
00:00:41,140 --> 00:00:48,410
Now the services with type node port help in receiving traffic on the ports, on the notes and routing

9
00:00:48,410 --> 00:00:50,120
the traffic to the respective ports.

10
00:00:50,900 --> 00:00:55,280
But what you, Earl, would you give your end users to access the applications?

11
00:00:55,530 --> 00:01:02,630
You could access any of these two applications using IP of any of the nodes and the high port?

12
00:01:04,180 --> 00:01:10,740
The services exposed on, so that would be for port combinations, for the voting app and for IP and

13
00:01:10,740 --> 00:01:14,520
port combination for the result app, so not bad.

14
00:01:14,760 --> 00:01:21,360
Even if your ports are only hosted on two of the nodes, they will still be accessible on the apps of

15
00:01:21,360 --> 00:01:22,740
all the nodes in the cluster.

16
00:01:23,460 --> 00:01:28,230
Say the parts for the voting app are only deployed on the nodes with IP 70 and seventy one.

17
00:01:28,620 --> 00:01:31,910
They would still be accessible on the ports of all the nodes in the cluster.

18
00:01:32,580 --> 00:01:35,100
So that's how a service is configured.

19
00:01:35,580 --> 00:01:40,170
So you would share these you URLs to your users to access the application.

20
00:01:40,560 --> 00:01:42,380
But that's not what the end users want.

21
00:01:42,420 --> 00:01:50,670
They need a single you RL like example voting app dot com or the example a result app dot com to access

22
00:01:50,670 --> 00:01:51,420
the application.

23
00:01:51,810 --> 00:01:53,920
So how do you achieve that now?

24
00:01:54,030 --> 00:02:01,290
One way to achieve this is to create a new VM for a load balancer purpose and install and configure

25
00:02:01,290 --> 00:02:10,230
a suitable load balancer on it like a proxy or engine X, etc. and then configure the load balancer

26
00:02:10,230 --> 00:02:12,660
to route traffic to the underlying notes.

27
00:02:13,530 --> 00:02:20,400
Now, setting all of that external load balancing and then maintaining and managing, that can be a

28
00:02:20,400 --> 00:02:21,330
tedious task.

29
00:02:22,540 --> 00:02:30,700
However, if we were on a supported cloud platform like Google Cloud or A.W. or Azure, I could leverage

30
00:02:30,700 --> 00:02:33,850
the negative load balancer of that cloud platform.

31
00:02:34,930 --> 00:02:42,130
Netas has support for integrating with the native load balancers of certain cloud providers and configuring

32
00:02:42,130 --> 00:02:43,890
and configuring that for us.

33
00:02:44,470 --> 00:02:52,000
So all you need to do is set the service type for the front end services to load balancer instead of

34
00:02:52,000 --> 00:02:52,540
node port.

35
00:02:53,110 --> 00:03:01,330
Now remember that this only works with separate cloud platforms, so GCP areas and Azure are definitely

36
00:03:01,330 --> 00:03:01,810
supported.

37
00:03:02,200 --> 00:03:04,810
So if you set the type of service to load balancer.

38
00:03:06,280 --> 00:03:14,290
In an unsupportive environment like virtual box or any other environment, then it would have the same

39
00:03:14,290 --> 00:03:23,310
effect as setting it to Northport, where the services are exposed on a high end port on the notes there,

40
00:03:23,320 --> 00:03:28,090
it just won't do any kind of external load balancer configuration.

41
00:03:28,480 --> 00:03:28,770
Right.

42
00:03:28,810 --> 00:03:35,920
So later on, when we walk through the demos of deploying our application on cloud platforms, we will

43
00:03:35,920 --> 00:03:37,540
see this in action.

44
00:03:37,840 --> 00:03:38,160
Right.

45
00:03:38,470 --> 00:03:39,340
So that's it for now.

46
00:03:39,520 --> 00:03:41,650
I will see you in the next lecture.
