Skip to content

Releases

Cabby 0.5.11

Choose a tag to compare

@DaniG2k DaniG2k released this 30 Nov 19:34

Cabby 0.5.11 fixes the catch-up after a pub/sub outage that 0.5.10 added: messages are no longer
lost when the connection drops again before the catch-up is done, or when two servers' messages
arrive out of order during it. It also closes a connection after a very large request head
instead of keeping its memory, turns on TCP keep-alive for accepted connections, and corrects the
advice on sharing one Redis between applications.

Changed

  • url is upgraded from 2.5.8 to 2.5.9 (RUSTSEC-2026-0592, in Url::origin()). url comes in
    through the NATS and Redis clients, which parse the URLs of the configuration, and Cabby's own
    code does not call that function. compat/scripts/check-deps.sh now also fails on a RustSec
    advisory for any locked dependency.
  • A connection whose request head (the request line and headers) is over 64 KiB is closed after the
    response to that request, which says Connection: close, on every listener (D-150).
    Before, one request with a head near the 1 MiB + 4 KiB limit left about 1 MiB of memory held by
    its connection for as long as the client kept it open, idle: in a local test, 60 such connections
    took the server from 12 to 72 MiB, where it now stays at 13 MiB. Smaller heads keep the
    connection for further requests as before, a streamed response (SSE, Durable Streams, long polls)
    is written whole before the close, and WebSocket upgrades are not affected. What counts is what
    the server read up to the end of the head, so the start of a large body that arrives together
    with its head counts too: a client that posts large broadcast batches on a reused connection can
    see Connection: close and opens a new connection for its next request.

Fixed

  • Messages published while a server's pub/sub connection was down a second time are delivered
    once it is back (D-146). When the connection broke again before the catch-up from the first
    outage was done (a stream still being read, or, with NATS pub/sub, within the 5 seconds a
    reconnected server waits for its subscriptions), the messages published during the second
    outage never reached that server's clients, and nothing was logged for them. Now a stream that
    has not been caught up when the connection breaks again keeps the live messages it holds and
    is read again from its position once the connection is back, and a NATS reconnect that is lost
    before its subscriptions are confirmed no longer counts as the connection coming back.
  • Messages broadcast by two servers right after a server's pub/sub connection came back are no
    longer dropped there while it catches up (D-146). With the pairs that order each server's
    messages only (the NATS and Postgres brokers, or the Redis broker with another pub/sub, D-144),
    a message that arrived after one with a higher offset was taken for one already delivered and
    never reached that server's clients, with nothing logged; it is now delivered, as it would be
    outside a catch-up. A late copy of a message an earlier catch-up delivered is no longer
    delivered a second time after a later one.
  • A stream whose position could not be read (the broker failed the request) is asked for again,
    after 1, 2, 4 and 8 seconds, so it is caught up after a later pub/sub outage; after 5 failed
    requests the server logs a warning. When the pub/sub connection comes back, one warning now
    counts the subscribed streams that had no known position and so were not caught up (a stream
    subscribed less than a second before, or again within a minute), and a catch-up interrupted
    by another outage no longer logs that it delivered the missed messages of 0 streams.
  • Docs: a key prefix does not let two applications share one Redis. docs/redis-broker.md said
    to give each application its own prefix; the prefix separates the keys only, and broadcasts,
    presence events and remote disconnect commands travel over Redis pub/sub, which every Cabby
    server on the same Redis shares whatever its prefix or database number. Each application, and
    each environment, needs its own Redis.
  • Accepted connections on every listener have TCP keep-alive: the first probe after 15 s without
    traffic, then one every 15 s, and the connection is dropped after 9 unanswered probes (Linux and
    macOS). Before, a client that vanished without closing its connection (a device switched off, a
    dropped NAT entry) was never noticed where the server sends nothing for long periods: an idle
    HTTP keep-alive connection kept its socket, and a Pusher session, which gets no server ping, kept
    its socket and its presence-channel membership.

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.11. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit cc9e6d7d2cc9.

Cabby 0.5.10

Choose a tag to compare

@DaniG2k DaniG2k released this 30 Nov 16:43

Cabby 0.5.10 is about running several servers: presence is shared across them with the Redis
broker, each server delivers a stream's messages in the order of their offsets, and a server that
lost its pub/sub connection delivers what its clients missed once it is back. It also adds
counters for history requests and session restores, and fixes a batch of Redis, PostgreSQL, NATS
and shutdown issues.

