4 ms·
It stops working when you need to connect to any external resource. Database, http clients etc maintain connection pools to skip initial connection phase, which
by ivovk 1y ago
It stops working when you need to connect to any external resource. Database, http clients etc maintain connection pools to skip initial connection phase, which can be costly. That’s why you usually need a running web application process
- ben0x539 1y agoAt my last job, a lot of our web services also benefited immensely from in-process caches and batching (to be fair, some of them were the cache for downstream services), and their scaling requirements pretty much dominated our budget. I can totally see how the cgi-bin process-per-request model is viable in a lot of places, but when it isn't, the difference can be vast. I don't think we'd have benefited from the easier concurrency either, but that's probably just because it was all golang to begin with.
- 8organicbits 1y agoYou can solve that with a sidecar, a dedicated process (or container) that pools connections for you. Pgbouncer as one example.
- rvnx 1y agoGreat, additional things to maintain that can break, all of that to work around the original sandcastle instead of fixing the root issue