Skip to content
Search ffkv docs

Search the complete handbook, locally.

    CLIENT KILL

    Terminates open connections.

    Browse all commands · Upstream source documentation

    Reference fieldValue
    Canonical nameCLIENT KILL
    Catalog groupConnection commands
    Upstream since2.4.0 — upstream Redis/module version, not an ffkv release
    Pinned catalogRedis 8.10.0
    CLIENT KILL <ip:port | <[ID client-id] | [TYPE <NORMAL | MASTER |
    SLAVE | REPLICA | PUBSUB>] | [USER username] | [ADDR ip:port] |
    [LADDR ip:port] | [SKIPME <YES | NO>] | [MAXAGE maxage]
    [[ID client-id] | [TYPE <NORMAL | MASTER | SLAVE | REPLICA |
    PUBSUB>] | [USER username] | [ADDR ip:port] | [LADDR ip:port] |
    [SKIPME <YES | NO>] | [MAXAGE maxage] ...]>>

    Connection state, selected database, authentication and protocol negotiation belong to the same persistent connection. RESP2 is the default; HELLO 3 selects RESP3. Streamed/unknown-length RESP3 frames are not supported.

    Source: README.md:96–120, 391–395; tests/bdd/features/connections.feature.

    All requests share the 8 MiB framing/1,024-argument ingress limit; normal RESP replies have 64 MiB wire/logical budgets with bounded nesting/value counts. Management and Lua origins impose smaller budgets. These are not a process RSS cap. Catalog inclusion is not exhaustive option or wire-format parity. See limits and compatibility.

    The following fields come from the pinned Redis metadata, not measured ffkv performance or an assertion that ffkv enforces every upstream flag. Running COMMAND INFO/COMMAND DOCS describe the current engine.

    Upstream Redis complexity: O(N) where N is the number of client connections

    Upstream arity: -3 (includes the command name; a negative number is a minimum).

    Command flags: ADMIN, NOSCRIPT, LOADING, STALE, SENTINEL.

    ACL categories: CONNECTION.

    ArgumentTypeConstraints / metadata
    filteroneofRequired
    ↳ old-formatstringdeprecated_since: 2.8.12
    ↳ new-formatoneofmultiple
    ↳ ↳ client-idintegeroptional; token: ID; since: 2.8.12
    ↳ ↳ client-typeoneofoptional; token: TYPE; since: 2.8.12
    ↳ ↳ ↳ normalpure-tokentoken: normal
    ↳ ↳ ↳ masterpure-tokentoken: master; since: 3.2.0
    ↳ ↳ ↳ slavepure-tokentoken: slave
    ↳ ↳ ↳ replicapure-tokentoken: replica; since: 5.0.0
    ↳ ↳ ↳ pubsubpure-tokentoken: pubsub
    ↳ ↳ usernamestringoptional; token: USER
    ↳ ↳ addrstringoptional; token: ADDR
    ↳ ↳ laddrstringoptional; token: LADDR; since: 6.2.0
    ↳ ↳ skipmeoneofoptional; token: SKIPME
    ↳ ↳ ↳ yespure-tokentoken: YES
    ↳ ↳ ↳ nopure-tokentoken: NO
    ↳ ↳ maxageintegeroptional; token: MAXAGE; since: 7.4.0
    Additional pinned upstream metadata
    {
    "group": "connection",
    "since": "2.4.0",
    "history": [
    [
    "2.8.12",
    "Added new filter format."
    ],
    [
    "2.8.12",
    "`ID` option."
    ],
    [
    "3.2.0",
    "Added `master` type in for `TYPE` option."
    ],
    [
    "5.0.0",
    "Replaced `slave` `TYPE` with `replica`. `slave` still supported for backward compatibility."
    ],
    [
    "6.2.0",
    "`LADDR` option."
    ],
    [
    "7.4.0",
    "`MAXAGE` option."
    ]
    ]
    }

    Metadata source · Local snapshot: src/command_metadata.json, key client|kill.

    These are source observations, not a test run performed by this documentation build. A tag identifies scenario intent; an extracted vector identifies a command invocation, which may intentionally produce an error. Scenarios may require setup, multiple connections, persistence, cluster nodes or native-module fixtures.

    • Killing a selected client closes its actual socket without killing another connection — tests/bdd/features/connections.feature:266; command tag and invocation observed.
    • Killing the issuing connection replies with the count before closing its socket — tests/bdd/features/connections.feature:894; command tag and invocation observed.

    The following JSON arrays are the test harness’s argument vectors, not shell commands. Numeric arguments are converted by the harness; objects of the form {"base64":"…"} represent decoded binary bytes, not a literal JSON command argument. Preserve scenario setup and connection ordering. See the CLI guide for shell quoting and binary stdin. No reply is invented or inferred.

    Killing the issuing connection replies with the count before closing its socket — tests/bdd/features/connections.feature:901 (client “self-kill” executes:)

    [
    "CLIENT",
    "KILL",
    "ID",
    {
    "saved": "self-id"
    },
    "SKIPME",
    "NO"
    ]

    Next source assertion: the reply equals:

    1

    Killing a selected client closes its actual socket without killing another connection — tests/bdd/features/connections.feature:277 (I execute:)

    [
    "CLIENT",
    "KILL",
    "ID",
    {
    "saved": "victim-id"
    },
    "SKIPME",
    "YES"
    ]

    Next source assertion: the reply equals:

    1