6 ms·
You might want to have many app backends, each with it's own Alchemy pool. This setup would create a lot of Postgres connections. When the network flaps you nee
by x4m 5y ago
You might want to have many app backends, each with it's own Alchemy pool. This setup would create a lot of Postgres connections.
When the network flaps you need to reinstall lots of TLS connections. Maybe 100ms of cpu for each handshake. Also each connection may cost you a fork with lots of following CoW, also up to 100ms of cpu.
And also Postgres gives you maximum TPS throughput when you run some hundreds of connections, not thousands.
And you might want to isolate one microservice from another (in terms of DB throughput utilization). Poolers can help here too.