L · Leader Notice
Not a response to a request — a notice the server pushes on its own (cluster only). When a node detects that the Raft leader has changed, it sends the new leader's client address once to every client connected to it.
How It Differs from M
M · Moved | L · Leader Notice | |
|---|---|---|
| Nature | A response to a request | A server-initiated notice (unrelated to any request) |
| Meaning | "This request can't be handled here" | "The leader has changed" (informational) |
| Connection | Close it and reconnect to the new leader | Keep it — update the hint only |
| This node | Definitely not the leader | May well be the new leader itself |
Do not close the connection on L. The node that sent the notice is often the new leader itself, and there may still be requests in flight on that connection.
Why It Exists
Without this notice, a client only learns the leader changed by throwing a request at it and getting bounced with M. L removes that round trip, so the very first request after a failover goes straight to the new leader.
An older client that doesn't know this op can safely ignore it — only performance returns to the pre-notice level (request → M → retry).
Byte notation:
opis an ASCII character, andaddris UTF-8 text (variable-length, shown asNin the structure). The trailing\nis0A.
Flow
Single-server mode has no notion of a leader, so this notice is never sent. See Protocol (Cluster) for cluster behavior overall.