Operational drain / restore — peer weight picks the target

Weight 100 more often · 50 less · 0 excluded from new-request candidates (connection and handler stay)

Operational drain / restore — peer weight picks the target Weight 100 more often · 50 less · 0 excluded from new-request candidates (connection and handler stay) channel runtime · picks new-request target · client application channel runtime picks new-request target runtime · Weight = 100 · server A runtime Weight = 100 typed handler · server A typed handler runtime · Weight = 50 · server B runtime Weight = 50 typed handler · server B typed handler runtime · Weight = 0 · drain · server C runtime Weight = 0 · drain typed handler · server C typed handler picked more often picked less often excluded from new-request candidates client application server A server B server C

Peer weight (Weight)

  • • The client runtime consults Weight to pick a new-request target — it picks server A (100) more often and server B (50) less often.
  • • Weight = 0 (drain) only excludes it from new-request candidates — it doesn't close the serving socket, in-flight requests finish to the end, and the typed handler and descriptor row stay (graceful drain). 100 restores normal serving.