Slashdot Mirror


Surviving Slashdotting with a Small Server

S.BartFarst writes "Our little departmental server has been slashdotted twice in the last year and survived! Implementation of a two-headed redundant hardware scheme using linux virtual server and backup and failover capabilities enhanced by the linux high-availability tools has produced a nifty low-cost solution. Gotta love those little white boxes! (also having a university-supplied BIG PIPE doesn't hurt). More interesting is the documentation of the apparent exponentially decaying attention span of slashdotters. Anybody else observed similar phenomena?"

26 of 307 comments (clear)

  1. Clever, clever by Frodo2002 · · Score: 4, Insightful

    Notice this comment was posted on a slow Sunday afternoon (EST). Very clever, because they know that /.'ers can't resist a challenge like that. Feel sorry for them on Monday morning though...

  2. well golly gee... by JeanBaptiste · · Score: 5, Insightful
    (also having a university-supplied BIG PIPE doesn't hurt).


    well there you go... having a massive amount of bandwidth will allow you to survive a slashdotting. In most cases of slashdotting, I dont think the server was the bottleneck... its no problem for a server to dish out static pages... its the bandwidth, especially for serving pictures or videos....
    1. Re:well golly gee... by mo · · Score: 4, Insightful

      You're right. Bandwidth also serves a big purpose in finishing requests quickly. For example, let's see what happens when I have a 1.5mbps line with 512 concurrent requests. First of all, if you're using apache 1.3.X or 2.0 prefork, you've filled 2 gigs of ram by spawning 512 clients. Furthermore, you're bandwidth allocation per-client is 384 bytes/sec. This means you're spoon feeding your pages to your clients which makes it really hard for your server to get that 512 number down to something manageable.

      The problem here, is that the bandwidth bottleneck will make your server either (a) run out of processes/threads, (b) run out of ports/sockets, or (c) run out of memory from spawning all of the processes/threads to handle all of the stalled connections.

      Once this happens, people no longer can connect to you, and you're toast. The crazy thing here is that this can happen even at 10mbit/sec if you're machine is configured well enough, and if the content you're serving is large enough (IE: image/media serving).

      So cheers for these guys at keeping their bandwidth/server ratio high, I actually really like their architecture. But note that the greatest architecture in the world won't save you from a slashdotting if your server(s) are on a business dsl line.

    2. Re:well golly gee... by KPU · · Score: 2, Insightful

      Um sending people an error page is NOT surviving a slashdotting.

    3. Re:well golly gee... by evilviper · · Score: 4, Insightful

      We aren't talking about an actual error, that's just what it is called.

      What we are talking about is sending a different, low-bandwidth page, which will reload the main page after a certain ammount of time.

      Sure, you aren't immediately serving up the page to everyone who is requesting it, but people will only see a delay of a minute or so, rather than the server not serving up anyone, and crashing and burning for a day before anyone resets the thing. Or maybe just saturating the line, so nobody gets anything faster than 0.00001kbps, which is far far worse than having to leave the error page open in the background a couple minutes before it has a chance to load the main page.

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  3. Is it decaying attention span? by Eevee · · Score: 5, Insightful

    Or is it where the article is at any given time? Top of front page gives lots of hits. As it drifts down, the hits slow as fewer read; to the sidebar, fewer but still substantial hits; then off to the specialty pages such as Science or Games, then only a few will read.

    Of course, the only test would be to repost the article and see if there's the same number of hits... Nah, slashdot would never go for duplicate stories.

  4. That hits graph by KingDaveRa · · Score: 3, Insightful

    Interesting how it peaks, drops off slowly then rises again a little before dropping off again. Maybe some 'behind the curve' slashdot readers?

  5. [GASP!] You mean LOAD BALANCING HELPS! Stunning! by siberian · · Score: 2, Insightful

    Its incredible, this person has actually proven that LOAD BALANCING MULTIPLE SERVERS INCREASES YOUR LOAD CAPACITY! This is incredible news! Wow, I am sure glad it made it as an article, stunning.

    Every medium to large website out there will be pleased to know that what they have been doing for the last 8 years is actually VALID, thanks guys!

    I think the only reason this made it to the front page is the slashdot self-reference.

  6. Eleventh Post by fm6 · · Score: 2, Insightful
    The first ten all make the same lame joke. Get a life people!
    More interesting is the documentation of the apparent exponentially decaying attention span of slashdotters.
    I'm not sure the decay fits any simple math model. Here's a more practical explanation: It takes about 24 hours for a Slashdot story to scroll off the main page. So for the first day and part of the second you're getting hits from every slashdotter. After that you're only get hits from people who compulsively look through old stories and/or browse Slashdot through RSS feeds and other offline tools. And after that, of course it's old news.

    I'll bet if you chart the data hour-by-hour, you'll see a sudden dropoff at the very moment the story scrolls off.

  7. You didn't get Slashdotted by 0x0d0a · · Score: 4, Insightful

    You didn't get Slashdotted if the server was still operating normally. You just had some people from Slashdot visit.

  8. Re:Third Time's a Charm? by BWJones · · Score: 5, Insightful

    Our little departmental server has been slashdotted twice in the last year and survived!

    Oh, come on. Even my little old G3 iMac is capable of handling quite a load from Slashdot and this site is serving up graphics intensive stuff. What you need to prevent a good Slashdotting is bandwidth that universities provide. T3 backbone connections are a wonderful thing. :-)

    Go ahead click all you want.

    --
    Visit Jonesblog and say hello.
  9. Re:Wouldn't you need an expensive switch? by OverlordQ · · Score: 2, Insightful

    From the Article:
    Each machine has its own independent 100 Mbit connection to the Gigabit SMU internet service,

    I really didn't see 'cheap dual-channel switch' in there anywhere . . I DID see independent 100 Mbit connection though.

    --
    Your hair look like poop, Bob! - Wanker.
  10. Re:Exponential? by 26199 · · Score: 2, Insightful

    Er... no. Logarithms increase.

    Exponential decay is of the form:

    y = e^-a x

    Where a is positive. It's exponential in that a fixed increase in x multiplies y by a fixed number; it's just that this number is less than one.

  11. Also in the news: Carrot Top; Still Not Funny by Anonymous Coward · · Score: 2, Insightful

    I think that's part of it. But I bet most of the effect goes to Karma whoring. Notice the second minor blip later on in their data.

    When the article is new, the rush is on for insightful comments that deal with commenting on elements of the referenced links. (Might as well, there aren't any comments beyond ascii pictures, and troll expiditionary forces.) They have their responses, which then triggers the volley of RTFA's, and now there are a number of posts, people don't have to RTFA so much and the thread contains so much information anyway. But certain conversations develop, some tangential, but others still tightly following the information referenced in the links, and may even provide deeper links, which cause people to go back and reference the original works which provoked the server beating.

    So one might look at there data and then form the yet to be tested hypothesis that the second blip is accurately representative of the slashdotters who are genuinly interested in any random subject at hand, and the difference between that and the peak could be correlated to the number of whores.

    But that one isn't me, because A) Sunday B) I forgot to take my adderall.

  12. Re:Third Time's a Charm? by Anonymous Coward · · Score: 3, Insightful
    a friend of mine had his site featured on the front page of slashdot without any problems. Page hits spiked for a couple days, but his setup (P4 x86 linux box, apache, busines DSL) handled it fine. And, after being hit he discovered his bandwidth was being capped too low by his ISP :).

    Most slashdottings come from limited bandwidth or php/perl/asp/mysql/ etc being unable to handle it. Most dynamic content could be static content. (Most slashdot pages are static caches).

  13. Mirrors by brejc8 · · Score: 2, Insightful

    The ideal situation would be if you got a warning from slashdot and then then made some mirrors of the pages on distributer mirror.

  14. Re:Wouldn't you need an expensive switch? by PurpleFloyd · · Score: 3, Insightful
    Assuming the page was fairly small, without lots of pictures or movies, I'd imagine that a small 10/100 switch would handle the load fairly well.

    On the stats link provided for a January slashdotting, the most bandwidth used in a day was a little under 7.4 GB. Assume that it was posted on /. at noon, so there were 12 hours to spread the big hit over: about 617 MB/hr. That's a little over 10 MB/Min, or 170 KB/sec. Even if we assume that the initial hit was double that, I can easily stream a 1000 KB/sec Divx movie over my 100 Mbps switched home LAN. The limiting factors here are the servers, routers and bandwidth to the Internet, not the local network connecting the servers.

    --

    That's it. I'm no longer part of Team Sanity.
  15. Exponential decay by rjh · · Score: 4, Insightful

    Why is it surprising that it follows an exponential dropoff? The only interesting questions are the coefficients of exponential dropoff, not that it's exponential--I'd sit upright and take notice if it was a linear decrease.

    Anything which follows a steady fractional diminishment will have a curve of y = ke**-ax, where k and a are constants. You see this basic equasion pop up all the time in physics, economics, statistics... etc. Why should server slashdotting be any different?

  16. Re:Our solution by Anonymous Coward · · Score: 1, Insightful

    You're getting modded down for a number of reasons:

    1. You're posting AC. Try logging in, ok?
    2. Your code redirects the user to goatse.cx. Other variations you have posted redirect to tubgirl.com. This shows that you're not really concerned about slashdotting (why the variation in code? you mean this isn't the *actual* code you use? why am I not surprised?). You just want the juvenile thrill of trolling.
    3. If you honestly want to prevent a slashdotting, how about redirecting to a google cache of your page?

    If you're really serious, login and post your contribution without being so trollish. How do you expect to be serious when you say "Slashdot users are BANNED, now go look at an erupting asshole!" ?

  17. done, done and I'm on to the next one by simon333 · · Score: 2, Insightful

    I remember the days when I would treasure any new content and what I read or saw had more of an impact on me. Now information is just catalogued in my head and I feel this strange need to gather more all the time.

    I think the attention span problem is more widespread than just us slash-heads. People are now being inundated with constant 'quick clips' and cut scenes for every television show and commercial ...and don't even get me started on modern day movie trailers. There are so many cutscenes in trailers now that I literally have to close my eyes in the theatre to avoid having an epileptic seizure.

    How can our brains avoid being desensitized with so much information being thrown at us all the time?

    - Simon

  18. Subject (yes, this post is about subject) by pasi · · Score: 2, Insightful

    Remember also that even though it's a fact that a huge amount of Slashdot users are interested in articles like this, still I'd imagine that a "normal" article with actual information attracts more readers, and therefore causes more traffic and server load. I could be wrong too, but I doubt it. ;)

    They survived this before, just saying that judging their performance now by this article may not be correct. Subject does matter.

  19. Re:Testing, testing... by ibennetch · · Score: 2, Insightful

    True, especially since the Kazaa-happy college kids aren't due back for two more weeks.

  20. Re:Attention span could be useful by LostCluster · · Score: 2, Insightful

    The problem with that is by giving a heavy disadvantage to the newest user on the system will likely make that new user feel unwelcome. That leads to abandonded newbie accounts, which is a bad thing for business. If you have no replacement customers coming in for the ones who leave, you'll have a decaying site and there won't be any /. effect anymore, nor will there be a /.

    Beware of side effects when you try to implement simple solutions like that...

  21. Asymmetric load balancing can help too by billstewart · · Score: 2, Insightful
    If you want to continue serving your _real_ users while giving the slashdot crowd as much fun as you've got leftover horsepower to handle, and you're planning for this sort of thing in advance, it may help to trick your system into serving the slashdot crowd from one server and the regulars from a different one. Some obvious implementations:
    • Use the HTTP REFERER to direct /.ers to the second machine.
    • Use a friendly low-graphics front page that asks /.ers to click a link that goes to the second machine.
    • Modify your DNS so that people you recognize go to the primary machine and unrecognized people go to the second machine. If you're a university, most of your regular users are probably from .edu or .gov sites. If you're doing this anyway, you can also check DNS lookups to see if they come from open relays or spamblocked sites and send them to your _very_ _slow_ _smtp_ teergrube machine.
    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  22. Re:Wouldn't you need an expensive switch? by jonadab · · Score: 2, Insightful

    > After that, your cheap ide disk might have a hard time

    You do realise, don't you, that a cheap IDE disk can handle
    more throughput than a T3 line or a 10/100 switch? Refer to
    the speed chart below.

    Although, if you don't have adequate cooling, making it do so
    continually for a few hours could have a detrimental impact on
    its lifespan. But a university department server is probably
    in an air-conditioned building, which makes adequate cooling
    fairly easy, because ambient temperature stays low no matter
    how much heat you blow out the back of the box. So you slap
    a cooler on the HD and add one case fan and you're set, yes?

    Speed Chart:
    CPU, RAM, HD, Ethernet/T3, T1, Dialup, Keyboard
    Each step is _at least_ an order of magnitude slower than the
    previous step on the chart. Thus, if your bottleneck is the
    T3 line, even the cheapest IDE hard drive can easily keep up.
    Removable drives are well slower than the HD, but I don't know
    how they compare to the networking technologies. Residential
    broadband is generally not better than T1 and often is closer
    to dialup. (Dialup at "56k" gets real speeds up to 45kbps; T1
    is about 1500kbps, so 128 or even 256kbps is closer to dialup
    than it is to T1. 512kbps is (geometrically) closer to the T1,
    however, and so can be classified as true broadband.)

    --
    Cut that out, or I will ship you to Norilsk in a box.
  23. Bah by ttyp0 · · Score: 2, Insightful
    No need to throw lots of hardware and redundant systems to survive a /. From what I've seen, most sites that go down are due to a small number of reasons:

    1. Not enough bandwidth
    2. Poorly configured web server
    3. 300k images & 20MB mpeg/avi downloads (see #1)
    4. Not enough RAM (1GB is generally enough)

    I host about 50 domains for friends on my webserver (an Athlon 1.2Ghz w/ 1GB RAM) and have survived a simultaneous Slashdot and Fark link.

    --Brent

    Anti SCO T-Shirt