Ping me once you reach home.
Doesn't it feel good when our partner says that?
The faster we get that ping, the happier and relieved we are.
Though the ping used in the above context has a different meaning from ping in Network, it follows a similar concept.
Ping in Network systems is an abbreviation for "Packet Internet or Inter-Network Groper". In simple words, it's a small packet of data sent to a server and if the server replies back with a response ping, it means the server is alive and a network can be established between them.
The term ICMP is used in the above image, it stands for "Internet Control Message Protocol", It's the network layer protocol devices in network use, in simple words, it's a rule guide.
And what's that RTT? - It's the round trip time.
RTT = The amount of time it took for a ping to reach the receiver + time taken for a response to reach the sender from the receiver. It's measured in milliseconds.
So, if I ping google.com and the packet takes 30ms to hit their server and another 30ms to reach me, The RTT or commonly called latency is 60ms. So, it's shown as a 60ms ping or the network's latency is 60ms.
A couple of other examples:
- Latency when you send a meme to your homie ~70ms.
- Latency when you text your crush ~100000000000ms. [The network is good but he/she doesn't think you are]
We want video games and video calls to be real-time, it would suck if I, my friend launch an attack at the same time, but he has 40ms ping and I have 1000ms ping, so, his attack kills me even before the command I sent reaches the game server.
The lesser time it takes to send and receive a ping, the better is the network, we might not notice much difference at 100ms ping but at 1000ms ping, we are a full one second behind what's happening in realtime.
PS: Don't confuse latency with internet speed, internet speed does affect the latency but there are other factors too, like distance from the server, your router, the ISP, etc.
That is why, while gaming online or using apps like discord, there are options to change servers based on ping.
The smaller the ping value, the faster the data transfer leading to a better experience.