Added

  • Presence across servers with the Redis broker (--broker=redis, D-143): every server on the
    same Redis and key prefix lists the same members of a stream or presence channel (the Action
    Cable presence command, the Pusher member list and users endpoints), each user once. A join is
    announced once in the cluster, when a user's first session anywhere joins, and a leave once,
    when the user's last session anywhere leaves or expires: a user with sockets on two servers is
    no longer announced twice, and closing one of them no longer announces a leave. The members of a
    server that stops without a shutdown leave presence_ttl after their last touch, announced once
    by a surviving server. Touches are sent in batches by a background thread and never make a
    session wait for Redis; presence that Redis lost comes back with the sessions' next touches.
    Every join and leave is recorded in Redis with the change and delivered at least once: a lost
    reply or a server that dies at a bad moment no longer loses it, and each server delivers it to
    its clients once and in order (the announcement carries a number through pub/sub, and a server
    drops a copy, or an announcement that arrives after a later one of the same user; it remembers
    the last 8,192 users for 5 minutes). A session restore that hits a Redis error is completed at
    the session's next touch instead of the user being announced as leaving; a shutdown acknowledges
    the announcements its server delivered; an expiry refused as a stale claim (Redis Cluster nodes
    whose clocks differ) is logged once a minute. When every server lost Redis for a while, touches
    come before expiry, so connected members are not announced as leaving. A restored session
    (X-ANYCABLE-RESTORE-SID) keeps its presence on the server that restores it, presence set by
    the application (0.5.9) holds on every server, also after a restore on another one, and an
    unsubscribe from a stream without presence costs no round trip. Needs Redis 6 or later; the ACL
    in docs/redis-broker.md lists the extra commands. The memory
    and SQLite brokers keep presence per server, and the NATS and Postgres brokers keep none.
  • Recovery metrics (D-145): history_requests_total (client requests for stream history over
    WebSocket, SSE and Durable Streams), rejected_history_requests_total (those answered with
    reject_history or 410 Gone), history_msg_total (messages sent from history),
    restored_sessions_total (sessions restored from the session cache) and
    failed_session_restores_total (restores asked for that did not happen). They carry the metrics
    namespace like the others; see Recovery metrics.
  • Postgres pub/sub: postgres_unpublished_total counts the messages of publish batches that
    failed and were dropped (no connection, a timeout, a server error). A failed batch was counted
    as one error in postgres_errors_total, whatever its size; it still is, and it is still not
    sent again, since a retry could publish some of its messages twice.

Changed

  • Redis broker with Redis pub/sub on the same Redis settings (the default for --broker=redis):
    the broker's user needs PUBLISH on the streams' channels (+publish and &*, or patterns
    that match the stream names); Redis pub/sub on the same user needed them already. Without them,
    a broadcast fails with NOPERM and is not stored (Redis 7 and later). The startup line reads
    Redis broker is ready (Redis 7.4.12, epochs per stream, publishing to Redis pub/sub). See
    Redis ACL.

