adopting microservices - around25

26
Adopting Microservices Cosmin Harangus Technical Director @ Around25 7 May 2016, Cluj Napoca

Upload: cosmin-harangus

Post on 22-Jan-2017

227 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Adopting Microservices - Around25

Adopting Microservices

Cosmin Harangus

Technical Director @ Around25

7 May 2016, Cluj Napoca

Page 2: Adopting Microservices - Around25

Microservices are small, autonomous services that work

together.

Page 3: Adopting Microservices - Around25

E-learning Platform

- Video conference

- Present materials

- Multiple users

- Teacher area

- Upload materials

- Create classes

- Assign and Review Homework

- Student area

- See and join classes

- Complete homework

- Administrative area

- Manage users

- Manage materials

- Handle Invoices

- View Payments

Page 4: Adopting Microservices - Around25

Common Architecture

Page 5: Adopting Microservices - Around25

Advantages

- Simple to setup

- Easy to add features very fast

- Easy to follow and debug

- DRY

- Simple to deploy

Page 6: Adopting Microservices - Around25

Disadvantages

- Becomes very large due to the complexity of the business domain

- Hard to keep boundaries between domains

- Hard to scale efficiently

- Unable to take advantage of new technologies

- Complex database with many interconnected tables

Page 7: Adopting Microservices - Around25

How can we improve?

Page 8: Adopting Microservices - Around25

Break into smaller parts

Page 9: Adopting Microservices - Around25

Immediate Benefits

- Single responsibility

- Comprehensible size for each service

- A clear, language agnostic API for each service

- Technology diversity

- Easy to scale specific parts

Page 10: Adopting Microservices - Around25

Extra Complexity

- Additional git repositories to manage

- More complex deployment

- Dealing with failures

Page 11: Adopting Microservices - Around25

What else?

Page 12: Adopting Microservices - Around25

Identify Bottlenecks!Database / Servers / Services

Page 13: Adopting Microservices - Around25

Separate Databases

Page 14: Adopting Microservices - Around25

Separated Databases

Page 15: Adopting Microservices - Around25

Distributed Services

Page 16: Adopting Microservices - Around25

Distributed Services

Page 17: Adopting Microservices - Around25

Is HTTP the only way?

Page 18: Adopting Microservices - Around25

Communication

HTTP is a popular transport in microservices:

- RESTful APIs using JSON data

- DNS, Load balancing, Request/Reply

- Easy to understand

Better alternatives available for:

- Asynchronous communication

- Faster transport

- Better communication patterns

Page 19: Adopting Microservices - Around25

Message Queue Server

Page 20: Adopting Microservices - Around25

MQ Benefits

- Asynchronous communication

- No endpoint dependency

- Works if endpoint is down temporarily

Page 21: Adopting Microservices - Around25

Communication patterns - Load balancing

Page 22: Adopting Microservices - Around25

Communication patterns - Publish / Subscribe

Page 23: Adopting Microservices - Around25

Communication patterns - RPC

Page 24: Adopting Microservices - Around25

Further improvements?

Page 25: Adopting Microservices - Around25

Further improvements

- How does failure impact our users?

- How can we keep our system responsive to failure and auto restart servers and services?

- How can we see the general state of our system?

- How can we centralize all logs in order to get insights into our users and our system?

Page 26: Adopting Microservices - Around25

Welcome to the world of microservices!

For more details visit us @ around25.com