[HN Gopher] Defcon: Preventing overload with graceful feature de...
___________________________________________________________________
Defcon: Preventing overload with graceful feature degradation
(2023)
Author : mlerner
Score : 84 points
Date : 2024-02-29 20:50 UTC (2 hours ago)
(HTM) web link (www.micahlerner.com)
(TXT) w3m dump (www.micahlerner.com)
| Banditoz wrote:
| Am I reading the second figure right? Facebook can do 130*10^6
| queries/second == 130,000,000 queries/second?!
| sebzim4500 wrote:
| Sounds plausible. There are probably many queries required to
| display a page and Facebook has 2 billion daily active users.
| ipaddr wrote:
| This is how information slowly changes. The original numbers
| from facebook needed to be taken with a grain of salt. 2
| billion a day raises it more.
|
| Facebook claims to have 2 billion accounts but no where near
| 2 billion unique accounts. I don't know what facebook calls
| an active user but it use to mean logged in once in the past
| 30 days.
| reissbaker wrote:
| No, the person you're responding to was correct. Facebook
| has over 2 billion daily active users [1], and DAU refers
| to unique users who used the product in a day [2].
|
| 1: https://www.statista.com/statistics/346167/facebook-
| global-d...
|
| 2: https://www.innertrends.com/blog/active-users-measuring-
| busi...
| IncreasePosts wrote:
| I forgot how to count that low.
| sonicanatidae wrote:
| Yeah, they allocated ALL of the ram to their DB servers. lol
| storyinmemo wrote:
| I think about 10 years ago when I was working there I checked
| the trace to load my own homepage. Just one page, just for
| myself, and there were 100,000 data fetches.
| gaogao wrote:
| Those queries are probably mostly memcache hits, though of
| course with distributed cache invalidation and consistency fun
| ipaddr wrote:
| If it doesn't hit the database is it really a query?
| bagels wrote:
| I can't comment on the numbers, but think of how many engineers
| work there and how many users Facebook, Whatsapp, Instagram
| have. Each engineer is adding new features and queries every
| day. You're going to get a lot of queries.
| bee_rider wrote:
| We've really wasted an incredible amount of talent-hours over
| last couple decades. Imagine if we'd worked on, like, climate
| change or something instead of ad platforms.
| esafak wrote:
| "The best minds of my generation are thinking about how to
| make people click ads. That sucks." - Jeff Hammerbacher
| (2011); early Facebook employee, and Cloudera cofounder.
|
| https://www.theatlantic.com/technology/archive/2011/04/quot
| e...
| baby wrote:
| You make it sound like everybody at Meta works in the ads
| department.
| Scubabear68 wrote:
| They all do.
| jojobas wrote:
| 98% of Meta's revenue is from ads. Meta is an ads
| department.
| reissbaker wrote:
| A custom JIT + language + web framework + DB + queues +
| orchestrator + hardware built to your precise specifications +
| DCs all over the world go a long way ;)
| AlienRobot wrote:
| iirc Facebook has 3 billion users, so that sounds plausible.
| ndriscoll wrote:
| Facebook makes over 300 requests for me just loading the main
| logged in page while showing me exactly 1 timeline item.
| Hovering my mouse over that item makes another 100 requests or
| so. Scrolling down loads another item at the cost of over 100
| requests again. It's impressive in a perverse way just how
| inefficient they can be while managing to make it still work,
| and somewhat disturbing that their ads bring in enough money to
| make them extremely profitable despite it.
| golergka wrote:
| Wasn't the whole point of GraphQL in mitigating this?
| velcrovan wrote:
| Seems like whenever I log into FB lately it's pretty much always
| in a state of "graceful feature degradation".
|
| For example, as soon as I log in I see a bell icon in the upper
| right with a bright red circle containing an exact positive
| integer number of notifications. It practically screams "click
| here, you have urgent business".
|
| I can then leave the web page sitting there for any number of
| minutes, and no matter how long I wait, if I click on that
| notification icon it will take a good 20 seconds to load the list
| of new notifications. (This is on gigabit fiber in a major metro
| area, so not a plumbing issue.)
| philippta wrote:
| Without being able to verify, I would assume it's designed to
| behave in this way. The longer you wait the more anticipation
| builds up, the more gratifying it becomes.
| meowface wrote:
| I think there's no chance they intentionally want users to
| wait 20 seconds to see their latest notifications.
| Arainach wrote:
| The initial render of Facebook's UI slows dramatically (I
| suspect but cannot prove intentionally) if you have
| adblockers/uBlock Origin/etc.
| guessmyname wrote:
| Have you tried navigating the website using a web proxy
| (Charles, Burp Suite, or similar tool) to intercept the HTTP
| request(s) in order to replay them yourself multiple times to
| see if the latency is consistent? It'd be interesting to
| discover that the delay is fabricated using the front-end code
| or if the back-end server is really the problem. I don't use
| Facebook but I asked a friend just now and the response time
| for the notifications panel to appear is between 500ms-2000ms,
| which is relatively fast for web interactions.
| OtherShrezzing wrote:
| > if (disableCommentsRanking.enabled == False)
|
| This could use some light-touch code reviewing
| mrb wrote:
| Off-topic but: I love the font on the website. At first I thought
| it was the classic Computer Modern font (used in LateX). But
| nope. Upon inspection of the stylesheet, it's
| https://edwardtufte.github.io/et-book/ which was a font designed
| by Dmitry Krasny, Bonnie Scranton, and Edward Tufte. The font was
| originally designed for his book Beautiful Evidence. But people
| showed interest in font, see the bulletin board on ET's website:
| https://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=...
| Initially he was reluctant to go the trouble of releasing it
| digitally. But eventually he did make it available on GitHub.
| dang wrote:
| Discussed (a tiny bit) at the time:
|
| _Defcon: Preventing Overload with Graceful Feature Degradation_
| - https://news.ycombinator.com/item?id=36923049 - July 2023 (1
| comment)
| danpalmer wrote:
| Joining Google a few years ago, one thing I was impressed with is
| the amount of effort that goes into graceful degradation. For
| user facing services it gets quite granular, and is deeply
| integrated into the stack - from application layer to networking.
|
| Previously I worked on a big web app at a growing startup, and
| it's probably the sort of thing I'd start adding in small ways
| from the early days. Being able to turn off unnecessary writes,
| turn down the rate of more expensive computation, turn down rates
| of traffic amplification, these would all have been useful levers
| in some of our outages.
___________________________________________________________________
(page generated 2024-02-29 23:00 UTC)