Fixed

  • Messages missed while a server's pub/sub connection was down are delivered once it is back
    (D-146). With several servers, a broadcast published while one server's Redis pub/sub,
    LISTEN or NATS connection was down never reached that server's clients, and nothing told
    them: in a local test with two servers, the clients of the cut-off server missed all 20
    messages broadcast between the cut and its resubscription, with every pub/sub. Now, with the
    Redis, NATS or Postgres broker, the server remembers the position of every stream it has
    subscribers on, holds the live messages from the loss of the connection, and once every stream
    is subscribed again reads what each stream missed from the broker and delivers it, then the
    held messages: once, in offset order, as ordinary messages (clients need no change). A stream
    that keeps a subscriber for a second without a message asks the broker for its position with
    one small request (batched, at most once a minute per stream; no message is read). Reads are
    four at a time and retried for up to 10 seconds when the broker can't be reached; a history
    that no longer holds every missed message, or a new epoch, is logged once per outage. With the
    memory and SQLite brokers each server keeps only its own history, so nothing can be read back.
    See After a pub/sub outage.

  • Live order follows history order (D-144). Two broadcasts to one stream handled at the same
    moment could reach subscribers in the reverse order of their offsets (with the Redis broker,
    about a third of 2000 concurrent broadcasts in a local test). Each server now hands a stream's
    stored broadcasts to its clients and to pub/sub in offset order, for every client (Action
    Cable, Turbo Streams, SSE, Pusher):

    • memory and SQLite brokers: the store and the hand-off are one step per stream; other streams
      don't wait;
    • Redis broker with Redis pub/sub on the same Redis: the broadcast script publishes the message
      it stores, so every server gets a stream's messages in offset order, whichever server stored
      them, without a separate PUBLISH per broadcast. A stored broadcast is now always published: before,
      a broadcast whose publication failed twice was stored and never delivered live;
    • NATS and Postgres brokers, and the Redis broker with another pub/sub: broadcasts of one server
      are handed over in offset order without waiting for each other's store. Messages that went
      through different servers are not ordered with each other.

    See Delivery order.

  • A slow client's disconnect no longer holds up other broadcasts. When a session's queue went
    over --ws_max_pending_size, the hub thread delivering the broadcast (each delivers the
    messages of many streams) also ran the rest of the disconnect: the session cache and presence
    writes (a round trip with the NATS, Redis or PostgreSQL broker) and, during a shutdown, the
    Disconnect RPC, and delivered nothing else meanwhile. The session still closes and queues its
    disconnect message and close frame on the spot, so it takes no further message; the rest now
    runs on the node's command pool.

  • A NATS server URL without a host (nats://:4222) connects to this machine (127.0.0.1)
    instead of being refused. With --embed_nats, --enats_addr=nats://:4222 (the embedded
    server on every interface) and NATS pub/sub, broadcasts or the NATS broker, Cabby exited at
    startup: failed to start subscriber, cause: nats: invalid server URL "nats://:4222": NATS server URL is invalid: empty host. The same holds for such a URL in --nats_servers.

  • Embedded NATS (--embed_nats): the watchdog that stops the nats-server child when Cabby is
    killed is now the cabby executable itself (it shows as cabby-enats-watchdog), no longer
    /bin/sh, so it also runs in images without a shell, such as the distroless image. It stops
    the child as a shutdown does: SIGINT, then SIGKILL if the child is still running after 10
    seconds (before, a child that ignored SIGINT kept running). Cabby also signals the child
    without the kill program: without one, a shutdown waited 10 seconds and then killed the
    child instead of stopping it gracefully.

  • Graceful shutdown waits for TLS handshakes in progress: an HTTP connection counts as open from
    the moment it is accepted, no longer only once its TLS handshake is done, so a shutdown no
    longer finishes while a client is still completing one (handshakes stay bounded by 5 seconds).

  • Redis pub/sub publishing while Redis can't be reached logs ERR failed to connect to Redis
    once, not once per dropped batch (200 broadcasts gave 200 records), and the first batch Redis
    takes again logs INF Redis publishing restored with dropped=<n>, the number of messages
    dropped meanwhile (D-052).

  • Redis Streams broadcasting with --redisx_read_block_milliseconds=0 (each read waits until an
    entry arrives): reads now wait without a time limit; Cabby gave a read the block time plus 10 s,
    so it reconnected every 10 s. Connections to Redis send TCP keepalive probes every
    --redis_keepalive_interval, so a dead connection is still noticed. Shutdown no longer waits
    for such a read: it removes the consumer on a new connection (D-147).

  • Redis Cluster: ?client_name= in the Redis URL names the commands connection too (publishing,
    Redis Streams, the Redis broker), with CLIENT SETNAME to every node once it is connected; only
    the pub/sub subscriber's connection was named. A node the connection reaches later (after a
    topology change) is not named until Cabby opens the connecti...

Read more

Cabby 0.5.9

Choose a tag to compare

@DaniG2k DaniG2k released this 30 Nov 08:59

Cabby 0.5.9 settles who sets presence on a channel the application runs: once the application
has joined a subscription to presence, the client's own join and leave commands no longer
change it.

