Contents: Fibers Introduction Event library Thread model Fibers engine overview Fiber’s scheduling Fiber exit Fiber yield Fiber wakeup Replication Introduction Replication in 1.10 series Code flow Bootstrap first replica Bootstrap from a cluster leader Continue bootstrap Applier lifecycle Replication in 2.x series Bootstrap first replica Bootstrap from a cluster leader Applier lifecycle Relay Introduction Relay start up Relay lifecycle Relay Raft Qsync Introduction How Raft works in general Synchronous replication of the journal Limbo Master initiates transaction Replica receives transaction Master receives ACK Master finishes write Master write finished early Rollback Implementation of election process Raft structure election_mode = OFF election_mode = CANDIDATE election_mode = MANUAL PreVote Fencing Split-Brain detection Split-Vote detection Write-ahead logging Journal subsystem WAL thread Write data to WAL Transactions processing Transactions processing in 1.x series Transactions processing in 2.x series WAL file binary format General overview Meta information block Data blocks (xrows) Memory management Introduction Arena Arena definition Arena methods Slab cache Slab & slab cache definition Slab cache methods Mempool MSlab & mempool definitions Mempool methods Small Small allocator definitions Small methods Small class Small class definition Small class methods Interim conclusion Matras Implementation Address translation Versioning Matras definition Matras methods Cbus (Communication bus) Introduction General overview Endpoints Cpipes (communication pipes) Event loop and messages Ports Introduction General overview Interface Taxonomy of ports Dataflow with ports Complete code walkthrough example