Upload
inovia
View
104
Download
0
Embed Size (px)
Citation preview
Microservice:
starting point!
1
Monolith VS Microservices
2
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Monolith architecture
3
Pros
Simpler to develop at first
Deploy as a unit
Cons
Coordination overhead as team
growth
All or nothing deploy
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Microservice architecture
4
Pros
Each unit is simple
Independent scaling
Cons
More sophisticated tooling
Network latencies
Microservices are not dragons!
What to figure out?
6
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
What to figure out?
● How to debug?
● How to handle network failures?
● How to perform remote synchronous calls?
● How to perform event based calls?
7
Logs
8
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Logs
9
Tid: 1234
RequestId: 1
Principal: µserviceA
Tid: 1234
RequestId: 2
Principal: µserviceA
µService A µService B
µService C
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Logs
10
● Trace any request (In / Out)
● Identify resources
● Logs should be treated as a stream
● Logs should be readable by a machine
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
What to figure out?
● How to debug?
● How to handle network failures?
● How to perform remote synchronous calls?
● How to perform event based calls?
11
Remote synchronous calls
12
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
µService A REST
APIµService B
Synchronous calls
13
µService A REST
APIµService B
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Synchronous calls
14
● Resilient
● Respect contract
● Postel Law - Robustness
● Security
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
What to figure out?
● How to debug?
● How to handle network failures?
● How to perform remote synchronous calls?
● How to perform event based calls?
15
Events
16
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Events
17
µService AEvent
Broker
µService B
µService C
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Events
18
● Low coupling
● Based on facts
● Stateless
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
What to figure out?
● How to debug?
● How to handle network failures?
● How to perform remote synchronous calls?
● How to perform event based calls?
19
Tooling
20
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Tooling
● Framework agnostic
● Little code base
● Tested
● Documented
21
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Tooling
22
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Event worker
23
Worker
µService
Event
Broker
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Event worker
24
Worker
µService
Event
Broker
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Event worker
25
Worker
µService
Event
Broker
ack
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Conclusion
26
Microservices - todo list● Think
⇒ What are my business specificities
● Prepare
⇒ Make a good tooling
● Build
⇒ Enjoy Microservices!
Follow us on twitter
@meetup_ms_paris
27