Changed

  • Presence on a channel the application runs: once one of the application's answers joins a
    subscription to presence (join_presence in a Rails channel's subscribed callback or in an
    action), that subscription's presence is set by the application's answers until the client
    unsubscribes. The client's own join and leave commands for it, and the presence a
    subscribe command carries, change nothing and announce nothing: the client gets no reply,
    and the session logs failed to handle incoming message with error="presence is set by the application for identifier: ...; join and leave from the channel's callbacks and actions instead". The application's later answers still join and leave, and the presence command
    still lists the set. The client's join and leave work as before on $pubsub streams and on
    channels that only enable presence (the presence stream in the channel state, with no join in
    an answer). The node keeps this in the subscription's channel state under $pa, which the
    application receives with later commands as it receives $p; a restored session keeps it, and
    an unsubscribe drops it.

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.9. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit e1d4341725da.

Cabby 0.5.8

Choose a tag to compare

@DaniG2k DaniG2k released this 29 Nov 18:16

Cabby 0.5.8 is a performance release: with many streams of history in the memory broker, the
once-a-second expiry pass no longer pauses broadcasts and history reads; Pusher messages are
encoded with less work; and an idle connection takes a little less memory. Nothing changes in
what clients receive.

Added

  • cargo xtask stress: the scenarios streams (many streams with history under the memory
    broker, presence, history requests), pusher (fan-out over the Pusher protocol with the Pusher
    HTTP API as the publisher: one channel per event, multi-channel events or batch_events) and
    churn (subscribe, unsubscribe and reconnect churn under broadcasts), with the delivery latency
    by phase within the second, so a pause that comes back once a second shows
    (docs/stress-testing.md). --source-patch builds now work on Linux
    and rebuild incrementally. Development tooling; the server is unchanged.

Changed

  • Memory broker (--broker=memory): the once-a-second expiry pass visits only the streams with
    something to expire or drop, from a queue of wake-up times, instead of every stream under the
    lock of the whole stream map. With 200,000 streams of history, the pass paused every broadcast
    and history read for about 24 ms each second; on an 8-CPU machine (cargo xtask stress streams --streams 200000, medians of 5 runs) the readers' p99.9 latency goes from 23.6 ms to 0.70 ms,
    p99 from 1.26 ms to 0.37 ms, history requests' p99 from 14.5 ms to 0.37 ms, and the server's
    CPU time under the load from 4.43 s to 4.00 s. With 20,000 streams, p99.9 goes from 1.78 ms to
    0.99 ms. The queue costs about 46 bytes per stream (8.8 MiB with 200,000 streams). Expiry times
    and results are unchanged.
  • Pusher: the encoder reads replies and disconnects in place instead of through a JSON copy of
    each message, and turns a $pusher identifier into its channel without parsing it when it has
    nothing to unescape; a REST API event goes to the node as a message instead of JSON that is
    written and parsed again for each channel, and its debug log line is built only when debug
    logging is on. With 5,000 events a second to 100 channels of one subscriber each (cargo xtask stress pusher --clients 100 --subscriptions 1 --rate 5000, medians of 3 runs on an 8-CPU
    machine) the server's CPU time goes from 9.61 s to 8.70 s (-9.5%); at the default fan-out (1000
    clients, 5 of 100 channels, 1,000 events/s) it goes from 15.66 s to 15.22 s (-2.8%). Frames are
    unchanged.
  • A session's write queue, which a WebSocket session uses only while another frame is being
    written, allocates its buffer at its first frame instead of when the session starts, and
    shrinks it only when at most a quarter of it is used, so a queue that fills and drains around a
    power of two keeps its buffer; the disconnect queue does the same. With 20,000 idle WebSocket
    connections (cargo xtask stress idle --connections 20000, medians of 5 runs on an 8-CPU
    machine) the server's memory per connection goes from 10.1 KiB to 9.8 KiB and its peak RSS from
    207.8 MiB to 202.4 MiB.

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.8. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit bfbcbe6b0df2.

Cabby 0.5.7

Choose a tag to compare

@DaniG2k DaniG2k released this 29 Nov 13:44

Cabby 0.5.7 no longer spends a thread, or megabytes of memory, on an SSE or Durable Streams client
that stops reading: with 800 such clients the server stays near 100 threads and 43 MiB, and a
graceful shutdown takes about 5 s. A client that takes nothing for 5 s is disconnected and
counted as a write timeout. No setting changes. It stays compatible with AnyCable server 1.6.22.

