GopherCon Europe 2020: Kat Zień - How to Structure Your Microservices28:12 563 views 87% Published 7 months ago
About the talk:
Most of us have been happily writing monoliths for years, then not so happily struggled to refactor those as they grew. Then we heard the magic word: microservices.
But what exactly are they? How small should a microservice be? And are they really that good?
There are definitely pros and cons to this approach, and unfortunately many people seem to have had a pretty bad experience overall. Microservices are not easy to get right. But it is possible, and I want to show you how.
When I was considering my next career move back in 2018, I wanted to work for a company which does microservices well. Building a fully-licensed bank with over 3 million customers, written entirely in Go, using over 1500 microservices with 99.999% uptime seemed like a decent enough challenge. If you can make that work, and get the regulators and customers to trust you with their money, you must be doing something right. I wanted to know the secret sauce.
So this talk is about the lessons I’ve learnt so far on how to design microservices well and make them work for the team, at scale. I’ll talk about the key rules to follow and how to break down problems into the right set of individual services. We’ll walk through designing and implementing a simple API endpoint using microservices to demonstrate how to build small, consistent, understandable and extensible services which together form a powerful and resilient system.
The point is not to say that microservices are better or worse than monoliths. The point is to show a set of best practices for building successful microservice architectures, based on my experience. We’ll talk about:
- the benefits of having homogenous services, with example structures
- deciding when something should be in its own microservice
- orchestrating and testing microservices
- designing with typical networking and reliability issues in mind
- safely introducing changes affecting multiple services with no downtime
- code ownership and allowing large teams to make changes safely and independently
- designing extensible, not flexible systems which grow and scale well over time
About the speaker:
Kat Zień (@kasiazien) works at Monzo as a backend engineer and tech lead on the financial crime team. Her main interests include automating #allthethings, sorting out legacy code and making things simpler and faster. She was co-organising PHP South West and is currently co-organising London Gophers. Kat loves travelling and keeping active, appreciates good coffee and is a big Lego fan. She cycles across Europe with TechBikers to raise money for Room To Read.