LB::queue

Description

Returns queue information. Connection queuing details:
  • Operates at the TCP level
  • Only engages when the connection limit is hit
  • Queue is specified by length, time, or both (in the pool configuration)
  • Queues operate per-tmm, there is no state sharing
    • Length limit divided by tmm count
    • FIFO guarantees only per-tmm
  • Queued at the pool level for non-persistent connections
  • Queued at the pool member level for persistent connections.
    • If connection limit is overridden by persistence, that connection is not queued
  • When a pool member becomes available, it checks the head of its queue, and of the pool’s queue, and services the flow that got there first.

Currently, there is no explicit control over queuing. Once queued, you can still use existing commands to control flows (e.g. HTTP::respond, node, pool, drop, reject, etc.) There is no support for queue priority at this time, it is strictly FIFO.

Syntax

LB::queue limit depth|time [<pool name>]
LB::queue on connlimit [<pool name>]
LB::queue depth all|one [<pool name> [<addr> <port>]]
LB::queue age head|max|edm|ema [<pool name [<addr> <port>]]
LB::queue queued

LB::queue limit depth|time [<pool name>]

  • Returns queue limit info (depth is per-tmm)

LB::queue on connlimit [<pool name>]

  • Returns “enabled” or “disabled”

LB::queue depth all|one [<pool name> [<addr> <port>]]

  • Returns queue depth information (all is sum of pool members)

LB::queue age head|max|edm|ema [<pool name [<addr> <port>]]

  • Returns queue age statistics
  • Current head of queue, all-time max, exponential-decaying max, or exponential moving-average

LB::queue queued

  • Returns true if this connection is or was queued

Examples

when LB_QUEUED {
log local0. "[IP::local_addr] was queued - [LB::queue depth one
pool1] / [LB::queue limit depth pool1]"
   }
}

which with a queue depth of 5 returns:
Rule queue_log <LB_QUEUED>: 10.10.128.1 was queued - 1/5
Rule queue_log <LB_QUEUED>: 10.10.128.1 was queued - 2/5
Rule queue_log <LB_QUEUED>: 10.10.128.1 was queued - 3/5
Rule queue_log <LB_QUEUED>: 10.10.128.1 was queued - 4/5
Rule queue_log <LB_QUEUED>: 10.10.128.1 was queued - 5/5
Rule queue_log <LB_QUEUED>: 10.10.128.1 was queued - 5/5