News for hackers. Stuff that matters.
Re:One Million Database Connections by ndriscoll on Tuesday November 01, 2022 @08:23PM (#33429823)
How much is a moderately busy app? I have a sketch of a twitter app in Scala with zio-http as the framework, doing the batching strategy twawaaay describes, and it can handle 46k POSTs per second on my i5-6600 with a SATA3 SSD. That's using 16 connections to postgres, though that's probably more than is reasonable for my 4 core CPU.

At 46k RPS, it only takes 5.5 ms to assemble a batch of 256, so latency is basically unaffected by doing this. Just set a limit of 5-10 ms to assemble the batch (or lower if you have a more powerful computer that can handle more throughput).

There are no comments on this comment yet.