Scaling HTTP Connections
summary
Built an HTTP resource proxy and replaced a Python proxy with an Erlang client stack, then rewrote the client to store per-request state in ETS-backed request state instead of per-process message copying. That change plus using streaming request and response and connection pooling cuts memory growth and stops frequent crashes; the CouchDB replicator stabilizes under load and the system now sustains 20,000 concurrent connections without daily VM restarts.
AI-written summary · about
chapters (17)
- 0:00Start
- 0:17Constraints
- 0:54exampe: http resource proxy
- 3:53exampe: couchdb replicator
- 8:45Panorama of the different used HTTP clients
- 14:42When it's limited, reuse....
- 16:26Control the process
- 19:26Limit the concurrency
- 22:18Reduce the memory usage
- 29:31A usual client pattern
- 31:03client patterns-hackney v2 (0.11.1)
- 31:22Make the API less painful
- 33:34client patterns - hackney v2 (0.11.1)
- 35:37copy data
- 36:57hackney v2 (0.11.1) - status
- 37:30HTTP 2 designed for Erlang
- 38:18hackney v3
related talks
34mProxying Rabbits For Stability & Reliability
15mHow We Solved the K8s Cluster Communication Challenge
24mPurely functional gRPC and HTTP/2 with OCaml
21mMaking Envoy Resilient to Sudden Increases in Load
36mWhat Is Happening with My Connections? Why Are They Closed?
12mPrism: Proxies without the Pain
24mHow We Built Protosockets to Go Beyond HTTP and gRPC
01h 52m100% Fast and Resilient Microservice with RSocket
