Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Facebook IT

How Facebook Keeps Messenger From Crashing On New Year's Eve (ieee.org) 69

Wave723 quotes IEEE Spectrum: On New Year's Eve, millions of people will use Facebook's Messenger app to wish friends and family a 'Happy New Year!' If everything goes smoothly, those messages will reach recipients in fewer than 100 milliseconds, and life will go on. But if the service stalls or fails, a small team of software engineers based in the company's New York City office will have to answer for it.
The article says the team "tested and tweaked the app throughout the year and will soon face their biggest annual performance exam," since Messenger's 1.3 billion monthly active users send more messages on New Year's Eve than any other day of the year. Many of them hit "send" at the exact moment when their clock strikes midnight, "and people often try to resend messages that don't appear to make it through right away, which piles on more requests."

The solution appears to be load testing, re-directing traffic, message batching, and discarding "read receipts" and temporarily disabling other minor Facebook functions -- or, more generally, what their engineering manager describes as "graceful degradation."
This discussion has been archived. No new comments can be posted.

How Facebook Keeps Messenger From Crashing On New Year's Eve

Comments Filter:
  • by Anonymous Coward

    "The solution appears to be ..." Stuff we've known since 1999?

    • by Anonymous Coward

      Release the hounds, Smithers

    • How glib (Score:5, Insightful)

      by SuperKendall ( 25149 ) on Saturday December 29, 2018 @06:04PM (#57876790)

      "The solution appears to be ..." Stuff we've known since 1999?

      It's one thing to say you know how to do it...

      Quite another when literally BILLIONS of people are using your services all at once - especially around NYE where it's not even spread through the day, it's a huge DDOS equivalent with billions of messages at midnight exactly...

      Planning for that kind of load and super-extreme bursting is not easy, at all. No matter how much you "know".

      • Comment removed based on user account deletion
        • Yeah, it's called money. All you need is money.

          How many years did we all have to suffer through Twitter Fail Whales while they were flush with cash?

          There are plenty of examples of giant well funded enterprises with websites that utterly suck and can handle just about no load - especially if you look at websites where tech is secondary, any kind of unexpected load and BAM they are usually down.

          Money can indeed help to buy the servers you may really need to handle load. Money can even help hire the people th

      • The vast majority of messages avoid that peak: hardly anyone waits for the exact midnight to send a message. So the load gets smeared onto quite a chunk of time.

        The engineering problem boils down to: send short messages between pairs of arbitrary sources and destinations (although usually the source and destination are close to each other), with message size usually within 50-100 bytes. Let's be generous and say that with metadata they fit within 1500 bytes. Hmm... I wonder, have we seen such a problem b

        • The vast majority of messages avoid that peak: hardly anyone waits for the exact midnight to send a message. So the load gets smeared onto quite a chunk of time.

          Look around you at the next NYE party and you will see just how wrong you are. Most people queue them up ahead of time and lots of people are hitting Send as the ball drops... (hint to devs, if someone has typed a partial message transmit that to the server in case they come back and hit send later - course Facebook was just screwed by that recent

          • Look around you at the next NYE party and you will see just how wrong you are. Most people queue them up ahead of time and lots of people are hitting Send as the ball drops...

            Ouch. At least there are no "smart"phone zombies so bad anywhere near me, neither among low-tech nor high-tech friends.

            hint to devs, if someone has typed a partial message transmit that to the server in case they come back and hit send later

            And that'll speed up that 14 words message... how?

            On a *normal* day, Messenger and Whats App process over 60 billion messages a day

            Thanks for the correction, I based my estimates on numbers in the article's summary.

            Come on man, you know that modern web API's are not that compact, and we are talking Facebook here. You are off by an order of magnitude at least, way more when you stop to think that on NYE way more people are sending images also... One single response to a post on Facebook I just did with 14 words had a 9.5kb body going out, and a 21.2 k response.

            I'm talking about the problem to solve not their implementation. Of course Facebook runs a PHP script that runs a bunch of NPM modules to produce a 1.5MB response, but after you cut down that bloat, you can get the same result with orders of magnitude less

            • Ouch. At least there are no "smart"phone zombies so bad anywhere near me, neither among low-tech nor high-tech friends.

              I am highly doubtful the people around you are as pure as you claim.

              And that'll speed up that 14 words message... how?

              Read again about actual message sizes instead of fixating on content size alone. You want to get that traffic up t the server ASAP and send only a rigger signal. Even if it WERE just 14 words it would still be... rather nice to have a few billion 14 word messages already t

              • Article is literally about Facebook. That is the problem to solve for, given how it is built.

                That's an XY problem -- if the transport has scaling issues, instead of throwing more hardware at it at some point it's good to take a step back and see if there are better approaches. And the core functionality is so simple that replacing just that part while keeping parts of the several-hundreds-of-megabytes-per-phone bloat they insist so much on having intact is a viable proposition.

            • by kriston ( 7886 )

              Of course Facebook runs a PHP script that runs a bunch of NPM modules to produce a 1.5MB response

              You honestly don't believe each request to a server spools up a new PHP script instance like it's still 2006, do you?

              • They forked PHP as HHVM, optimized the hell of it, and do some recompilation to C++, yeah. But you can optimize it only so much.

                PHP is a shithouse -- and I don't mean a building you defecate in, I mean one whose structural material is dried excrement (as still done by some tribes). It might have been adequate for a literal "Personal Home Page" with little traffic, but trying to throw more hardware at it to get it to scale to modern Facebook workloads is a fool's errand. It's kind of like banks running un

                • by kriston ( 7886 )

                  My point is that every click doesn't spawn a new PHP instance in their architecture unlike regular PHP.

                  COBOL is running just fine--its only problem is the lack of human knowledge in the marketplace.

                  And, at least with IBM COBOL, today's IBM z/OS runs COBOL programs originally compiled on the System/360 in the 1960s.

      • Actually, it _is_ spread throughout the day. Itâ(TM)s not NYE at the same time in the world ;-)

    • Comment removed based on user account deletion
    • by jrumney ( 197329 )
      I find it hilarious that the fix for overloading caused in part by people resending messages which don't appear to have gone through, is to discard read receipts. Did anyone in the New York office that is going to be held responsible for the inevitable outage think this through? I wish you luck, Facebook.
  • by Anonymous Coward

    That should be Facebook's new corporate slogan: "Graceful Degradation."

  • Simple (Score:4, Insightful)

    by Sebby ( 238625 ) on Saturday December 29, 2018 @05:55PM (#57876768)

    How Facebook Keeps Messenger From Crashing On New Year's Eve

    Simple, do awful things that will make people avoid using any of your services.

    • Simple, do awful things that will make people avoid using any of your services.

      Facebook has been trying that for years; doesn't help.

  • by jwhyche ( 6192 ) on Saturday December 29, 2018 @06:23PM (#57876844) Homepage

    Want to keep it from crashing on New Year's Eve? Just to load the damn thing. There, simple. Problem solved.

  • what their engineering manager describes as "graceful degradation."

    If they'd just use SystemD their problems would be solved! For that matter though, I wish FaceBook would gracefully degrade to /dev/null.

    Good luck to them though, it's a good engineering textbook problem. Stupid, yet necessary. (We have specific peak load times because we just do. Same thing with water supply and SuperBowl breaks, or 8AM/5PM rush-hour traffic.)

    FB should also offer a "delivery within 100ms or your money back!" guarantee. See? The timestamp says it was _delivered_ to _our_ servers i

  • by shabble ( 90296 ) <metnysr_slashdot@shabble.co.uk> on Saturday December 29, 2018 @06:28PM (#57876858)

    ... couldn't they simply split their users up into, say, 24 groups, and reduce the load that way?

  • facebook messenger is brittle poorly tuned garbage that cannot handle an ordinary upsurge in human use. AIM never had to be reengineered to survive new years eve without crashing, and it wasn't really all that good it just wasnt a flaming heap of shit
    • FB Messenger is harder to handle loads, because they need to run machine learning on all the messages to build better profiles of their users.

    • No, it just crashed at other points. The service where buddies were stored (feedbag) had a disastrous set of databases and there were times they all just went down *or* the whiscer (and others, essentially presence) services went down, and no buddies would show, and so people would sign off and on repeatedly trying to fix it slowing down the entire thing. It was all held together with gun tape and faith, at least in the late 90s and very early 2000s.

      There was never a test like that for AIM because people
  • by Anonymous Coward

    By stealing dimes from the Elves?

  • There's something like 26 midnights (timezones) around the world. Where's the problem?
  • WTF (Score:5, Interesting)

    by ledow ( 319597 ) on Saturday December 29, 2018 @07:53PM (#57877148) Homepage

    Millions of people.. sending a small TCP packet... containing a couple of hundred characters...

    Wow. Gosh. The infrastructure that must take to handle...

    Like... a couple of servers in a rack and a few gigabits of uplink at worst.

    Honestly, has modern technology come to this?

    One single YouTube video probably has more bandwidth, more data transferred, more CPU usage and less latency.

  • by Anonymous Coward

    There's no way to reply to all the misinformed commenters here, but I'm really surprised at how naive the majority are. Clearly most of you have never worked with problems at this scale...this is a far more difficult problem to solve than you all think.

  • by Bengie ( 1121981 ) on Sunday December 30, 2018 @01:13PM (#57879756)
    "Graceful degradation" is the unsung hero of properly engineered systems.
  • Another factor may be that FB pissed so many people off by abusing their privacy that they deleted Messenger altogether. I did, anyway. Come on, people. Invite your friends for a gathering or accept another friend or family member's invitation. A messenger greeting blast has about as much impact and is about as memorable as a highway billboard encountered at 80 miles per hour. Do something meaningful.

Do molecular biologists wear designer genes?

Working...