Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RAW] swim: introduce failure detection component
Failure detection components allows to find which members are already dead. Public API: swim.cfg({server = <uri>, members = <array of uris>, heartbeat = <seconds>}) Configures the SWIM module. @server - URI of UDP server to which other cluster members will send SWIM messages. It should have the format "ip:port". @members - array of URIs explicitly defined by a user. These members are never deleted from members table until they are removed from the configuration explicitly. SWIM downloads from them their members tables, merges with its own and repeats. @Heartbeat - how often send a part of members table to another member. Note, that it is not how ofter send the whole table, nor how ofter to send the table to all members. It is only one step of the protocol. swim.stop() Stops the SWIM module: shuts down the server, closes socket, destroys queues, frees memory. Note that after it swim.cfg can be called again. swim.info() Show info about each known member in the format: { ["ip:port"] = { status = <alive/dead>, incarnation = <growing unsigned number> } } Closes #3234
- Loading branch information