4

cross-posted from: https://piefed.social/post/89462

Handling large bursts of POST requests to your ActivityPub inbox, using a buffer in Nginx

Fediverse traffic is pretty bursty and sometimes there will be a large backlog of Activities to send to your server, each of which involves a POST. This can hammer your instance and overwhelm the backend’s ability to keep up. Nginx provides a rate-limiting function which can accept POSTs at full speed and proxy them slowly through to your backend at whatever rate you specify.

top 2 comments
sorted by: hot top new old
[-] anzo@programming.dev 2 points 2 years ago

I wonder if it's of any utility to our instance.

[-] wpuckering@lm.williampuckering.com 1 points 2 years ago* (last edited 2 years ago)

I can only see this being effective if the Nginx instance isn't also responsible for reverse-proxying the frontend traffic, and if it's not running on the same server as the frontend or backend (ie. decoupled from the infrastructure serving the stack). Haven't looked at the article yet but I'm assuming they would recommend provisioning the infrastructure with that decoupling, or it wouldn't make much sense.

this post was submitted on 18 Apr 2024
4 points (83.3% liked)

Programming.dev Meta

2767 readers
47 users here now

Welcome to the Programming.Dev meta community!

This is a community for discussing things about programming.dev itself. Things like announcements, site help posts, site questions, etc. are all welcome here.

Links

Credits

founded 3 years ago
MODERATORS