Introduction to Microservices

27
Introduction to Microservices Duduman Bogdan Vlad @vlad_duduman

Transcript of Introduction to Microservices

Page 1: Introduction  to Microservices

Introduction to

MicroservicesDuduman Bogdan Vlad

@vlad_duduman

Page 2: Introduction  to Microservices

Agenda

Monoliths

Monoliths advantages and disadvantages

Microservices

Principles of microservices

Microservices advantages and disadvantages

Page 3: Introduction  to Microservices

Monoliths

Netflix. Amazon.com, Ebay, Paypal

Single-Tiered Software application

Responsible not for a particular task

Long build time

Building and deploying the whole application

Support only vertical scaling

Page 4: Introduction  to Microservices

Monoliths - Example

Page 5: Introduction  to Microservices

Monoliths

Advantages

A single layered architecture

A single technology stack

A single code base maintained by multiple teams

Disadvantages

All parts are interconnected

Many other systems are connected to your system

Hard to change, hard to maintain

Slow innovation

Hard to move to newer technologies

Doesn’t scale very well

Page 6: Introduction  to Microservices

Monoliths

Disadvantages

As the team grows, will eventually start to break down

Technical debt – “Not broken, don’t fix it”

Page 7: Introduction  to Microservices

Monoliths. Dependencies will kill you

Page 8: Introduction  to Microservices

The Microservices Way“An approach to developing a single application as a suite of small

services.” - Martin Fowler

Page 9: Introduction  to Microservices

Gartner hype cycle

Page 10: Introduction  to Microservices

Microservices

First time discussed – 2011

Just a rebranding of SOA?

“Micro” indicates the scope is limited to a single functionality

Page 11: Introduction  to Microservices

Microservices

Page 12: Introduction  to Microservices

Microservices

Page 13: Introduction  to Microservices

Microservices. Evolution

Page 14: Introduction  to Microservices

Microservices. Evolution

Page 15: Introduction  to Microservices

Microservices - Example

Page 16: Introduction  to Microservices

Monoliths. Scalability

Page 17: Introduction  to Microservices

Microservices. Scalability

Page 18: Introduction  to Microservices

Microservices. Scalability

Page 19: Introduction  to Microservices

Monoliths. Persistence

Page 20: Introduction  to Microservices

Microservices. Polyglot persistence

Page 21: Introduction  to Microservices

Microservices. Advantages

Simple

Modularity

New features as microservices

Small codebase

Easy to scale

Easy to deploy - loosely coupled

System resilience

Page 22: Introduction  to Microservices

Microservices. Advantages

Technology independent

Replaceable parts

High performance

Polyglot persistence

Easy to test

Autonomous

Specification change is frequent

Page 23: Introduction  to Microservices

Microservices. Advantages

Single Responsibility Principle

Light-weight communication

Page 24: Introduction  to Microservices

Microservices. Principles and practices

Set up a set of guiding principles

Create practices that support these principles

Create example implementations and service templates

Make it easy for the team to do the right thing

In order to move to this, you will need to get better at:

Architecture

Testing

Deployment

A team should be able to rebuild a service in two weeks

Page 25: Introduction  to Microservices

Microservices. Common Patterns

1. “Almost all the successful microservice stories have started with a monolith

that got too big and was broken up”

2. “Almost all the cases where I’ve heard of a system that was built as a

microservice system from scratch, it has ended up in a serious trouble”

Page 26: Introduction  to Microservices

Microservices. How? When?

Page 27: Introduction  to Microservices

Thanks