Introducing Swift Cluster Membership

It is my pleasure to announce a new open source project for the Swift Server ecosystem, Swift Cluster Membership. This library aims to help Swift grow in a new space of server applications: clustered multi-node distributed systems. With this library we provide reusable runtime-agnostic membership protocol implementations which can be adopted in various clustering use-cases.

swift.org/blog/swift-cluster-membership/

Swift Cluster Membership is a new open-source Swift package for server applications, providing reusable, runtime agnostic implementations of cluster membership protocols for distributed systems like databases and key-value stores.

It introduces the SWIM protocol, a gossip-based system for detecting peer status in clusters, resilient to message loss and network partitions, with extensions like an optional .unreachable state. The SWIM.Instance encapsulates the protocol logic, paired with a SWIMNIOShell using SwiftNIO for asynchronous UDP messaging, and supports metrics and logging via swift-metrics and swift-log.

Developers can implement custom transports by defining peer protocols and handling directives, with an example SWIMNIOExample showing integration for basic peer monitoring. The library invites community contributions to develop additional protocols and enhance its use in scalable, clustered Swift applications.


Category:

Tag:

Year: