Olla's sticky session balancer computes affinity keys and tracks outcomes (hit/miss/repin/disabled), but none of this information appears in request logs.
The X-Olla-Session-ID header is set by clients, used by ComputeStickyKey() to derive affinity keys, and echoed back in responses — but the actual session ID and sticky outcome are never logged.
Currently, handler_proxy.go logs at INFO and DEBUG levels, but neither includes:
session_id (the X-Olla-Session-ID value)
sticky_outcome (hit / miss / repin / disabled)
sticky_source (session_header / prefix_hash / auth_header / ip)
This makes it impossible to answer questions like:
- Was this request routed by sticky session or full round-robin?
- Is the sticky session cache filling up with dead keys?
- Why did a request go to a different backend than expected?
Suggested fix:
Add session_id and sticky_outcome fields to the INFO-level log in logRequestStart() and logRequestResult(), and optionally include sticky_source in DEBUG logs. These fields should be read from the request context keys:
constants.ContextStickyKeyKey → session ID
constants.ContextStickyKeySourceKey → key source
constants.ContextStickyOutcomeKey → outcome (hit/miss/repin/disabled)
Example INFO log would gain:
"session_id": "a1b2c3d4e5f6...", "sticky_outcome": "hit", "sticky_source": "session_header"
Olla's sticky session balancer computes affinity keys and tracks outcomes (hit/miss/repin/disabled), but none of this information appears in request logs.
The
X-Olla-Session-IDheader is set by clients, used byComputeStickyKey()to derive affinity keys, and echoed back in responses — but the actual session ID and sticky outcome are never logged.Currently,
handler_proxy.gologs at INFO and DEBUG levels, but neither includes:session_id(theX-Olla-Session-IDvalue)sticky_outcome(hit / miss / repin / disabled)sticky_source(session_header / prefix_hash / auth_header / ip)This makes it impossible to answer questions like:
Suggested fix:
Add
session_idandsticky_outcomefields to the INFO-level log inlogRequestStart()andlogRequestResult(), and optionally includesticky_sourcein DEBUG logs. These fields should be read from the request context keys:constants.ContextStickyKeyKey→ session IDconstants.ContextStickyKeySourceKey→ key sourceconstants.ContextStickyOutcomeKey→ outcome (hit/miss/repin/disabled)Example INFO log would gain: