Sunday, January 20, 2013

Communication Speed

Continuing in my (just starting) series of explaining the underpinnings of internet communication, I'd like to discuss PING.

This is, of course, a follow up to my posting about Bandwidth.

PING is the time it takes to transmit a simple (usually very small 100bytes or less) packet of information, for your system to a remote system, and back again.  The return trip is often referred to as a "Pong".

Ping has several factors that can contribute to the time it takes to communicate. These factors include the number of nodes between you and the destination.  these nodes can be entire networks, single routers, a computer, or just about anything designed to relay information from one connection to another.  Typically, the more complicated the system, the longer the time a router (or other type of relaying device) will take to forward a packet.

My complicated, I mean that some routers are setup to perform various intrusion prevention scans, antivirus and antimalware detection, etc.  There's also a number of rules that the information needs to be scanned to check for a match, before the router will allow the packet to be forwarded.  In addition to that, the more complicated the routing table on-board on that device, the longer it can take to find a match.

Let's compare the typical home-based router, to a corporate-level router with integrated firewall.

On the consumer end, the most complicated thing the device is doing is called Network Address Translation.  This type of NAT is one-to-many; meaning one address (on the internet) to many addresses (internally on the network), so your PC is on the network, all the router has to do is forward the information, and track who is sustaining the connection (so it knows to send responses to you).  On the other hand, with a corporate firewall, often it will have a few-to-many NAT (meaning multiple internet addresses for maintaining connections for a v.large group of systems); it will have to monitor which connection on which address goes to which internal system... there's a long, very complicated way in which it does this... I won't elaborate for now.  In addition to keeping track of a lot more sessions, the router also performs security profile matching, meaning the systems administrator will define firewall rules to say X type of traffic from X networks is not allow to talk to X systems - in a typical high-end network, there are thousands of these types of commands, both allowing, and disallowing network traffic to/from certain locations.  The router will also often have a network antivirus and antimalware system embedded, where it will scan all network traffic to ensure no viruses or malware is matched coming in or out of the network.  After all that, the router can finally pass the traffic.

All in all, the corporate router will take longer to process the packet, but usually not by much, since often they're built on much more capable hardware.

Transaction time through a router or entire network, can take tens of miliseconds. it doesn't sound like a lot, but it is.  You're only dealing with about 1.5kb of information at a time, and millions of these tiny packets of information need to be processed almost all the time; depending on network load.  I've mentioned the figure of about 10ms here, to contrast between transaction times.

Most switching methods (this is different than routing, which I was talking about above), use store-and-forward methods of transmission, this ensures a high data consistency rate.  Basically it weeds out the errors.  It does a good job at this, and considering the transaction times for 100megabit and gigabit networking, for the average packet, the speed gains using another method for forwarding, are nearly non-existant.  That being said, in a 100mbit network, the time it takes to process a packet through the connection at wire-speed, is aproximately 12microseconds.  Considering that's about 0.012 ms (miliseconds), that's a good, short amount of time to have a transaction. At gigabit networking, that number is further reduced to 1.2 microseconds, or 0.0012 ms.  Compare that to the 10ms or so, for a routed transaction, and you start to see the value in switching when you can, and routing when you have to.

With all this in the mix, faster network speeds; moving up from megabit to gigabit, or even higher, isn't always about network capacity. it's about network linespeed. being able to transact a message between two points in as short of an amount of time as possible.

These times are specifically important when dealing with online gaming.  Gamers refer to the phenomenon of having "high ping times" (somewhere above 100ms) as "LAG"  though, most lag can be attributed to the server going unresponsive for a fraction of a second.

With this said, this is the primary reason why so many gamers choose to have "LAN Parties" - they have the lowest ping time over a local LAN (12 microseconds or so), so LAG is almost entirely eliminated as a possibility.

One other good reason to have the lowest ping times possible is in the case of VoIP.  You may not realize it, but VoIP is becoming very popular.  If you own a cellphone with the ability to make a call over WIFI, you're using VoIP.  Almost all business telephones are now based on VoIP technology.  Many ISPs and telephone providers that deliver information to your home in any manner other than the standard 2-wired RJ11 telephone jack, is using VoIP to deliver that information to your doorstep.  In terms of VoIP, delay in delivering sound to your destination is referred to as "jitter".  You can test your jitter at Pingtest.net. The functional result of jitter is gaps and bursts in speech.

It's important to deliver information from end-to-end as quickly as can be possible done, however there's a limit where costs meets practicality  we won't be seeing 10gigabit networks hitting homes in the next year, but they'll eventually become necessary.  Hopefully by the time we need that much capacity, that quick of a transaction, these technologies will be very affordable.

No comments:

Post a Comment