fly high with microservices architecture - jaxlondon.com · key benefits of microservices...
TRANSCRIPT
![Page 1: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/1.jpg)
Angel Gruev 2017
Fly high with Microservices Architecture Splitting the Monolith
www.dreamix.eu
![Page 2: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/2.jpg)
Nice to meet you! I’m Angel from Dreamix.
www.dreamix.eu
![Page 3: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/3.jpg)
Agenda
● How it all started?
● Key benefits of microservices
● Microservices and business capabilities
● What was our task and how we tackle it
● Time to Build and Deploy … automatically
● Are microservices the silver bullet ?
www.dreamix.eu
![Page 4: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/4.jpg)
What’s next?!
www.dreamix.eu
Software architecture evolution
![Page 5: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/5.jpg)
www.dreamix.eu
Software architecture evolution
2020’s
Pizza-oriented Architecture
![Page 6: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/6.jpg)
How it all started?
• Private Business jet aviation company
• In-house software solutions
• 250+ IT specialists worldwide
www.dreamix.eu
![Page 7: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/7.jpg)
How it all started?
• Several monolith applications with huge codebase
• Private Business jet company
• In-house software solutions
• 200+ IT specialits worldwide
www.dreamix.eu
![Page 8: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/8.jpg)
How it all started?
• Several monolith applications with huge codebase
• Private Business jet company
• In-house software solutions
• 200+ IT specialits worldwide
• Go to micro-service based approach
• New features as MS • Splitting the
monolith(s)
www.dreamix.eu
![Page 9: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/9.jpg)
What are microservices
Key Features
● Small and Focused on doing one thing well
● Autonomous
○ Can you make a change to a service and deploy it by itself without changing anything else ?
www.dreamix.eu
![Page 10: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/10.jpg)
What are microservices
Key Benefits
● Technology Heterogeneity
www.dreamix.eu
![Page 11: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/11.jpg)
What are microservices
Key Benefits
● Technology Heterogeneity
● Resilience
www.dreamix.eu
![Page 12: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/12.jpg)
What are microservices
Key Benefits
● Technology Heterogeneity
● Resilience
● Scaling
www.dreamix.eu
![Page 13: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/13.jpg)
What are microservices
Key Benefits
● Technology Heterogeneity
● Resilience
● Scaling
● Ease of Deployment
www.dreamix.eu
![Page 14: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/14.jpg)
What are microservices
Key Benefits
● Technology Heterogeneity
● Resilience
● Scaling
● Ease of Deployment
● Composability & Replaceability
www.dreamix.eu
![Page 15: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/15.jpg)
What are microservices
Key Benefits
● Technology Heterogeneity
● Resilience
● Scaling
● Ease of Deployment
● Composability & Replaceability
● Enforcing different security
www.dreamix.eu
![Page 16: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/16.jpg)
Organization and business capabilities
www.dreamix.eu Source: http://martinfowler.com
“Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.”
Melvyn Conway, 1967
![Page 17: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/17.jpg)
Organization and business capabilities
www.dreamix.eu Source: http://martinfowler.com
![Page 18: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/18.jpg)
Microservice size
If you can’t feed a team with two pizzas, it’s too large. That limits a task force to five to seven people, depending on their appetites.
Jeff Bezos (Amazon)
Something that can be rewritten in 2-4 weeks
“Gather together those things that change for the same reason, and separate those things that change for different reasons.” SRP – Robert Martins
![Page 19: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/19.jpg)
The initial requirements
www.dreamix.eu
![Page 20: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/20.jpg)
The initial requirements
www.dreamix.eu
Calculate the flight time between 2 airports
![Page 21: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/21.jpg)
Where is my service?
● The problems:
○ Many small services in the cloud
○ Constantly destroying and deploying new instances
○ Different environments
● How to specify the URL of the service?
● Dynamic Service Registries applications
■ Zookeeper
■ Netflix Eureka
■ Consul
www.dreamix.eu
![Page 22: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/22.jpg)
Multiple configuration files
● Multiple services = many configuration files
● Multiple services * several environments = too many configuration files
www.dreamix.eu
![Page 23: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/23.jpg)
Centralized configuration
www.dreamix.eu
![Page 24: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/24.jpg)
Coming up with the first design
www.dreamix.eu
Inspired by Netflix stack And Spring-boot
![Page 25: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/25.jpg)
Getting ready for High Availability
www.dreamix.eu
![Page 26: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/26.jpg)
Orchestration vs. Choreography
Orchestration
www.dreamix.eu
![Page 27: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/27.jpg)
Orchestration vs. Choreography
Choreography
www.dreamix.eu
![Page 28: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/28.jpg)
Event driven approach
www.dreamix.eu
● Fire events on certain triggers
● Use message brocker
● Callbacks
![Page 29: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/29.jpg)
BUILD & DEPLOY
www.dreamix.eu
Automatically!
![Page 30: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/30.jpg)
Source repositories and CI
● The monolithic approach
● The improved monolithic approach
www.dreamix.eu
![Page 31: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/31.jpg)
Source repositories and CI
● The microservice approach
www.dreamix.eu
![Page 32: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/32.jpg)
How many services per machine ?
● Multiple services per one host
○ Hard to monitor and hard for problem determination
● Application containers
○ Example: One JVM hosting different service artifacts (wars)
● Single service per host
○ Easier to monitor and easier to scale
● Platform as a service
○ Automatically provisioning
○ Automatic scaling
www.dreamix.eu
![Page 33: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/33.jpg)
Docker
www.dreamix.eu
● Using existing Linux containers feature
![Page 34: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/34.jpg)
Kubernetes & Docker
www.dreamix.eu
![Page 35: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/35.jpg)
Zero-downtime deployments
www.dreamix.eu
1. Build new version docker image
2. Deploy to K8s
3. Health-check OK
4. LB routes to new version only
5. Wait for active request on the old version
6. Undeploy old version
![Page 36: Fly high with Microservices Architecture - jaxlondon.com · Key benefits of microservices Microservices and business capabilities What was our task and how we tackle it Time to Build](https://reader030.vdocument.in/reader030/viewer/2022040105/5e02eb08d9e2ea2f2040e688/html5/thumbnails/36.jpg)
No Silver Bullet
● Pay special attention to logging and problem determination
● Prepare for even more failures
○ Chaos Monkey
● Timeouts and Circuit Breakers
● Consider Initially go for monolith with well established modules and bounderies
www.dreamix.eu