Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Networking IT

Are Long URLs Wasting Bandwidth? 379

Ryan McAdams writes "Popular websites, such as Facebook, are wasting as much as 75MBit/sec of bandwidth due to excessively long URLs. According to a recent article over at O3 Magazine, they took a typical Facebook home page, looked at the traffic statistics from compete.com, and figured out the bandwidth savings if Facebook switched from using URL paths which, in some cases, run over 150 characters in length, to shorter ones. It looks at the impact on service providers, with the wasted bandwidth used by the subsequent GET requests for these excessively long URLs. Facebook is just one example; many other sites have similar problems, as well as CMS products such as Word Press. It's an interesting approach to web optimization for high traffic sites."
This discussion has been archived. No new comments can be posted.

Are Long URLs Wasting Bandwidth?

Comments Filter:
  • by slummy ( 887268 ) <shawnuthNO@SPAMgmail.com> on Friday March 27, 2009 @06:06PM (#27364295) Homepage
    Wordpress by default allows you to configure URL writing. The default is set to something like: http://www.mysite.com/?p=1 [mysite.com].

    For SEO purposes it's always handy to switch to the more popular example: http://www.mysite.com/2009/03/my-title-of-my-post.html [mysite.com].

    Suggesting that we cut URL's that help Google rank our pages higher is preposterous.
  • by Anonymous Coward on Friday March 27, 2009 @06:08PM (#27364311)

    Sure they can

    TinyURL [tinyurl.com]

  • by Foofoobar ( 318279 ) on Friday March 27, 2009 @06:08PM (#27364315)
    The PHPulse framework [phpulse.com] is a great example of a better way to do it. It uses one variable sent for all pages which it then sends to a database (rather than an XML page) where it stores the metadata of how all the pages interelate. As such, it doesn't need to parse strings, it is easier to build SEO optimized pages and it can increase page load times by 10 times over other MVC frameworks.
  • Wordpress? (Score:4, Informative)

    by BradyB ( 52090 ) on Friday March 27, 2009 @06:09PM (#27364335) Homepage

    By default Wordpress produces short urls.

  • by nysus ( 162232 ) on Friday March 27, 2009 @06:11PM (#27364367)

    This is ridiculous. If I have a billion dollars, I'm not going to worry about saving 50 cents on a cup of coffee. The bandwidth used by these urls is probably completely insignificant.

  • Wow. Just wow. (Score:4, Informative)

    by NerveGas ( 168686 ) on Friday March 27, 2009 @06:11PM (#27364379)

    75 whole freaking megabits? WOWSERS!!!!

    They must be doing gigabits for images, then. Complaining about the URLs is complaining about the 2 watts your wall-wart uses when idle, all the while using a 2kW air conditioner.

  • by Skal Tura ( 595728 ) on Friday March 27, 2009 @06:17PM (#27364487) Homepage

    it's actually not even 0.15Kb, it's 0.146kb >;)

    and 100mil hits, 1kb saved = 95.36Gb saved.

    You mixed up marketing, and in-use computer kilos, gigas etc. 1Kb !== 1000 bytes, 1Kb === 1024bytes :)

  • by FooBarWidget ( 556006 ) on Friday March 27, 2009 @06:25PM (#27364587)

    I've always found stories along the lines of "$ENTITY wastes $X amount of $RESOURCE per year" dubious. Given enough users who each use a piece of $RESOURCE, the total amount of used resources will always be large no matter how little each individual user uses. There's no way to win.

  • by Anonymous Coward on Friday March 27, 2009 @06:27PM (#27364609)

    That's not compression, that's hashing.

  • Re:Waste of effort (Score:5, Informative)

    by HeronBlademaster ( 1079477 ) <heron@xnapid.com> on Friday March 27, 2009 @06:40PM (#27364791) Homepage

    This very type of analysis is what YSlow [yahoo.com] is for :)

  • by jd ( 1658 ) <imipak@yahoGINSBERGo.com minus poet> on Friday March 27, 2009 @06:48PM (#27364911) Homepage Journal

    Most of the time, yes, but then there's a question of trade-off. Small URLs are generally hashes and are hard to type accurately and hard to remember. On the other hand, if you took ALL of the sources of wastage in bandwidth, what percentage would you save by compressing pages vs. compressing pages + URLs or just compressing URLs?

    It might well be the case that these big web services are so inefficient with bandwidth that there are many things they could do to improve matters. In fact, I consider that quite likely. Those times I've done web admin stuff, I've rarely come across servers that have compression enabled.

  • by Foofoobar ( 318279 ) on Friday March 27, 2009 @07:24PM (#27365369)
    heh, yes. I was thinking increase numbers of pages loaded and decrease page load at same time. But yeah, the benchmarks are impressive. I even tried testing the system using it with a HEAP database just to see how fast it would be and there was no difference; all the data is indexed and cached so well that HEAP was pointless.

    Of course, it's a totally different paradigm that requires a database instead of XML for the page metadata. But what it enables in being able to relate the sections of the site to one another and the pages is a an increase in functionality and speed over conventional methodologies.
  • by x_MeRLiN_x ( 935994 ) on Friday March 27, 2009 @07:53PM (#27365719)

    Using a cookie, TinyURL allows you to enable previews [tinyurl.com], i.e., view where a TinyURL points to before following the link.

  • by the_one(2) ( 1117139 ) on Friday March 27, 2009 @07:57PM (#27365779)

    Have you tried compiling the whitespace [dur.ac.uk] =)

  • Re:Irrelevant (Score:4, Informative)

    by Anonymous Coward on Friday March 27, 2009 @09:02PM (#27366377)

    You missed the previous paragraph of the article where they explained where they got the 20k value, perhaps you should read the article first. :)

    They rounded down the number of references, but on an average Facebook home.php file there are 250+ HREF or SRC references in excess of 120 characters. They took that these could be shaved by 80 bytes each. Thats 80 bytes x 250 references = 20,000 bytes or 20k.

    Your math is wrong, its taking into account just one URL, when there are 250 references on home.php alone! They did not even factor in more than one page view per visit. If they did it your way, you would be looking at far more bandwidth utilization that 74MBit/sec.

  • by dgatwood ( 11270 ) on Friday March 27, 2009 @09:09PM (#27366447) Homepage Journal

    And even with the wink, this still got initially moderated "Interesting" instead of "Funny".... *sigh*

    To clarify the joke for those who don't "GET" it, in HTTP, POST requests are either encoded the same way as GET requests (with some extra bytes) or using MIME encoding. If you use a GET request, the number of bytes sent should differ by... the extra byte in the word "POST" versus "GET" plus two extra CR/LF pairs and a CR/LF-terminated Content-length header, IIRC.... And if you use MIME encoding for the POST content, the size of the data balloons to orders of magnitude larger unless you are dealing with large binary data objects like a JPEG upload or something similar.

    So basically, a POST request just hides the URL-encoded data from the user but sends almost exactly the same data over the wire.

  • by smellotron ( 1039250 ) on Friday March 27, 2009 @09:40PM (#27366725)

    You're missing the joke... GET requests look like this:

    GET /url?a=b&c=d HTTP/1.0

    POST requests look like this:

    POST /url HTTP/1.0
    a=b&c=d

    Same amount of content... URL looks shorter, but the exact same data as the querystring gets sent inside the request body. Thus, switching from GET to POST does not alter the bandwidth usage at all, even if it makes the URL seen in the browser look shorter.

  • by corychristison ( 951993 ) on Saturday March 28, 2009 @03:14AM (#27368411)

    This is a very, very simple method. You seem to want to make it out to be the best thing in the world. The problem is, it needs some form of descriptive characteristic.

    In my own little personal CMS/framework I do it similarly, except with a 1-16 character string. This way I can set some form of description.

    It's really, very easy to do. Basically need a table with (id,parentid,page_title,page_content). parentid is the id of the parent section, leave NULL if it is the top level. This way you can seek in the DB with a simple SELECT * FROM `pages` WHERE `id`="aboutus" LIMIT 1.

    You can use parentid to form a breakcrumb to trace back to which section it relates to... this maintains hierarchy. An easier way is to do a select all and hold it in an array (or hash table -- depending on your language) to make it really speedy. Hell, skip the DB. Store it in a file as a serialized string. (for VERY low traffic sites, anyway)

    This method also works VERY well with URL rewriting.

And it should be the law: If you use the word `paradigm' without knowing what the dictionary says it means, you go to jail. No exceptions. -- David Jones

Working...