Context Aware Traffic Routing for Stateful Services using Envoy
Talkat KubeCon + CloudNativeCon North America 2021 · on Friday, 2021-10-15· at 14:30· Concourse Hall 152 + Online·
summary
Retrofits per-request routing by peeking into protobuf payloads with an Envoy custom filter that does partial protobuf parsing to extract envelope fields (app_id, server_id, player_id) and route before full deserialization. Prototype reduces memory by >50% for small messages and ~30% for 2MB messages, shifts client→server mapping into Envoy caches coordinated by a state coordinator service, and preserves 100% correctness while cutting backend storage lookups and end-to-end latency.
AI-written summary · about
chapters (15)
- 0:00Thank you to our session recording sponsor!
- 0:50Context aware routing We can route messages based on the context of the message Context is provided by: . URL routing (usually used by websites) • Request Header leg used by load balancers • Side channel (usually used by apps) . As part of the message content
- 1:39Use cases • Retrofitting protocol based on content without application being aware • Use existing content to perform smarter routing
- 2:44Custom filter overview
- 3:08Load test setup Test Message size average OS KB
- 4:48Protobuf Wireformat
- 7:05Things of Note • Envelope can be retrofitted ., envelope does not have to be . The unique string can be changed to indicate backwards Oncompatible changes . More than one kind of address can be used for routing purposes
- 7:35Things of Note • Envelope can be retrofitted ., envelope does not have to be . The unique string can be changed to indicate backwards Incompatible changes . More than one kind of address can be used for routing purposes
- 8:02Load test setup (V2) Test
- 9:06Test 1 Resource Utilization (V2)
- 10:04Stateful message routing
- 10:51Stateful services message routing
- 12:14Proposed solution
- 15:31Client server mapping coordinator
- 16:10Conclusions • Shifting the client to server mapping can help with improving • Partial message deserialization can help when dealing with large message
related talks
21mDeep Dive: Envoy
28mAuthorization with Envoy
42mAccelerating Envoy with the Linux Kernel
21mMaking Envoy Resilient to Sudden Increases in Load
36mSecuring Every Bit
11mLightning Talk: Building a Scalable Multi-Protocol API Gateway with Envoy
26mLeveraging Envoy to Implement Micro-Segmentation-Based Security Policies
23mUsing Envoy as an Egress Proxy for TLS Enabled Traffic
