swim: introduce SWIM's anti-entropy component
SWIM - Scalable Weakly-consistent Infection-style Process Group Membership Protocol. It consists of 2 components: events dissemination and failure detection, and stores in memory a table of known remote hosts - members. Also some SWIM implementations have an additional component: anti-entropy - periodical broadcast of a random subset of members table. Dissemination component spreads over the cluster changes occurred with members. Failure detection constantly searches for failed dead members. Anti-entropy just sends all known information at once about a member so as to synchronize it among all other members in case some events were not disseminated (UDP problems). Anti-entropy is the most vital component, since it can work without dissemination and failure detection. But they can not work properly with out the former. Consider the example: two SWIM nodes, both are alive. Nothing happens, so the events list is empty, only pings are being sent periodically. Then a third node appears. It knows about one of existing nodes. How should it learn about another one? Sure, its known counterpart can try to notify another one, but it is UDP, so this event can get lost. Anti-entropy is an extra simple component, it just piggybacks random part of members table with each regular round message. In the example above the new node will learn about the third one via anti-entropy messages of the second one soon or late. This is why anti-entropy is the first implemented component. Part of #3234
Showing
- src/CMakeLists.txt 2 additions, 1 deletionsrc/CMakeLists.txt
- src/lib/CMakeLists.txt 1 addition, 0 deletionssrc/lib/CMakeLists.txt
- src/lib/core/diag.h 2 additions, 0 deletionssrc/lib/core/diag.h
- src/lib/core/exception.cc 23 additions, 0 deletionssrc/lib/core/exception.cc
- src/lib/core/exception.h 7 additions, 0 deletionssrc/lib/core/exception.h
- src/lib/swim/CMakeLists.txt 12 additions, 0 deletionssrc/lib/swim/CMakeLists.txt
- src/lib/swim/swim.c 998 additions, 0 deletionssrc/lib/swim/swim.c
- src/lib/swim/swim.h 149 additions, 0 deletionssrc/lib/swim/swim.h
- src/lib/swim/swim_ev.c 51 additions, 0 deletionssrc/lib/swim/swim_ev.c
- src/lib/swim/swim_ev.h 64 additions, 0 deletionssrc/lib/swim/swim_ev.h
- src/lib/swim/swim_io.c 217 additions, 0 deletionssrc/lib/swim/swim_io.c
- src/lib/swim/swim_io.h 225 additions, 0 deletionssrc/lib/swim/swim_io.h
- src/lib/swim/swim_proto.c 331 additions, 0 deletionssrc/lib/swim/swim_proto.c
- src/lib/swim/swim_proto.h 320 additions, 0 deletionssrc/lib/swim/swim_proto.h
- src/lib/swim/swim_transport.h 79 additions, 0 deletionssrc/lib/swim/swim_transport.h
- src/lib/swim/swim_transport_udp.c 112 additions, 0 deletionssrc/lib/swim/swim_transport_udp.c
- test/unit/CMakeLists.txt 8 additions, 0 deletionstest/unit/CMakeLists.txt
- test/unit/swim.c 255 additions, 0 deletionstest/unit/swim.c
- test/unit/swim.result 57 additions, 0 deletionstest/unit/swim.result
- test/unit/swim_proto.c 213 additions, 0 deletionstest/unit/swim_proto.c
Loading
Please register or sign in to comment