Microservice: starting point
-
Upload
inovia -
Category
Technology
-
view
101 -
download
0
Transcript of Microservice: starting point
![Page 1: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/1.jpg)
Microservice:
starting point!
1
![Page 2: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/2.jpg)
Monolith VS Microservices
2
![Page 3: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/3.jpg)
@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
![Page 4: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/4.jpg)
@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
![Page 5: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/5.jpg)
Microservices are not dragons!
![Page 6: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/6.jpg)
What to figure out?
6
![Page 7: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/7.jpg)
@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
![Page 8: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/8.jpg)
Logs
8
![Page 9: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/9.jpg)
@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
![Page 10: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/10.jpg)
@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
![Page 11: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/11.jpg)
@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
![Page 12: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/12.jpg)
Remote synchronous calls
12
![Page 13: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/13.jpg)
@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
![Page 14: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/14.jpg)
@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
![Page 15: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/15.jpg)
@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
![Page 16: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/16.jpg)
Events
16
![Page 17: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/17.jpg)
@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
![Page 18: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/18.jpg)
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Events
18
● Low coupling
● Based on facts
● Stateless
![Page 19: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/19.jpg)
@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
![Page 20: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/20.jpg)
Tooling
20
![Page 21: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/21.jpg)
@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
![Page 22: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/22.jpg)
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Tooling
22
![Page 23: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/23.jpg)
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Event worker
23
Worker
µService
Event
Broker
![Page 24: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/24.jpg)
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Event worker
24
Worker
µService
Event
Broker
![Page 25: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/25.jpg)
@matterstech
@meetup_ms_paris
meetup.matters.tech
API Gateway: Nginx way
Microservice: Starting point
Introduction à Kafka
Event worker
25
Worker
µService
Event
Broker
ack
![Page 26: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/26.jpg)
@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!
![Page 27: Microservice: starting point](https://reader036.fdocuments.us/reader036/viewer/2022062317/5a6d4d707f8b9acc418b5673/html5/thumbnails/27.jpg)
Follow us on twitter
@meetup_ms_paris
27