How We Built Protosockets to Go Beyond HTTP and gRPC
summary
Built a lightweight, message‑oriented layer over raw TCP called Protosocket (Rust, Tokio) that drops HTTP/2 and gRPC overhead, uses per‑connection buffers and minimal synchronization, and is benchmarked with RPC PF on 1KB items at 50/50 read/write. Diagnosis uses flame graphs to find lock contention; gRPC unary ~20k ops/s, gRPC streaming ~25k, Protosocket ~70k (~3× throughput), enabling ~65% fewer servers and ~70% lower client p39 latencies.
AI-written summary · about
chapters (18)
- 0:00Protosockets introduction
- 1:00Momento’s architecture
- 2:48Benchmark setup gRPC
- 4:12gRPC overhead measurement
- 5:57gRPC cost impact
- 7:00gRPC unary to streaming
- 8:26Rust gRPC scalability
- 9:30Flame graphs bottlenecks
- 11:59Protosockets library
- 13:44Protosockets benefits
- 14:49Protosockets client SDKs
- 16:53Performance gains latency
- 17:34Custom protocols trade-offs
- 19:03Key takeaways optimization
- 20:49When to use Protosockets
- 21:30Low-level systems journey
- 22:13Resources for learning
- 23:40Acknowledgements
related talks
46mIntroduction to gRPC
24mHow Low Can You Go? A Comparative Dive Into gRPC and TtRPC for...
26mAdopting gRPC for Low Latency, High Bandwidth Scenarios
50mHigh Performance Network Programming in Rust
45mHow the Network Protocols You Choose Ultimately Affect Your Applications
22mA Case Study of Enhancing gRPC Micro-Services for Supporting High Throughput, Low Latency Trading
31mCloud Native Communication Patterns with gRPC
01h 01mThe RSocket Protocol — The Future of Reactive Applications
