{"id":4735,"date":"2009-03-28T00:10:57","date_gmt":"2009-03-28T00:10:57","guid":{"rendered":"http:\/\/alienbabeltech.com\/main\/?p=4735"},"modified":"2009-03-28T00:17:58","modified_gmt":"2009-03-28T00:17:58","slug":"longer-urls-wasting-74mbits-of-bandwidth","status":"publish","type":"post","link":"https:\/\/alienbabeltech.com\/main\/longer-urls-wasting-74mbits-of-bandwidth\/","title":{"rendered":"Longer URL&#8217;s wasting 74Mbit\/s of bandwidth ?"},"content":{"rendered":"<p><span style=\"font-family: arial,helvetica,sans-serif;\">This should get the attention of all the web-developers and administraors out there (<em>ours too<\/em> <em>!<\/em>).\u00a0 John Buswell writes <em>&#8220;Overlooking the obvious, web developers and content management systems using long file and path names are wasting bandwidth. While these are handy to identify and manage objects, they increase the length of HTTP requests, force extra processing on Application Delivery Controllers and waste bandwidth. We look at simple and yet creative ways to reduce bandwidth costs for high traffic sites.&#8221; <\/em><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">In his <a href=\"http:\/\/www.o3magazine.com\/4\/a\/0\/1.html\" onclick=\"_gaq.push(['_trackEvent', 'outbound-article', 'http:\/\/www.o3magazine.com\/4\/a\/0\/1.html', 'article']);\" target=\"_blank\">article<\/a> he looks at techniques a web developer can use to improve the performance of their high traffic web site and how long URL&#8217;s are wasting bandwidth. <\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">To understand this problem we need to understand the basics:<\/span><\/p>\n<blockquote>\n<h4><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Basics: The HTTP GET Request<\/span><\/span><\/h4>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> When a client visits a web site, regardless of whether they click on a link or type the URL directly into their browser, they generate what is called a GET request. The initial GET request pulls down the HTML file, which is then processed, and subsequent links generate new HTTP GET requests, such as CSS, Javascript or Images. The longer the PATH to those links, the larger the HTTP GET request will be. Using telnet we can simulate a HTTP GET request. Here is an example to o3magazine.com. <\/span><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> <\/span><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><br class=\"spacer_\" \/><\/span><\/p>\n<div class=\"oI\">\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> <\/span><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><br class=\"spacer_\" \/><\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">telnet <a href=\"http:\/\/www.o3magazine.com\/\" onclick=\"_gaq.push(['_trackEvent', 'outbound-article', 'http:\/\/www.o3magazine.com\/', 'www.o3magazine.com']);\" class=\"linkification-ext\" title=\"Linkification: http:\/\/www.o3magazine.com\">www.o3magazine.com<\/a> 80 <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Trying 38.106.106.237&#8230; <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Connected to <a href=\"http:\/\/www.o3magazine.com\/\" onclick=\"_gaq.push(['_trackEvent', 'outbound-article', 'http:\/\/www.o3magazine.com\/', 'www.o3magazine.com']);\" class=\"linkification-ext\" title=\"Linkification: http:\/\/www.o3magazine.com\">www.o3magazine.com<\/a> (38.106.106.237). <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Escape character is &#8216;^]&#8217;. <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">GET \/index.html HTTP\/1.1 <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">host: <a href=\"http:\/\/www.o3magazine.com\/\" onclick=\"_gaq.push(['_trackEvent', 'outbound-article', 'http:\/\/www.o3magazine.com\/', 'www.o3magazine.com']);\" class=\"linkification-ext\" title=\"Linkification: http:\/\/www.o3magazine.com\">www.o3magazine.com<\/a><\/span><\/span> <\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">HTTP\/1.1 200 OK <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Server: nginx\/0.6.35 <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Date: Fri, 27 Mar 2009 00:30:37 GMT <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Content-Type: text\/html <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Content-Length: 15954 <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Last-Modified: Fri, 27 March 2009 00:30:06 GMT <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Connection: keep-alive <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Accept-Ranges: bytes <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> <\/span><\/span><\/li>\n<li><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">&#8230;. HTML document is returned &#8230;.<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> <\/span><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><br class=\"spacer_\" \/><\/span><\/p>\n<\/div>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> <\/span><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">So the GET request consists of GET \/URL HTTP\/1.1. For o3magazine, the next GET request would be for \/c\/0.css. o3magazine already optimized its filenames, so it will produce a smaller GET request. Compare that to say techcrunch.com, the next GET request would be for \/wp-content\/themes\/techcrunchmu\/style.1238108540.css. Assuming UTF-8 encoding, and standard ASCII characters then each character is represented by one byte. The shorter o3magazine GET request will use four bytes for the GET and whitespace, then eight bytes for the \/c\/0.css and nine bytes for the trailing information. This is a grand total of 21 bytes. The longer techcrunch request will share the GET and trailer, so thats thirteen bytes, then it has 52 bytes for its request. This is a grand total of 65 bytes, over three times the size of the shorter request. <\/span><\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">You may be thinking its only 65 bytes, who cares in these days of 2TB hard disk drives and &gt;20 Mbps internet. Read on to find out what happens next when the author applies his logic to techcruch.com and Facebook. <\/span><\/p>\n<blockquote>\n<h4><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Factoring in the masses<\/span><\/span><\/h4>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> Using data from compete.com, techcrunch gets at least 7,650,594 visits a month. This is roughly 246,793 per day. So in a single day, techcrunch has wasted 2,531MB downstream, and 603MB of upstream. Over the space of a month, Techcrunch has wasted 78,461MB and 18,693MB in unnecessary data transfer. That is approximately 232k\/sec of bandwidth (sustained). No big deal right? Its just 232k\/sec. <\/span><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\"> <\/span><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><span style=\"color: #ffff00;\">Perhaps a valid point until the concept is applied to the 100+ character URL happy Facebook home.php page. There are roughly 150 source file references on this page, and rounding down to about 100 HREF requests for arguments sake. Being generous, assuming 80 bytes of waste per URL. Thats 12000 bytes of upstream, and 20000 bytes of downstream waste. So using data again from compete.com, facebook has 1,273,004,274 visits per month. This is roughly 41,064,654 requests per day. So on a single day, the folks over at facebook have wasted roughly 783GB downstream and 469GB upstream. This works out to be 74Mbit\/sec downstream and 44MBit\/sec upstream of bandwidth. <\/span><\/span><\/p>\n<\/blockquote>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">Read the full article <a href=\"http:\/\/www.o3magazine.com\/4\/a\/0\/1.html\" onclick=\"_gaq.push(['_trackEvent', 'outbound-article', 'http:\/\/www.o3magazine.com\/4\/a\/0\/1.html', 'here']);\" target=\"_blank\">here<\/a><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><br \/>\n <\/span><\/p>\n<blockquote>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">Please join us in our <a href=\"http:\/\/alienbabeltech.com\/abt\/index.php\" target=\"_blank\">Forums<\/a><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">Follow us on <a href=\"http:\/\/twitter.com\/alienbabeltech\" onclick=\"_gaq.push(['_trackEvent', 'outbound-article', 'http:\/\/twitter.com\/alienbabeltech', 'Twitter']);\" target=\"_blank\">Twitter<\/a><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">For the latest updates from ABT, please <a href=\"http:\/\/alienbabeltech.com\/main\/?feed=rss2\" target=\"_blank\">join our RSS News Feed<\/a><\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>This should get the attention of all the web-developers and administraors out there (ours too !).\u00a0 John Buswell writes &#8220;Overlooking the obvious, web developers and content management systems using long file and path names&#46;&#46;&#46;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[598,597,596],"class_list":["post-4735","post","type-post","status-publish","format-standard","hentry","category-news","tag-long-url-waste-bandwidth","tag-longer-url","tag-url"],"_links":{"self":[{"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/posts\/4735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/comments?post=4735"}],"version-history":[{"count":0,"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/posts\/4735\/revisions"}],"wp:attachment":[{"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/media?parent=4735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/categories?post=4735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alienbabeltech.com\/main\/wp-json\/wp\/v2\/tags?post=4735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}