Added

  • cargo xtask stress: stress and worst-case scenarios (idle, fanout, reconnect, timers,
    disconnect) that run only inside a Docker container with a pids limit, a memory limit, a CPU
    limit, a file descriptor limit and a timeout, under a watchdog that stops the run at a thread or
    memory ceiling, with a JSON report per run and stress compare for two of them
    (docs/stress-testing.md). Development tooling; the server is
    unchanged.

Changed

  • SSE and Durable Streams: a client that takes nothing for 5 s while events wait for it is now
    disconnected with its connection closed, and counts in timeout_server_msg_total (and
    failed_server_msg_total), as a WebSocket client does. Before, its session closed but its
    connection stayed open with up to 2 MiB queued, and no timeout was counted. Such a client reads
    what was already sent, then the end of the connection; EventSource reconnects (D-141).
  • The node's task pool (timer callbacks, session writes) has at most 512 threads again. With the
    change below it never comes near: in the stress runner its peak was 15 to 47 threads.

Fixed

  • SSE and Durable Streams: writes to a client that stops reading no longer wait for it on a
    thread. The event is refused and kept until the client reads, as over a WebSocket, its pings
    are queued behind it, and the queue holds the broadcast the hub encoded once instead of a copy
    per client. Measured with the stress runner (cargo xtask stress, each stalled client filled
    with 40 broadcasts of 64 KiB): with 300 stalled clients, 73 server threads at peak instead of
    775 and 27 MiB RSS instead of 659 MiB; with 800, 109 threads and 43 MiB, where 0.5.6 passed
    2,000 threads and was stopped. Reading clients' p99 latency stays at 1 to 2 ms (D-141).
  • A graceful shutdown with SSE clients that do not read takes about 5 s (their write timeout)
    instead of the whole shutdown timeout: 4.5 s instead of 30 s with 300 or 800 such clients
    (D-141).
  • SSE and Durable Streams requests run their sign-in, subscriptions and disconnect on the node's
    command pool, as WebSocket sessions do, instead of a thread each: a burst of 800 requests ending
    at once no longer starts 512 threads.

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.7. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit 140296c48b54.

Cabby 0.5.6

Choose a tag to compare

@DaniG2k DaniG2k released this 29 Nov 10:31

Cabby 0.5.6 starts on Fly.io with the published image, closes SSE and Durable Streams
connections without waiting for a stalled client, and makes the Postgres broker's pruning use
indexes. No setting changes. It stays compatible with AnyCable server 1.6.22.

Fixed

  • On Fly.io, a server without a nats-server executable (the Docker image has none) no longer
    exits at startup when the detected fly preset turns on embedded NATS. It starts without
    embedded NATS, NATS pub/sub or NATS broadcasts, so this node does not share broadcasts with
    other Machines, and logs one warning that says so. Install nats-server (or set
    CABBY_NATS_SERVER_BIN) to form the cluster, or set --pubsub=none to silence the warning.
    --embed_nats or an explicit --presets=fly still stops the server without nats-server
    (D-139).
  • SSE and Durable Streams: closing a connection (at sse_ttl, on a disconnect or at shutdown)
    no longer waits up to 5 s behind a write to a client that has stopped reading. That write is
    dropped, and the response ends at once with the events sent before it (D-031).
  • Postgres broker: pruning (every 30 s) reads expired history entries, streams and sessions
    through indexes instead of scanning the tables, with a new index on <prefix>streams (deadline_sec). On an existing database the first node to start builds it in the background
    with CREATE INDEX CONCURRENTLY; with --postgres_auto_migrate=false, create it with the
    statement in docs/postgres.md. A long pruning pass no longer delays the
    1 s check of the shared epoch (D-071).
  • Session timers: re-arming after a ping, pong, keepalive or presence timer fires no longer takes
    the process-wide timer lock to stop the timer that just fired, one lock fewer per timer for
    every session.
  • An ordinary unsubscribe no longer logs ERR failed to remove presence (error="stream not found" with the memory or SQLite broker when the session joined no presence there, error="presence not supported" with brokers without presence). It is now a debug line, no presence to remove;
    other errors still log at error level (D-140).

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.6. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit a1d5082bfe1c.

Cabby 0.5.5

Choose a tag to compare

@DaniG2k DaniG2k released this 29 Nov 02:05

Cabby 0.5.5 accepts full origins such as https://app.example.com in --allowed_origins, adds
Cabby names next to the AnyCable ones (request headers, the token subprotocol, response and RPC
headers, and an optional cabby metrics namespace), and no longer sends the socket that joins a
Pusher presence channel a member_added for itself. One setting is new, --metrics_namespace;
every AnyCable name and default works as before. It stays compatible with AnyCable server 1.6.22.

