Elastically scalable architectures with microservices. The end of the monolith?
-
Upload
javier-arias-losada -
Category
Software
-
view
645 -
download
2
Transcript of Elastically scalable architectures with microservices. The end of the monolith?
The end of the monolith?
Elastically scalable architectures with
microservices.
Monolithic architecture
Feel the pain
intro
Netflix, PayPal, Twitter, Amazon… What do they have in common?
Are monolithic architectures dead?
Distributed architecture with smaller services
about me
Javier Arias, senior software engineer at Telefonica.
Working during last year with a microservices in EyeOS, helping to create an VDI (Virtual Desktop Infrastructure) platform.
@javier_ariloshttp://about.me/javier.arilos
Back to the question
Objective: To discuss about microservices
concepts & misconceptions
Are monolithic architectures dead?
A brief history of architectures
Mainframes, Client/server (2 and then 3 tiers)SOAMicroservices
Mainframe, Client/Server, SOA,
Microservices…
They tried to solve architectural problems
And the history repeats
but… there is no silver bullet
The catalysts
Agile everything
The catalysts (I)
Cloud and containers
The catalysts (II)
Continuous Integration and
Delivery
Automate QA and Deployment,
Feedback
The catalysts (III)
Microservices
And we, software
engineers are fashion
victims.
Microservices are
trendy, since 2014.
Microservices definition
Loosely coupledservice oriented architecture
with bounded contexts.(Adrian Cockcroft)
Loosely coupled
released & upgraded independently
no shared database
avoid complex middlewares (SOA)
service oriented architecture
run as standalone processes
talk via APIs, semantic versioning
with bounded contexts
size & responsibilities matter a
lot.
organized around business
capabilities
Domain Driven Design & bounded
contxts
Microservice characteristics
microservice anatomy
persistence & languagespoiled by choice?
be careful when adding technologies
microservices talking to microservices
API + lightweight communications
HTTP vs lightweight message bus
are your microservices good citizens?
stateless: key for scalabilityfailure ready: death or dependency failureidempotent: repeated reqs yield same resultoperations ready: logging, correlation...
we know how to develop microservices
microservices are dynamic
services start / stop all the time
where are my services?
service discovery
DNS vs Database Query
failure detection
scalingmicroservices: stateless, discoverable
manual scale is boring let’s go dynamic
how we decide on scaling?Information, from:
serverschannel
still awake?
please wake up your buddies
around!
just 10 slides to go… :-)
monolith vs microservices: the essence
deploy many collaborating processes
vsdeploy single platform of
components
simpler to deploymore difficult to scale, specially deployment
monolith vs microservices: deploy
more complexityscales better (software, teams and deployment)
microservices: many processes 2 deploy
monolith: one single ‘thing’ 2 deploy
prone to coupling: code, databasein-process callsmuch easier to refactor and test
monolith vs microservices: distributed
computing
decoupled by deploymentdistributed computing is hard: failure-ready, many moving parts, testing
microservices: distributed computing
monolith: no distributed computing
consistency, simpleroperations are simpler
monolith vs microservices: platform
best tool for the job, more freedom, more complexityoperations are more complex
microservices: many technoligies
monolith: constrained technologies
size
cost
microservices
monolith
New project: monolith or microservices?
WHY DON’T WE FOLLOW THEHAPPY PATH?
wrong monolith
what is really wrong with monoliths?
bad designed monoliths
well designed monoliths
lower coupling, design for change
DDD with bounded
contextsAPI:
Facade Design PatternNo
database
sharing
size
cost
microservices
monolith
can we now follow the happy path?
remember...
whatever your problems are...
there is no silver bullet
references
talk abstract
In the last years the microservices architecture style has been gaining traction with some companies such as Netflix, Yelp, Gilt, PayPal. Many of that companies abandoned their previous monolithic architecture and moved to a microservices approach.
Does that mean that monolithic architectures are a thing of the past?
In this talk we will review some key microservices concepts (and misconceptions), search for the essence of microservices architectures and discuss about different approaches to implement them from the industry, including how we implemented it in EyeOS.