Everyone is talking about microservices, and there is more confusion than ever about what the promise of microservices really means and how to deliver on it. To address this we will explore microservices from first principles, distilling their essence and putting them in their true context: distributed systems.
What many people forget is that microservices are distributed and collaborative by nature and only make sense as systems—one collaborator is no collaborator. It is in between the microservices that the most interesting and rewarding, and also challenging, problems arise—enter the world of distributed systems.
Distributed systems are by definition complex, and we system developers have been spoiled by centralized servers for too long to easily understand what this really means. Slicing an existing system into various REST services and wiring them back together again with synchronous protocols and traditional enterprise tools—designed for monolithic architectures—will set us up for failure.
As if that wasn’t enough, we can’t just think about systems of microservices. In order to make each microservice resilient and elastic in and of itself, we have to design each individual microservice as a distributed system—a «microsystem»—architected from the ground up using the reactive principles.
53. ALLOWS FOR LOCATION TRANSPARENCY
ONE COMMUNICATION ABSTRACTION ACROSS ALL DIMENSIONS OF SCALE
CORE SOCKET CPU
CONTAINER SERVER RACK
DATA CENTER SYSTEM
54. But I'll take my time
anywhere.
I'm free to speak my
mind anywhere.
And I'll redefine
anywhere.
Anywhere I roam.
Where I lay my head is
home.
— Wherever I May Roam by Lars Ulrich,
James Hetfield (Metallica)
55. THE PATH TOWARDS RESILIENCE
1. Decentralized Architecture
2. Bulkheading
3. Replication
4. Failure Detection
5. Supervision
⇒ Self-healing systems
56. THE PATH TOWARDS ELASTICITY
1. Decentralized Architecture
2. Epidemic Gossip Protocols
3. Self-organization
4. Location Transparency
⇒ Elastic systems
59. INSIDE DATA: OUR CURRENT PRESENT (STATE)
OUTSIDE DATA: BLAST FROM THE PAST (FACTS)
BETWEEN SERVICES: HOPE FOR THE FUTURE (COMMANDS)
— PAT HELLAND, DATA ON THE INSIDE VS DATA ON THE OUTSIDE
80. IN SUMMARY
1. Don't build Microliths
2. Microservices come in (distributed) systems
3. Microservices come as (micro)systems
4. Embrace the Reactive principles
5. Embrace Event-first DDD & Persistence
6. Profit!