4 ms·
GC is quite problematic for web servers too. Lots of people "solve" that by giving AWS more money.
by vp8989 5y ago
GC is quite problematic for web servers too. Lots of people "solve" that by giving AWS more money.
- Xenograph 5y agoWhy is GC problematic for web servers?
- vp8989 5y agoBecause GC will pause threads while requests are being served, this leads to latency spikes at the higher percentiles. It introduces a whole distinct type of complexity into operating the server. The latency of a request to your server is not just caused by the code that is ran to serve that request (which is how people intuitively would think about it), it can be caused by GC pauses that are happening because of the memory pressure caused by previous requests.
- theshrike79 5y agoWeb server workers, by definition, don't run for extended periods. Making them the perfect candidate for GC languages. 1) Get request 2) Serve request 3) Get GC'd No memory issues.
- vp8989 5y agoServing web requests with ephemeral workers introduces some new problems though. Generally efficiency in this space comes from pooling, reusing connections, multiplexing etc ... Ie. amortize expensive work over many requests.