Added

  • --allowed_origins (and cors_hosts under [api]) accepts full origins next to host
    patterns: https://app.example.com, http://localhost:8000, https://*.example.com. Such an
    entry needs the origin's scheme and host; without a port it matches the scheme's default port,
    written or not, and with a port only that port. A trailing slash is ignored. Before, as in
    AnyCable, an entry with a scheme never matched: the WebSocket upgrade was refused and CORS
    responses had no Access-Control-Allow-Origin (D-128,
    docs/configuration.md).
  • Cabby names next to the AnyCable ones, so Cabby runs without anycable in any name; every
    AnyCable name works as before:
    • X-Cabby-Restore-Sid is read before X-AnyCable-Restore-Sid on the WebSocket upgrade, and
      any X-Cabby-<suffix> request header before X-AnyCable-<suffix>; a non-empty Cabby header
      wins (D-129).
    • cabby-token.<jwt> in Sec-WebSocket-Protocol carries the JWT as anycable-token.<jwt>
      does, and wins over it unless empty (D-130).
    • WebSocket upgrades, SSE and Durable Streams responses carry x-cabby-version (Cabby's
      version) next to x-anycable-version (D-131).
    • HTTP RPC calls send every metadata pair as x-cabby-meta-<key> as well as
      x-anycable-meta-<key> (D-132).
    • --metrics_namespace=cabby (CABBY_METRICS_NAMESPACE, namespace under [metrics]) names
      the Prometheus metrics cabby_* and the default StatsD prefix cabby.; the default stays
      anycable_go (D-133).
  • --print-config starts with # Cabby server configuration. and points to
    https://docs.cabbyhq.com/configuration (D-135).

Changed

  • An allowed_origins or [api] cors_hosts entry that can never match (a path, a scheme other
    than http or https, an empty host, whitespace inside it) is named in a warning at startup,
    WRN allowed_origins entry "https://app.example.com/path" never matches and is ignored: it has a path, query or fragment. Fix or remove the entry to silence this warning context=config.
    The server starts as before, without that entry. Host patterns match as before.
  • Docker image: CABBY_HOST or CABBY_BROADCAST_ADAPTER overrides the image's default without
    the "both CABBY_X and ANYCABLE_X are set" warning. The image lists its defaults in
    CABBY_IMAGE_DEFAULTS; the values it uses are unchanged (D-134).
  • Breaking (Rust embedding API): cabby_server::server::origin_allowed is removed, and
    cabby_server::server::write_cors_headers takes &AllowedOrigins instead of &[String]. Parse
    the setting once with AllowedOrigins::new (or AllowedOrigins::parse, which also returns the
    entries that can never match) and ask it with allows.

Fixed

  • Pusher presence channels: the socket that joins gets subscription_succeeded and no
    pusher_internal:member_added for its own user; the other subscribers still get one, as with
    Pusher. Laravel Echo's joining callback no longer runs for the current user (D-136).

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.5. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit 2466930cc149.

Cabby 0.5.4

Choose a tag to compare

@DaniG2k DaniG2k released this 28 Nov 10:15

Cabby 0.5.4 is compatible with AnyCable server 1.6.22: the request body limits get flags, TTL
settings and the disconnect rate are checked at startup, ping intervals are capped at a day from
every source, a remote disconnect makes the closed sessions' cache entries unrecoverable, and
Pusher private channels need the Pusher endpoint's verification. Two settings are new; values
that AnyCable 1.6.22 refuses now stop the server.

Added

  • --http_broadcast_max_body_size and --api_max_body_size (CABBY_* and ANYCABLE_*
    variables) set the max_body_size of [http_broadcast] and [api]: 1048576 by default, 0
    for no limit, as in AnyCable 1.6.22.

