Phase 4 of 9 · 4 lessons
Distributed systems and security
How services split up and stay correct across a network, how machines agree, and how to keep users and data secure.
Once a system is many services on many machines, function calls become network calls that can fail halfway. These topics are about staying correct anyway, and about making sure only the right people can do the right things.
Lessons, in order
-
4.1
Monolith vs microservices
A monolith is one deployable application. Microservices split the system into small services, each owning one business capability and its own data, talking over the network.
-
4.2
Distributed transactions: sagas and the outbox pattern
A saga runs a business process across several services as a series of local transactions, with a compensating action to undo each step if a later step fails.
-
4.3
Consensus and leader election (Raft)
Consensus is getting several machines to agree on a value — such as who the leader is, or the order of operations — even when some of them fail.
-
4.4
Security basics: authentication, authorisation, OAuth and JWT
Authentication checks who you are. Authorisation checks what you're allowed to do.