Condukt.Sessions.Registry.Horde (Condukt v3.0.0)

Copy Markdown View Source

A session registry on Horde.Registry, which sees sessions on every node in the Horde cluster.

config :condukt, session_registry: Condukt.Sessions.Registry.Horde

Options:

  • :name - the Horde.Registry name. Defaults to this module. Every node must use the same one.
  • :members - passed to Horde.Registry. Defaults to :auto, which joins the registries of every connected node as nodes come and go.

Other options, such as :delta_crdt_options, are passed to Horde.Registry unchanged.

Horde replicates names as a CRDT, so a session registered on another node a moment ago may not be found yet, and list/1 may still include a session for a moment after it exits. When two nodes register the same id at once, Horde keeps one and stops the other session with a {:name_conflict, ...} exit. Session ids are generated Condukt.SessionIDs unless a caller passes its own, so that only arises from callers reusing an id.

Requires the optional :horde dependency.