HTTP Proxies on Kubernetes
HTTP Proxies on Kubernetes
Aaron Schlesinger, Microsoft
Aaron Schlesinger, Microsoft
@arschles
Slide 2
Slide 2 text
Origin
Origin
The application.
Proxy
Proxy
The ingress.
Scaler
Scaler
The background controller.
Slide 3
Slide 3 text
The Origin
The Origin
Not in a “stable” location.
Not in a “stable” location.
Often stateless.
Often stateless.
Controlled by other software.
Controlled by other software.
Slide 4
Slide 4 text
The Scaler
The Scaler
Adds/removes origin replicas automatically.
Adds/removes origin replicas automatically.
Communicates with proxy.
Communicates with proxy.
Slide 5
Slide 5 text
The Proxy
The Proxy
Stateless
Stateless
Acts on (1) incoming requests and (2) scaler changes
Acts on (1) incoming requests and (2) scaler changes
Handles origin faults
Handles origin faults
Slide 6
Slide 6 text
Proxy Patterns
Proxy Patterns
wait = hold inbound request until scaler says >0 replicas.
= hold inbound request until scaler says >0 replicas.
forward = attempt connection and forward HTTP request.
= attempt connection and forward HTTP request.
Use inbound
http.Request.Context() for
everything in the proxy
Slide 7
Slide 7 text
Code
Code
bit.ly/gcru21
Slide 8
Slide 8 text
Building Your Own
Building Your Own
Applicable even outside Kubernetes.
Applicable even outside Kubernetes.
Keep proxy as stateless as possible.
Keep proxy as stateless as possible.
Minimize and simplify RPC calls.
Minimize and simplify RPC calls.
Slide 9
Slide 9 text
Thank You & Q/A
Thank You & Q/A
bit.ly/gcru21
twitter.com/arschles
twitch.tv/arschles
github.com/arschles