Changed

  • Compatible with AnyCable 1.6.22: cabby --version prints cabby <version> (AnyCable 1.6.22 compatible), the start line reads Starting Cabby <version> (AnyCable 1.6.22 compatible), and
    the x-anycable-version header is 1.6.22.
  • history_ttl, sessions_ttl and presence_ttl outside 0 to 31536000 seconds (a year) stop
    the server before it starts, also with --print-config: sessions_ttl must be between 0 and 31536000 seconds, got -1, as in AnyCable 1.6.22. Before, any value was accepted.
  • The disconnect rate (--disconnect_rate, [disconnector] rate) outside 1 to 1000000000 stops
    the server at startup (failed to initialize disconnector, cause: disconnect rate must be between 1 and 1000000000, got 0), and its period is one second divided by the rate in
    nanoseconds (300 calls/s: 3.333333 ms; 5000 calls/s: 200 µs), as in AnyCable 1.6.22. Before,
    the period was whole milliseconds (1000 / rate), and Cabby ran a rate below 1 at 1 call/s
    and one above 1000 at 1000 calls/s (D-015, resolved).
  • Ping intervals: a ?pi= that is zero, negative or not an integer is ignored with WRN invalid ping interval value, must be a positive integer, and the server's interval applies. Before, as
    in AnyCable 1.6.21, zero and negative values disabled pings, and the warning read "must be
    integer". --ping_interval and the SSE and Durable Streams ping intervals are capped at a day,
    as ?pi= already was (D-054).
  • After a remote disconnect, the session it closes rewrites its cache entry marked unrecoverable
    ("unrec":true) and deletes it when it disconnects, as in AnyCable 1.6.22; an entry so marked
    is not restored. Every broker deletes session entries: memory, SQLite, NATS, Redis and
    Postgres. Cabby's record of the remote disconnect, which also covers the identifiers' sessions
    that were not connected, stays (D-084).
  • Cache entries write the Disconnect interest as "disc", left out when false, as in AnyCable
    1.6.22. Entries written before, with "Disconnectable", are still read with their interest
    (D-125). A node on 0.5.3 or earlier reads only the earlier key: while nodes of both versions
    share a session cache, a session that an older node restores from an entry written by this
    version starts without its Disconnect interest, until one of its later commands sets it again.
  • A session the application did not authenticate has no Disconnect interest in the auto mode,
    as in AnyCable 1.6.22.
  • The streams listed in a reply that is not a success (a rejected subscription, a failed action)
    are not started, as in AnyCable 1.6.22. Before, Cabby ignored them only for a channel the
    session does not have (D-091).
  • Pusher: the controller rejects a private or presence subscription whose signature the Pusher
    endpoint did not verify, and presence data without a user id (null included) fails the
    subscription with presence data must contain user_id, as in AnyCable 1.6.22. A presence
    broadcast that is not an object, has no string id or a type other than join and leave fails
    to encode with AnyCable's texts; before, an unknown type was sent as an event without a name
    (D-030).
  • Durable Streams: a client cursor too large to advance (above 9223372036854775746) gets the
    current interval, as an old one does, as in AnyCable 1.6.22. Before, it gave
    9223372036854775807.
  • Redis URLs: an empty or scheme-only entry in a list means localhost:6379, a path of /
    selects no database, and an addr without a port is a host with port 6379, as in AnyCable
    1.6.22 (rueidis 1.0.80). Before, the first two failed with redis: invalid database number,
    and addr=replica.example took the URL's host.

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.4. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit 71ee755b4126.

Cabby 0.5.3

Choose a tag to compare

@DaniG2k DaniG2k released this 28 Nov 04:29

Cabby 0.5.3 changes when a session is cached and restored, makes a remote disconnect close every
connection of the identifier, and keeps a node's pub/sub subscriptions in step with the sessions
that hold them, following AnyCable 1.6.22 where it changed the same behavior. One setting reads
differently: the application secret none now counts as not set, with a warning at startup. It
stays compatible with AnyCable server 1.6.21.

