github binwiederhier/ntfy v2.31.0

8 hours ago

This release fixes messages that could be lost when a client reconnects, e.g. a phone switching networks, right when messages are published: every server now reads newly written messages from its message cache once a second and sends them to the subscribers that missed them. In load tests with server restarts and crashes, this brought lost messages down from 465 to 2 out of about 615,000. It also adds a /v1/ready endpoint for load balancers, and continues the experimental clustering work with node roles.

Features:

  • Add /v1/ready for load balancers, and the node's role to /v1/health; with clustering, a node with no other active node leads right away instead of after a one-minute hold-off (#2050)
  • Experimental clustering: add experimental-cluster-role to run a passive node that never leads and never takes over another node's subscribers, e.g. one that is not behind the load balancer (#2049)

Bug fixes + maintenance:

  • Fix messages lost when a client reconnects before they are written to the message cache, or when a cluster node's fan-out is lost: every node now reads newly written messages once a second and sends them to the subscribers that missed them (#2040)
  • Write user stats (messages, emails, calls) as increments, so servers sharing one database add up instead of overwriting each other's counts (#1989)
  • Don't add a visitor's anonymous usage to an account's stats when the account takes over that visitor, e.g. right after upgrading (#2041)

Upgrade notes:

  • A reconnect with since=<message ID> now also returns the messages published in the same second as that message, so none are skipped when several servers write out of order. The ntfy apps and web app drop these by ID; your own scripts may see a few duplicates (#2040)
  • Experimental clustering only: this release changes the cluster's node registry schema (version 1 to 2). Downgrading a clustered server to v2.30.0 afterwards requires setting the version back by hand first: UPDATE schema_version SET version = 1 WHERE store = 'node_registry' (#2049)

Don't miss a new ntfy release

NewReleases is sending notifications on new releases.