Upload
darkofabijan
View
36
Download
8
Tags:
Embed Size (px)
Citation preview
Microservices and
Logical Reasoning
About• Darko Fabijan - @darkofabijan
• co-founder of semaphoreci.com and renderedtext.com - wearing many hats
• Semaphore CI - hosted continuous integration and deployment service
• Some of our customers: Lexmark, Zendesk, Dribble, CoreOS, 500px, ARTSY, SystemD
• On a mission to build the best engineering team in Novi Sad
Agenda• I ask questions
• Resources
• Practice - Microservices war stories
• Theory - only bits of information
• You ask questions
• Finito :)
I ask questions
Resources• Domain-Driven Design: Tackling
Complexity in the Heart of Software
• Release It!: Design and Deploy Production-Ready Software
• Building Microservices: Designing Fine-Grained Systems
• The Art of Scalability: Scalable Web Architecture, Processes, and Organizations for the Modern Enterprise
Practice - Microservices war stories
Main Application Builder 3
…
Builder 1
Builder 2
Builder N
Main Application
Docs
Blog
Tutorials
High traffic API endpoints
Builder 3
…
Builder 1
Builder 2
Builder N
Main Application
Docs
Blog
Tutorials
High traffic API endpoints
Builder 3
…
Builder 1
Builder 2
Builder N
Main Application
Docs
Blog
Tutorials
High traffic API endpoints
Builder 3
…
Builder 1
Builder 2
Builder N
Main Application
• Single table with 60+Gb of compressed build logs and growing…
• Storage requirements
• Data usage pattern
• Response time
• Availability
Form a squad
Everyone on board with the idea
• Lost some data
• Decreased performance of the system
• Decreased stability of the system
• Managed to create some downtime
• Triumphed in the End 😅
Journey
Infinitely independently scalable solution
😎
• HTTP + JSON
• Store: S3
• Cache: Redis
• Load balancer + 3 x VPS #softlayer
Components
• Sale: Redis caching layer, provision servers
• Igor: Log service API and communication with S3
• Darko: API client & Log service adapter in main application
• Everyone: Metrics
Organization
What we did right• Define microservice as internal product - define MVP
• Plan for minimal change in main application
• Start work on API by creating a client
• Create runnable API draft
• Run both implementations in parallel in production
• Perform gradual migration
• We did some metrics right
What we did wrong• Assume failure everywhere
• Brainstorm about failure scenarios and write them down
• Create alerting based on failure scenarios
• Create metrics that would enable you to create alerts
• Define timeouts that make sense for your service
• Implement fallback strategies
Theory
Loosely coupled service oriented architecture with
bounded contexts
— Adrian Cockcroft
microservices