24
Microservices and Logical Reasoning

Microservices

Embed Size (px)

Citation preview

Page 1: Microservices

Microservices and

Logical Reasoning

Page 2: Microservices

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

Page 3: Microservices

Agenda• I ask questions

• Resources

• Practice - Microservices war stories

• Theory - only bits of information

• You ask questions

• Finito :)

Page 4: Microservices

I ask questions

Page 5: Microservices

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

Page 6: Microservices

Practice - Microservices war stories

Page 7: Microservices

Main Application Builder 3

Builder 1

Builder 2

Builder N

Page 8: Microservices

Main Application

Docs

Blog

Tutorials

High traffic API endpoints

Builder 3

Builder 1

Builder 2

Builder N

Page 9: Microservices

Main Application

Docs

Blog

Tutorials

High traffic API endpoints

Builder 3

Builder 1

Builder 2

Builder N

Page 10: Microservices

Main Application

Docs

Blog

Tutorials

High traffic API endpoints

Builder 3

Builder 1

Builder 2

Builder N

Page 11: Microservices
Page 12: Microservices

Main Application

• Single table with 60+Gb of compressed build logs and growing…

• Storage requirements

• Data usage pattern

• Response time

• Availability

Page 13: Microservices

Form a squad

Page 14: Microservices

Everyone on board with the idea

Page 15: Microservices

• Lost some data

• Decreased performance of the system

• Decreased stability of the system

• Managed to create some downtime

• Triumphed in the End 😅

Journey

Page 16: Microservices

Infinitely independently scalable solution

😎

Page 17: Microservices

• HTTP + JSON

• Store: S3

• Cache: Redis

• Load balancer + 3 x VPS #softlayer

Components

Page 18: Microservices

• 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

Page 19: Microservices

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

Page 20: Microservices

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

Page 21: Microservices

Theory

Page 22: Microservices

Loosely coupled service oriented architecture with

bounded contexts

— Adrian Cockcroft

Page 23: Microservices

microservices