Secrets of Proxy Performance in Rust and async/await Without a Runtime
summary
Covers building high-performance reverse proxies in Rust for a bot-attacked large company, starting from an implementation using hyper and then moving to a custom proxy built directly on syscalls. Explains how to implement async/await without using Tokio or another runtime, discusses benefits and shortcomings of Rust and of standard vs bespoke designs, and presents benchmark comparisons.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 1:06Proxy scale requirements
- 4:17Two proxy implementations
- 5:43Benchmarking challenges
- 9:01Development deployment hurdles
- 12:45Building proxy from scratch
- 13:30Async/await benefits in Rust
- 16:40Event loop task management
- 18:49Custom futures for sockets
- 22:02Ring buffer optimization
- 23:51Performance results
- 25:02Future plans trade-offs
- 25:46Alternative libraries tools
- 27:12Optimization strategies
- 28:18Q&A: Buffer handling flow control
- 30:10Q&A: Scalability concurrency
- 31:14Q&A: TLS performance impact
- 32:46Q&A: eBPF DPDK considerations
- 34:13Q&A: Single-threaded libraries
- 35:44Q&A: Memory allocation Box<dyn>
