1
00:00:00,240 --> 00:00:01,360
Hello and welcome back.

2
00:00:01,380 --> 00:00:07,620
In this video, we are going to discuss about throughput in the last video we have discussed about latency

3
00:00:07,980 --> 00:00:14,300
and for latency, we said that it is how long it takes for your data to traverse a system.

4
00:00:14,580 --> 00:00:18,790
So we take consideration of the time, that is latency.

5
00:00:18,930 --> 00:00:25,650
But when we talk about throughput, it is how much work a machine can perform in a given period of time.

6
00:00:25,650 --> 00:00:28,200
So throughput is focused on the work side.

7
00:00:28,590 --> 00:00:35,160
And when we talk about throughput, we are typically referring to how much data can be transferred from

8
00:00:35,160 --> 00:00:39,990
one point of a system to another point of a system in a given amount of time.

9
00:00:40,380 --> 00:00:47,100
Now typically we measure our throughput in gigabits per second or kilobits per second or megabits

10
00:00:47,100 --> 00:00:47,850
per second.

11
00:00:48,180 --> 00:00:55,380
For an example, let's say you have a network of one gigabits per second, which literally means that

12
00:00:55,380 --> 00:01:02,450
this network can support one gigabit per second, or you can say that billion bits per second.

13
00:01:02,820 --> 00:01:06,410
Now to understand this, we can take an example of an image.

14
00:01:06,780 --> 00:01:08,700
So look over this image here.

15
00:01:08,700 --> 00:01:14,430
We have four clients issuing requests to this server, but in actual time, it could be thousands of

16
00:01:14,430 --> 00:01:17,380
client all issuing requests to this server.

17
00:01:17,670 --> 00:01:20,760
So here in this case, what is going to be the throughput?

18
00:01:21,000 --> 00:01:28,080
So throughput in this case would be how many request this server can handle in a given amount of time

19
00:01:28,080 --> 00:01:30,260
or in this case, a second.

20
00:01:30,720 --> 00:01:37,500
And if I say more specifically and if I reduce these requests to bit level, then how many bits this

21
00:01:37,500 --> 00:01:41,540
server can handle or let through per second.

22
00:01:42,090 --> 00:01:43,800
So we will notice one thing.

23
00:01:44,070 --> 00:01:49,920
There will always going to be a bottleneck where you can fit so many bits during a given amount of time

24
00:01:49,920 --> 00:01:56,480
because every network has its peak capacity, you cannot fit more bits than supported.

25
00:01:56,790 --> 00:01:58,610
So to repeat that, what is throughput?

26
00:01:58,890 --> 00:02:04,460
So how many bits your server can handle or you can fit in your server in a given amount of time.

27
00:02:04,680 --> 00:02:06,300
So that is going to be your throughput.

28
00:02:06,600 --> 00:02:11,410
Not the question that is asked mostly is how to increase your throughput.

29
00:02:12,210 --> 00:02:15,380
So the basic answer is you pay for it.

30
00:02:15,990 --> 00:02:21,360
Now, this is a very basic answer and not appropriate for all cases.

31
00:02:21,840 --> 00:02:22,980
So think of an example.

32
00:02:22,980 --> 00:02:31,080
Let's say your servers are hosted on AWS, or in theory you pay AWS to increase your throughput.

33
00:02:31,560 --> 00:02:32,760
And there is one reason.

34
00:02:32,760 --> 00:02:34,040
That's why I said it.

35
00:02:34,050 --> 00:02:41,460
It's a very basic thing to do and maybe not appropriate in every scenario, because just increasing your

36
00:02:41,460 --> 00:02:45,300
throughput is not going to fix a potential problem in your system.

37
00:02:45,690 --> 00:02:48,120
So let's take an example of Facebook search.

38
00:02:48,270 --> 00:02:52,530
Perhaps you will serve millions of requests per second.

39
00:02:52,830 --> 00:02:58,380
And in this case, just trying to blindly increase your throughput will not make any sense.

40
00:02:58,620 --> 00:03:05,010
And perhaps you will face the bottleneck and your server start to crash because they are not able to

41
00:03:05,040 --> 00:03:06,530
serve your request well.

42
00:03:06,750 --> 00:03:08,100
So what is the solution?

43
00:03:08,340 --> 00:03:12,660
So the better way to fix this is to have multiple servers.

44
00:03:13,290 --> 00:03:18,330
So in this case, what you are seeing, we have three servers instead of one, and the requests are

45
00:03:18,330 --> 00:03:20,460
divided between multiple servers.

46
00:03:20,790 --> 00:03:27,840
Now, this is better because each server will serve request according to their capacity, not more than

47
00:03:27,840 --> 00:03:28,200
that.

48
00:03:28,590 --> 00:03:31,530
And if you have more load, you can increase the server.

49
00:03:31,800 --> 00:03:33,960
But that's not how it is implemented.

50
00:03:34,140 --> 00:03:38,130
We need to implement some more technologies behind it to get it right.

51
00:03:38,280 --> 00:03:42,720
And that's why we have something known as load balancing and stuff like that.

52
00:03:43,020 --> 00:03:46,190
But we are going to study that in later section.

53
00:03:46,650 --> 00:03:51,750
So in this video, what we have learned, so we have learned about throughput and we have seen that

54
00:03:51,750 --> 00:03:55,440
how bottleneck can happen and how we can get through it.

55
00:03:55,830 --> 00:03:57,180
So that's it for this video.

56
00:03:57,180 --> 00:03:58,460
I hope you enjoyed it.

57
00:03:58,860 --> 00:03:59,580
See you soon.

58
00:03:59,580 --> 00:04:00,090
Goodbye.
