Search
Listen to this Post.

I came across another fantastic article the other day by Carlos Bueno on the Yahoo! Developer Network Blog entitled An Engineer’s Guide to Bandwidth.” Two things in particular that I really enjoyed about this article:

1. Distinguishing between bandwidth and packets. From the bandipedia.com web site:

“A packet consists of a certain number of bytes. A typical packet contains perhaps 1,000 or 1,500 bytes. Each packet carries the information that will help it get to its destination (i.e. from the sender’s IP address to the intended receiver’s IP address). The packets carry the data via the TCP/IP|Transmission Control Protocol/Internet Protocol (TCP/IP).

Most packets are split into three parts:

The Header – The header contains instructions about the data carried by the packet.

Payload – This is also referred to as the body or data of a packet. This is the actual data that the packet is delivering to the destination. If a packet is fixed-length, then the payload may be padded with blank information to make it the right size.

Trailer- The trailer, sometimes called the footer, typically contains a couple of bits that tell the receiving device that it has reached the end of the packet.”

One of the things I always try and pay attention to when I am optimizing imagery is how many bytes I can reduce out of an image’s size in multiples of 1,460 (the example size used in Carlos’ article). If I can reduce a 13,220 byte image to 10,220 bytes, that is only 3,000 bytes! However, that is THREE packets potentially not needing to be sent.

Right about now, a few reading this are saying “wait a minute! 1460 x 3 = 4,380 bytes. How can only 3,000 bytes equal three packets saved?” That’s the fun part. If you have an image that is 1,461 bytes, and can reduce that image’s size by even one byte, that could theoretically save one whole packet from being sent! That’s because whether one byte or 1,460 bytes are needing to be sent, a full packet is necessary, depending upon Path MTU (Maximum Transmission Unit). From the NetHeaven.com web site: “The full path from one computer to another may travel across many links with different MTUs. The smallest MTU for all the links in a path is the path MTU.”

Makes me even more excited even if I am only pulling out 10-20 bytes from an image’s size…as that 10-20 bytes might be the difference in one unnecessary packet transmission being sent.

2. Packet Latency and Packet Loss. From the article: “Packet Latency is the time it takes a packet to wind through the wires and hops between points A and B. It is roughly a function of the physical distance (at 2/3 of the speed of light) plus the time the packet spends queued up inside various network devices along the way.” Packet loss is basically the failure of a packet to deliver to its end destination, for any variety of potential reasons.

Stating the obvious here, but fewer packets to send through what former Alaska Senator Ted Stevens dubbed as a Series of Tubes (or Jon Stewart’s version of Stevens making that comment…a LOT more entertaining), the fewer the chances of any packets getting lost in transit or delayed in their delivery.

Great job, Carlos! Thanks for the insight.

Print

Something to say?


This site is protected with Urban Giraffe's plugin 'HTML Purified' and Edward Z. Yang's Powered by HTML Purifier. 6422 items have been purified.