34
The Microservices journey from a startup perspective Susanne Kaiser CTO @suksr Just Software @JustSocialApps

The Microservices journey from a startup perspective

Embed Size (px)

Citation preview

Page 1: The Microservices journey from a startup perspective

The Microservices journey from a

startup perspective

Susanne KaiserCTO

@suksr

Just Software@JustSocialApps

Page 2: The Microservices journey from a startup perspective

Each journey is different

“People try to copy Netflix, but they can only copy what they see. They copy the results, not the process.”

Adrian Cockcroft, AWS VP Cloud Archtitect, former Netflix Chief Cloud Architect

Page 3: The Microservices journey from a startup perspective
Page 4: The Microservices journey from a startup perspective

The beginning … A monolith in every aspect

One team

One collaboration product

One technology

stack

Page 5: The Microservices journey from a startup perspective

After an evolving while …

Productivity suffered

Usability and UX suffered

New features released slowly

Page 6: The Microservices journey from a startup perspective

JUST CONNECTSocial Network

JUST CHATReal-time collaboration

JUST WIKIKnowledge Base

JUST DRIVEDocument Sharing

JUST TASKSTask Management

Separate Collaboration Apps

Page 7: The Microservices journey from a startup perspective

JUST CONNECTSocial Network

JUST CHATReal-time collaboration

JUST WIKIKnowledge Base

JUST DRIVEDocument Sharing

JUST TASKSTask Management

Small, autonomous teams with well-defined responsibilities

Page 8: The Microservices journey from a startup perspective

In the long run ...

Page 9: The Microservices journey from a startup perspective

Looks easy at first glance ...

Page 10: The Microservices journey from a startup perspective

Microservices come with complexity

Design for Failure

MonitoringDeployment

Debugging

Testing

Eventual consistency

Skillset is different

Authentication & Authorization

Development environment

Page 11: The Microservices journey from a startup perspective

Challenges of transformation

Transformation takes longer than anticipated

You still have to take care of your

existing system

Core functionalityis hard to untangle

All involved parties need toagree and to be on board

Page 12: The Microservices journey from a startup perspective

Don't partition without a good reason.

Page 13: The Microservices journey from a startup perspective

How to start?

?

?

? ?

Page 14: The Microservices journey from a startup perspective

Key concepts of modelling Microservices

High cohesion within a service

Loose coupling between services

Page 15: The Microservices journey from a startup perspective

Identify Bounded Contexts

“A specific responsibility [..] enforced with explicit boundaries”

http://blog.sapiensworks.com/post/2012/04/17/DDD-The-Bounded-Context-Explained.aspx

Page 16: The Microservices journey from a startup perspective

Bounded Contexts = Collaboration Apps

JUST DRIVE

JUST TASKS

JUST CHAT

JUST CONNECT

JUST WIKI

Monolith

Page 17: The Microservices journey from a startup perspective

First approach as a co-existing service

JUST DRIVE

JUST DRIVE

JUST TASKS

JUST CHAT

JUST CONNECT

JUST WIKI DB Adapter

REST API

Web App

DB Adapter

MessageBroker

Messa

ge Br

oker

Adap

ter

Message Broker

Adapter

Monolith

Page 18: The Microservices journey from a startup perspective

Heavy undertake if you do all at once

New technology

New UI

New data structure

Extend skillset

Maintain & runcurrent system

Page 19: The Microservices journey from a startup perspective

Split in steps – e.g. top down

Page 20: The Microservices journey from a startup perspective

Split in steps – e.g. top down

DB Adapter

Web Client

Browser

Monolith

Page 21: The Microservices journey from a startup perspective

Split in steps – Step 1) Extracting Web App

Business Logic

DB Adapter

Web Client

Browser

REST API

REST

Clien

t

Web Client Web AppMonolith

Page 22: The Microservices journey from a startup perspective

Split in steps – Step 2) Extracting Business Logic

Business Logic

DB Adapter

Web Client

Browser

Business Logic

DB Adapter

REST API

Web App

Monolith

REST APIRE

ST Cl

ient

REST APIREST

Clien

t

Page 23: The Microservices journey from a startup perspective

Split in steps – Step 3) Extracting Data Storage

Business Logic

DB Adapter

Web Client

Browser

Business Logic

DB Adapter

REST API

Web App

Monolith

REST APIRE

ST Cl

ient

REST APIREST

Clien

t

Message Broker

Adapter

Messa

ge Br

oker

Adap

ter

Message Broker

Page 24: The Microservices journey from a startup perspective

Which one first?

Easy to extractChanging frequently

Different resource requirements

Page 25: The Microservices journey from a startup perspective

Stop feeding the monolith

Monolith

Page 26: The Microservices journey from a startup perspective

Get your CI/CD pipeline ready

CompileCode

AnalysisUnitTests

IntegrationTests

CDCTests

Assembledistribution

Publishbinaries

+

Commit Stage

Retrievebinaries

Deploybinaries

FunctionalTest

Acceptance Stage

Deploybinaries

UAT

Deploybinaries

Production

Manually triggered

Page 27: The Microservices journey from a startup perspective

Testing - Consumer Driven Contract Tests with Pact

Source: https://jaxenter.de/microservices-consumer-driven-contract-testing-mit-pact-20574

Page 28: The Microservices journey from a startup perspective

Deployment in a polyglot enviroment

Cloud On-Premises

Service Instance per Host Multiple Service Instances per Host/Process

Each service instance runs in complete isolation

Efficient resource utilization

Page 29: The Microservices journey from a startup perspective

Design for Failure

Timeout-Handling

Limit number of outstanding requests Circuit Breakers

Provide fallbacks

Page 30: The Microservices journey from a startup perspective

Development environment

Full access to the entire system

Page 31: The Microservices journey from a startup perspective

Summary

Get your build and delivery pipeline ready

It's not only a technical but also a cultural shift

Don't partition without a good reason

Identify your bounded contexts

Split in manageable steps

Page 32: The Microservices journey from a startup perspective
Page 33: The Microservices journey from a startup perspective

… AND W/ MICROSERVISES !

Page 34: The Microservices journey from a startup perspective

THANK YOU!Susanne Kaiser

CTO@suksr

Just Software@JustSocialApps