Ignore messages from known old identities 💬 by Caio 8 months ago (log)
In a scenario where traffic is buffered and/or replayed this could lead to noisy cluster behaviour
In a scenario where traffic is buffered and/or replayed this could lead to noisy cluster behaviour
Showing rendered content. Download source code
Error::DataFromOurselves
in the member logs
See: https://github.com/caio/foca/issues/34This release contains significant changes aimed at freeing users from having to manage their own version of a unique list of members.
Whilst upgrading won't be just trivially bumping the version, it's expected to be very easy and users will probably find themselves deleting more code than writing new one when doing it.
Memory and CPU usage should go down since members and cluster updates are now bound by the number of distinct addresses whereas previously it would grow with the number of distinct identities.
As this is a large change, users should be more cautious when upgrading and are welcome to open an issue in case of questions or problems.
foca::Identity
has been revamped and now requires
a unique cluster-wide identifier (typically a socket address or a
hostname). When multiple identities appear with the same Addr
the conflict is handled by Identity::win_addr_conflict
BroadcastHandler
documentation and examples for detailsConfig::periodic_announce_to_down_members
: Foca periodically
tries to join with members it considers down, as an attempt to
recover from a network partition. This setting is enabled by
default for Config::new_wan
and Config::new_lan
Notification::Rename
that signals whenever an
identity with a conflicting Addr
in the cluster gets replaced
by a newer oneFoca::iter_members
only lists
the unique (by Identity::Addr
), freshest identitiesexamples/foca_insecure_udp_agent.rs
now comes with a fully working
custom broadcast exampleruntime::AccumulatingRuntime
that's good
enough for basic usage if you don't want to implement your ownFoca::iter_membership_state
that provides a view into the
whole state facilitating state replication scenarios. Previously one
would need to juggle Notification::MemberDown
and
Foca::iter_members
to achieve the sameFoca::leave_cluster
doesn't consume self anymore, so users can keep
using the instance; Even rejoin the cluster if they so wish.
See: https://github.com/caio/foca/issues/30tracing
feature
See: https://github.com/caio/foca/issues/30foca_insecure_udp_agent
example now contains a more robust timer
handler able to tolerate arbitrary runtime lagsConfig::new_{wan,lan}
See: https://github.com/caio/foca/issues/24iter_members
now yields an iterator of Member
structs, previously if would yield Member::id
. This allows
users to bootstrap a foca instance with existing cluster state
by feeding its output directly to Foca::apply_many
Config::remove_down_after
has been increased to
24h. The previous default value of 2 minutes was still too small
and would lead to unreasonably large updates backlog on large
clusters. See: https://github.com/caio/foca/issues/19Config::remove_down_after
now defaults to 2 minutes
instead of 15 seconds: clients not using the auto-rejoin
functionality will take longer to rejoin the cluster after being
declared down. Clients whose identity implement Identity::renew
have nothing to worry about.Config::notify_down_members
: foca can now inform down members that
keep talking to the cluster that their messages are being ignoredConfig::periodic_announce
: you can instruct foca to periodically
ask its peers for more peers, so that it learns about every member
in the cluster fasterConfig::periodic_gossip
: to help speed up the propagation of
cluster updatesConfig::new_wan
and Config::new_lan
now enable
every new feature in this releaseEq
along with PartialEq
tracing
featurepostcard-codec
now requires postcard v1.0Foca::set_config
Config::new_wan
and Config::new_lan
helpers to generate a
good enough configuration based on a given cluster size (requires the
std
feature)tracing
feature) are a lot less noisyBroadcastHandler
now takes a generic parameter:
the identity type used by FocaBroadcastHandler
can now decide which members should receive
custom broadcastsFoca::broadcast
./examples/broadcasting.rs