در حال بارگذاری ...

Measuring Latency with Ping0:06

Network latency is the amount of time that it takes for data to go from the source to the destination and then back to the source. It's a round trip and it's a lot like you know, the delay between asking a question and getting an answer. In fact, from a technical perspective, we can actually see that with the ping command. We can ping any host and we will see the latency of that connection here. There's an average of 14 milliseconds between my computer.

LAN vs Internet Latency0:28

and we will see the latency of that connection here. There's an average of 14 milliseconds between my computer and laas.dot com, and that might sound like a great number, and it is at least in terms of the internet. But also remember we also have lands. And on a LAN 13 milliseconds is horrible, but latency affects almost everything about a connection. It affects the stability, it can affect the speed, and there are many things that cause latency. For one, it's just distance.

Distance Increases Latency0:59

and there are many things that cause latency. For one, it's just distance. For example, the distance between my computer and my router is very small, but of course I'm also on a LAN, so the latency of that connection is going to be very low. But the latency between my computer and Laracasts is 13 milliseconds, and the server housing, the Laracasts website is many miles away.

Equipment Adds Latency1:22

and the server housing, the Laracasts website is many miles away. So distance is one of the things that cause latency. The other is just networking equipment. The more equipment that you put in between the source and the destination is going to increase the latency because those devices have to process that traffic. And the more traffic that they have to process, the more latency is introduced to the connection. And then the third thing,

Server Load Impacts Latency1:46

the more latency is introduced to the connection. And then the third thing, and this is probably the most important, is just the load on the destination. If the destination is a web server, that web server has to not only process our requests, but all of the hundreds of thousands and even millions of other requests. The more data that it has to process, the slower the responses are going to be,

The more data that it has to process, the slower the responses are going to be, thus increasing the latency. Latency is that tiny and maybe not so tiny delay that makes your connection feel slow, even if your bandwidth is fine.

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