What happens when a website crashes due do too many users?

Raytheon / Eng
paid2type

Go to company page Raytheon Eng

paid2type
Apr 15, 2021 11 Comments

Can some explain what happens from a technical point?

For example today Bad Bunny tickets go on sale on Ticketmaster. Ticket master is down with a 503/504 error.

If a company knows they are about to get a lot of incoming requests can they prepare for it or are they limiting it on purpose? Does it just cost to much to handle that many requests?

Can some explain what actually happens?

comments

Want to comment? LOG IN or SIGN UP
TOP 11 Comments
  • Google / Eng
    N♾️gler

    Go to company page Google Eng

    N♾️gler
    Suppose you have a restaurant with 50 people seating arrangement. If you know it is holiday season and maybe 100 people will come in, you can increase the seating capacity so that your restaurant can "serve" more folks at the same time.

    However if you don't increase capacity, then 50 of the 100 folks should remain starving and can't be served (503 or 504).

    The problem with overloading in certain poorly designed apps / websites is that overload strains the system and leads to resource contention. The resultant effect is all the 100 resources will starve.

    E.g. suppose there was a database write or read operation being done as a part of request. The db performance degrades exponentially beyond 50 let's say. So till 50 req, you can serve all 50 in 1 sec, however past 50, all the request timings start to deteriorate. At a point when it reaches 100, the db request itself gets timeout. So the overall system crashes and all User requests receive 503.

    Way to avoid this is to identify performance impact of different parts of your system and implement a throttle system where you deny requests right in the app layer when you see you are exceeding thresholds.
    In restaurant term, its better you deny folks to enter restaurant when you fill capacity vs allowing 100 folks in and the chefs can't serve all the folks in the stipulated time leading to customers walking out annoyed.
    Apr 15, 2021 5
  • New
    AXHe05

    New

    AXHe05
    You can handle x requests a second and you send x+1 requests.
    The extra request has to wait an extra second so it is queued at the server. If the timeout set for the request is < 1s. Then the request would send back a 504 instead of waiting forever in the queue.

    Cost/complexity depends on the bottle neck. If web servers are a bottleneck, try scaling the number of servers you have.
    If it’s the datastore, this is when things get a bit complicated.
    Apr 15, 2021 0
  • Apple
    sutophonia

    Go to company page Apple

    sutophonia
    I can imagine paid2type on a zoom interview right now posting this question waiting for someone to answer.
    Apr 15, 2021 2
  • Google
    ♥️🥜🧈

    Go to company page Google

    ♥️🥜🧈
    Most companies can and do plan for it (and survive). Retailers do this every holiday season for e.g. however if you expect 2x and get 20x, there are very few Apps that'll not crash and burn.
    That's the reason I was super impressed with Meet when they were able to scale massively during the pandemic - that's not easy...
    https://www.wired.com/story/how-google-meet-weathered-work-from-home-explosion/
    Apr 15, 2021 0