Fixed

  • Only sessions that the application authenticated are written to the session cache or keep
    their entry alive. A session with a failed authentication is no longer cached, as in AnyCable
    1.6.22 (D-083).
  • After a remote disconnect, a node authenticates the identifiers' earlier sessions through the
    application instead of restoring them from the session cache, for the sessions TTL. Sessions
    authenticated afterwards are restored as usual. Cache entries record when the session was
    authenticated. AnyCable 1.6.22 removes the cache entry of a session that a remote disconnect
    closes; Cabby also covers the identifiers' sessions that were not connected at that moment
    (D-084).
  • A remote disconnect (Rails' ActionCable.server.remote_connections.where(...).disconnect)
    closes every connection of the identifier, as in AnyCable 1.6.22. Before, as in AnyCable
    1.6.21, only one of them was disconnected, and the identifier's other connections stayed open
    and subscribed (D-085).
  • The application secret set to none (--secret=none, CABBY_SECRET=none,
    ANYCABLE_SECRET=none or secret = "none", which cabby --print-config writes when no secret
    is set) is treated as not set: no other secret is derived from it, and Cabby logs a warning at
    startup. Before, as in AnyCable 1.6.21, none was used as the application secret; AnyCable
    1.6.22 no longer derives the HTTP broadcast and RPC secrets from it either. none still turns
    off a single secret, such as --http_rpc_secret=none (D-086).
  • The node's pub/sub subscription for a stream now follows the sessions that hold it (D-091). A
    channel that starts a stream it already has holds it once, so the node unsubscribes when the
    last session leaves; before, the extra reference kept the subscription until restart. A stop
    for a stream the channel does not hold changes nothing; before, it could unsubscribe the node
    while another session still held the stream, and that session stopped receiving broadcasts
    from other nodes. Streams in a reply for a channel the session does not have (such as a
    rejected subscription) are not subscribed, as in AnyCable 1.6.22.

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.3. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit d93978ab1000.

Cabby 0.5.2

Choose a tag to compare

@DaniG2k DaniG2k released this 27 Nov 16:36

Cabby 0.5.2 gives request bodies a time limit in the HTTP broadcast endpoint, the API and the
Pusher API, answers 400 for stream names that are not valid UTF-8 in SSE, Durable Streams and
the API, and sends the StatsD metrics still queued when the server stops. No setting changes. It
stays compatible with AnyCable server 1.6.21.

Fixed

  • HTTP broadcasts (--broadcast_adapter=http), the API (POST <api>/publish) and the Pusher
    REST API (POST .../events, .../batch_events): a request body must arrive within 5 s of
    the request's checks, as an SSE POST body must since 0.4.2; a later or stalled body is
    answered 422 (failed to read request body, the API with error="i/o timeout") and the
    connection closes. Before, reading it had no deadline, so a body that stopped arriving held
    the request until the client closed the connection (D-119).
  • SSE (--sse): a GET whose identifier, channel, stream, signed_stream or
    turbo_signed_stream_name parameter is not valid UTF-8 once decoded (?stream=%ff) is
    answered 400 (failed to build subscribe command error="query parameter \"stream\" is not valid UTF-8"). Durable Streams (--ds) answers 400 for such a signed parameter, as
    for such a stream path since 0.4.2. Before, the value was decoded with U+FFFD, so %ff,
    %fe and %EF%BF%BD named the same stream (D-120).
  • API: GET <api>/presence/<stream>/users with a stream that is not valid UTF-8 once decoded
    is answered 400. Before, every such stream read the presence of the stream named U+FFFD
    (D-121). Other query parameters (pi, ptp, sid, history_since, offset, cursor, …)
    are read as before; D-122 records how they differ from AnyCable.
  • StatsD (--statsd_host): metrics queued just before shutdown are sent before the process
    exits, as AnyCable's StatsD client flushes them on close. Before, stopping the writer did not
    wait for them, so they could be lost when the process ended. The wait is at most 1 s, so a
    StatsD server that stops reading cannot hold the shutdown; a writer that is not connected
    drops them at once, as before (D-123).
  • mruby metrics formatter (--metrics_log_formatter, mruby builds): a formatter slower than
    the metrics interval formats the newest snapshot; snapshots written while it is busy replace
    the one waiting. Before, every snapshot was queued without a limit, so the formatter fell
    further behind and the queue grew each interval (D-124).
  • mruby (mruby builds): a decoding error for a string that is not an integer quotes the
    string as Go's strconv.Quote does (parsing "\a", parsing "\u0085"), through the shared
    quoting helper. Before, the mruby module had its own quoting, which wrote these characters as
    \x07 and \x85.

Install

Download the archive for your platform and SHA256SUMS, then check it with
shasum -a 256 -c SHA256SUMS --ignore-missing (or sha256sum -c --ignore-missing).
Docker: docker pull ghcr.io/danig2k/cabby:0.5.2. Guides: https://docs.cabbyhq.com/install

Built from DaniG2k/cabby commit 4352c167f81a.