Andrew Fribush
fig. 2.36.2 · 40 concurrent calls from one IP against a limit of 10: the Postgres row allowed 10 and refused 30; one in-memory Map per instance would allow 10 per instance.
ONE POSTGRES ROW LET 10 OF 40 THROUGH; THREE IN-MEMORY MAPS WOULD LET 30ONE CELL: ONE OF 40 CONCURRENT CALLS FROM ONE IP, LIMIT 10 PER MINUTE. ACCENT:ALLOWED.POSTGRES 16, ONE COUNTER ROW SHARED BY EVERY INSTANCE (A REAL RUN)10 ALLOWED30 REFUSED; THE ROW'S COUNT STILL ENDED AT 40IN MEMORY, A MAP PER INSTANCE (ARITHMETIC, NOT A RUN). INSTANCES:123410 OF 1410 OF 1310 OF 1330 ALLOWED, 3 TIMES THE LIMIT; 10 REFUSED

source: content/writing-sources/drafts/37-four-things-that-do-not-survive-serverless-factcheck.md, local run transcript (Postgres 16, consume_rate_limit from dendrite 0f7e1bc:schema.sql); in-memory side is arithmetic from consumeMemory in 0f7e1bc:src/infra/rate-limit.ts lines 21-40 · rateLimitRun.data.ts

View in context: Four things that do not survive serverless → · All figures

Andrew Fribush, software and computer engineer in Austin. I build consequential systems where software meets institutions: finance, healthcare, commerce, government data, and the mechanisms that govern AI agents. Taking new engagements: hello@andrewfribush.com.