Hello and welcome back.
In this video, we are going to discuss about throughput in the last video we have discussed about latency
and for latency, we said that it is how long it takes for your data to traverse a system.
So we take consideration of the time, that is latency.
But when we talk about throughput, it is how much work a machine can perform in a given period of time.
So throughput is focused on the work side.
And when we talk about throughput, we are typically referring to how much data can be transferred from
one point of a system to another point of a system in a given amount of time.
Now typically we measure our throughput in gigabits per second or kilobits per second or megabits
per second.
For an example, let's say you have a network of one gigabits per second, which literally means that
this network can support one gigabit per second, or you can say that billion bits per second.
Now to understand this, we can take an example of an image.
So look over this image here.
We have four clients issuing requests to this server, but in actual time, it could be thousands of
client all issuing requests to this server.
So here in this case, what is going to be the throughput?
So throughput in this case would be how many request this server can handle in a given amount of time
or in this case, a second.
And if I say more specifically and if I reduce these requests to bit level, then how many bits this
server can handle or let through per second.
So we will notice one thing.
There will always going to be a bottleneck where you can fit so many bits during a given amount of time
because every network has its peak capacity, you cannot fit more bits than supported.
So to repeat that, what is throughput?
So how many bits your server can handle or you can fit in your server in a given amount of time.
So that is going to be your throughput.
Not the question that is asked mostly is how to increase your throughput.
So the basic answer is you pay for it.
Now, this is a very basic answer and not appropriate for all cases.
So think of an example.
Let's say your servers are hosted on AWS, or in theory you pay AWS to increase your throughput.
And there is one reason.
That's why I said it.
It's a very basic thing to do and maybe not appropriate in every scenario, because just increasing your
throughput is not going to fix a potential problem in your system.
So let's take an example of Facebook search.
Perhaps you will serve millions of requests per second.
And in this case, just trying to blindly increase your throughput will not make any sense.
And perhaps you will face the bottleneck and your server start to crash because they are not able to
serve your request well.
So what is the solution?
So the better way to fix this is to have multiple servers.
So in this case, what you are seeing, we have three servers instead of one, and the requests are
divided between multiple servers.
Now, this is better because each server will serve request according to their capacity, not more than
that.
And if you have more load, you can increase the server.
But that's not how it is implemented.
We need to implement some more technologies behind it to get it right.
And that's why we have something known as load balancing and stuff like that.
But we are going to study that in later section.
So in this video, what we have learned, so we have learned about throughput and we have seen that
how bottleneck can happen and how we can get through it.
So that's it for this video.
I hope you enjoyed it.
See you soon.
Goodbye.