7 ms·
Devil's advocate here: did we consider that any such exponential back off goes out the window when users, faced with a non-working site, will just refresh the p
by Dextro 3y ago
Devil's advocate here: did we consider that any such exponential back off goes out the window when users, faced with a non-working site, will just refresh the page therefor reseting the whole process?
- NavinF 3y agoThe server load from that is negligible since those requests stop at the load balancer. On that note, the 10 requests/second in the post is also negligible for the same reason. Only requests that hit backend servers matter
- 8n4vidtmkvmk 3y agoHow does the load balancer know if they hit the tweet limit or not? Sounds like they need to query a db for that
- sheepscreek 3y agoThe load balancer doesn't care about the source of request when it hits a hard requests per second limit. It all depends on how it is configured.
- 8n4vidtmkvmk 3y agoOh, I was referring to the per user tweet limit
- NavinF 3y agoThere are a million ways to skin that cat. Personally I'd just cache HTTP 429 responses for 1 minute, but you could also implement rate-limiting inside the load balancer with an in-memory KV store or bloom filter if you wanted to. Perhaps the context you're missing is that all large sites use ECMP routing and consistent hashing to ensure that requests from the same IP hit the same load balancer. Twitter only has ~238 million daily active users. 10 requests/second on keepalive TCP+TLS connections can be handled by a couple of nginx servers. The linked "Full-stack Drupal developer" has no idea how any of this works and it's kinda sad how most people in this thread took his post at face value