pub struct MuxTimeouts {
pub frontend: TimeoutContainer,
pub backends: InlineTokenMap<TimeoutContainer>,
}Expand description
The Mux adapter’s timer-wheel handles: the frontend’s, and one per live
backend connection.
The frontend’s key never changes for the life of a session, so its handle
is a named field; the backends’ are an open set, held in an
InlineTokenMap so the usual single backend costs no allocation. The
HashMap<Token, TimeoutContainer> this replaces allocated its table when
the session was built (#1613).
HAProxy goes further: a stream’s deadlines are fixed fields (conn_exp in
include/haproxy/stream-t.h, each channel’s analyse_exp in
include/haproxy/channel-t.h) that process_stream folds into its one
task’s expire with tick_first (src/stream.c), so there is no table at
all. A sozu session keeps one wheel entry per connection instead, because
each connection’s core publishes its own deadline.
Fields§
§frontend: TimeoutContainer§backends: InlineTokenMap<TimeoutContainer>