Weaveworks discusses Microservices and best practices
Visit Weave Cloud: https://www.weave.works/product/cloud/
For more free talks, join our Weave Online User Group: https://www.meetup.com/Weave-User-Group/
4. What are Microservices?
• Evolution of Service-Oriented Architecture
• Unix/Linux Philosophy for Application
Systems
• Microservice = do one thing well
• Derive business value from combining
microservices together
5. What is a Docker?
• library and ecosystem for creating and sharing Containers
• built from features in Linux
• combine all the software resources needed to run a single
application into a single binary and ship it to servers
• a simple shell-like configuration file
• uses a “layered” file system
• boundaries between containers
6. Before Docker
• Infrastructure automation scripting: Chef,
Puppet, Ansible, etc.
• Deployment scripting: rsync, catalina
deployments, etc.
• Servers as Pets => Servers as Cattle
7. Why Docker/Containers for Microservices?
• Self-contained binary images
• Run 1000s of containers on various
topologies of hardware and VMs
• What does the Developer need to know vs
the Sys Admin?
8. What’s the catch?
• Running production systems of
microservices gets very complex
• Even more so when trying to take
advantage of what they provide
• Enter Kubernetes, Prometheus, …
9. Why Microservices?
• Break up the work
• Conway’s Law - software reflects communication patterns
• Choose the right tool for the job
• Easier to Manage
• Easier to Scale
• Lean Manufacturing/Kanban = Single-piece flow
• Less Change More Often - the alternative is large releases - what
happens when there’s a bug, everything must be tested again
• Continuous Delivery which requires Continuous Integration
10. Best Practices
• Containerize, containerize, containerize
• Every Service should provide an API or Protocol for Direct Interaction
• Read State
• Modify State
• Service Isolation
• Data Store
• Business Logic
• Service Implementation Language
• Public API
11. Best Practices
• API Services should publish to a message bus
• Announce State Changes
• React to other Microservices (reactivemanifesto.org)
• Use JSON for messages early - optimize for binary protocols
once you have hardened messages
• Audit logs & reporting data in a separate service - out of band
• Stateless APIs allow horizontal scaling
• Stateful Data Stores - write code for concurrent access
• Organize around Transactions & Entities
12. Best Practices
• Backwards Compatible APIs
• Graceful Degradation - circuit-breaker pattern,
exponential back-off
• Feature Flags
• Federate Microservice APIs behind a
Gateway/Adapter for end client applications -
web/mobile
13. How to move to Microservices
• Gradual Implementation - upgrading a ship
at sea
• Choosing your first Microservice
• least dependence
• Implement => adapter from monolith =>
directly communicate
14. Organizational Changes
• Large Teams
• move to cross-functional service-
oriented teams
• Small Teams
• single owners w/ cross-pollination
• Communication Patterns
16. Cloud Native Foundation Architecture
• cncf.io
• Kubernetes
• Docker => containerd
• CNI
• lots of goodies
17. Other topics
Kubernetes 101
Prometheus 101
Continuous delivery: hooking up my CI/CD pipeline to
Kubernetes
Network policy for security
We have talks on all these topics in the Weave user
group!
18. Thanks! Questions?
We are hiring!
DX in San Francisco
Engineers in London & SF
weave.works/weave-company/hiring