Top Banner
1

Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

May 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }
Page 2: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Out of the Monolith, Into Microservices

Page 3: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Why Microservices?

Scalability Fault isolation

Localized Complexity Future proofed

Page 4: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Use case

Microservices Monolith

Page 5: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Microservices

Page 6: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

What makes a Good Service?

Bounded Contexts Shared DB

Bounded Context1

Bounded Context2

Bounded Context3

Bounded Context4

Domain

Bounded Context Microservice

Page 7: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Integration

Sync vs Async

Orchestration vs Choreography

Smart Endpoints & Dumb pipelines

Page 8: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Splitting the Monolith

Service 1 : Java REST services, Raptor framework - Spring Boot Service 2 : Reactive services, Squbs framework – Actor Model, Akka Streams Service 3, 4 : Java Daemon, Raptor framework – Spring Boot Service 5 : Java Batch, Raptor framework – Spring Batch Few other available options : Rx Java, Graph QL, Node.js, Elastic search, No SQLs Hadoop – pig scripts, AMQ, YAM, Kafka, C++

Service2 Reactive

Service3 Daemon

Service4 Daemon

Service1 REST

Service5 Batch

Queue 2

Queue 1

1 2 3

4

5

6

7

8

9

Page 9: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Reactive Microservices

Page 10: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Deployment

Continuous Integration

Page 11: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Deployment

Continuous Delivery

Continuous Deployment

Monitoring

Page 12: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Dev - Ops

Page 13: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Learnings

Macro/Micro/Nano Contracts Correlation IDs Testing

Page 14: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

Performance

Timeouts Bulk heads Circuit breakers

circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }

downstreamservice { type = squbs.httpclient akka.http.host-connection-pool { min-connections = 5 max-connections = 30 } }

Page 15: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }
Page 16: Out of the Monolith, Into Microservices - DeveloperMarch · 2019-05-17 · circuit-breaker { max-failures = 5 call-timeout = 10 seconds reset-timeout = 10 seconds }