+ All Categories
Home > Technology > Microservice no fluff, the REAL stuff

Microservice no fluff, the REAL stuff

Date post: 15-Apr-2017
Category:
Upload: nklmish
View: 2,219 times
Download: 2 times
Share this document with a friend
37
@nklmish Microservice No fluff, the REAL stuff The best preparation for tomorrow is doing your best today @nklmish
Transcript
Page 1: Microservice no fluff, the REAL stuff

@nklmish

MicroserviceNo fluff, the REAL stuff

The best preparation for tomorrow is doing your best today

@nklmish

Page 2: Microservice no fluff, the REAL stuff

@nklmish

Agenda

Common Problems

Microservice - core concepts

Pros & Cons

Code

Page 3: Microservice no fluff, the REAL stuff

@nklmish

About me

Senior Software developer at 4FinanceIT

Consultant and architect around JVM technology

Page 4: Microservice no fluff, the REAL stuff

@nklmish

Monolithic ?

Page 5: Microservice no fluff, the REAL stuff

@nklmish

Common Problems

Page 6: Microservice no fluff, the REAL stuff

@nklmish

Too much complexity needs to be exposed

Page 7: Microservice no fluff, the REAL stuff

@nklmish

legacy components - Hard to upgrade

Page 8: Microservice no fluff, the REAL stuff

@nklmish

Workaround

Page 9: Microservice no fluff, the REAL stuff

@nklmish

New functionality can just pop

Page 10: Microservice no fluff, the REAL stuff

@nklmish

Easy to maintain standards, hard to maintain quality

Page 11: Microservice no fluff, the REAL stuff

@nklmish

Easy to maintain quality, hard to maintain standards

Page 12: Microservice no fluff, the REAL stuff

@nklmish

Refactoring

(Before)

Page 13: Microservice no fluff, the REAL stuff

@nklmish

Refactoring

(After)

Page 14: Microservice no fluff, the REAL stuff

@nklmish

Microservices

Page 15: Microservice no fluff, the REAL stuff

@nklmish

Microservices

1

Application

2 3 4 5

6 7 8 9 N

Page 16: Microservice no fluff, the REAL stuff

@nklmish

Core Concepts

Page 17: Microservice no fluff, the REAL stuff

@nklmish

Concept 1 : Service Registry

Page 18: Microservice no fluff, the REAL stuff

@nklmish

Service Registry

Zookeeper Eureka ConsulConsistency

Partition

Availability

PartitionAvailability

Partition

Page 19: Microservice no fluff, the REAL stuff

@nklmish

Eureka

Components:

Server - REST service

Client - Java component (Used within a microservice)

Page 20: Microservice no fluff, the REAL stuff

@nklmish

Eureka Client Server CommunicationClien

t

Serv

er

Registration: first heartbeat (after 30s)

Renew lease: heartbeat/30s

Fetching Registry: retrieve & cache it locally

Registry Update: /30s

Shutdown: Cancel request on shutdown

Renew fail

ure:

No heart

beat for

90s,

REMOVE

Shutdow

n:

Removes

instance

from reg

istry

Page 21: Microservice no fluff, the REAL stuff

@nklmish

Concept 2 : Load balancing

Page 22: Microservice no fluff, the REAL stuff

@nklmish

Ribbon

Client side load balancer

Built-in Failure resiliency

Rule based load balancing

Page 23: Microservice no fluff, the REAL stuff

@nklmish

Concept 3 : Edge Service

Page 24: Microservice no fluff, the REAL stuff

@nklmish

Zuul

Error

RoutingPre PostRequest

Response

Page 25: Microservice no fluff, the REAL stuff

@nklmish

Zuul features

Load Shedding

Authentication & Security

Static Response handling

Surgical Debug Filter

Stress Testing

Page 26: Microservice no fluff, the REAL stuff

@nklmish

Concept 4 : Failure management

Page 27: Microservice no fluff, the REAL stuff

@nklmish

Hystrix

Manage failures(latency + fault tolerance)

Cascading failures

Fail fast approach

Page 28: Microservice no fluff, the REAL stuff

@nklmish

Pros & Cons

Page 29: Microservice no fluff, the REAL stuff

@nklmish

Pros

Component

Richer tech stack

Scalability

Resilience

Page 30: Microservice no fluff, the REAL stuff

@nklmish

Cons

Distributed system.

Arsenal of tools (Infrastructure)

Testing

Transactions

Page 31: Microservice no fluff, the REAL stuff

@nklmish

DEMO

Page 32: Microservice no fluff, the REAL stuff

@nklmish

Demo

Spring Cloud OSS

http://tiny.cc/micro-code

Page 33: Microservice no fluff, the REAL stuff

@nklmish

Spring Cloud

Page 34: Microservice no fluff, the REAL stuff

@nklmish

DEMO

CATALOG SERVICE

PRODUCT SERVICEPRICE

SERVICECOMMENT SERVICE

Page 35: Microservice no fluff, the REAL stuff

@nklmish

Microservice in REAL life

Page 36: Microservice no fluff, the REAL stuff

@nklmish

Metrics

Page 37: Microservice no fluff, the REAL stuff

@nklmish

Thank You Дякую

Questions?

http://tiny.cc/nklmish-micro


Recommended