Weitere ähnliche Inhalte Ähnlich wie Microservices in production (20) Mehr von Võ Duy Tuấn (11) Kürzlich hochgeladen (20) Microservices in production2. • Why Microservices?
• DEV:
o Micro-framework
o Bounded context
o Inter-service communication
o API gateway
o Single Page App (SPA)
Table of contents
• OPS:
o Docker
o Configuration
o Logging & monitoring
o Service discovery
o CI/CD
5. DEV / Micro-framework
• Easy to learn
• Easy to code
• Easy to run
• Easy to test
• Easy to deploy
• Easy to upgrade
• Restful Web Service
• Slim framework
7. DEV / Inter-service communication
• Authentication:
– Json Web Token (JWT)
– Access Trusted Network
• Communications:
– Restful (HTTP)
– SOAP (HTTP)
– AMQP
– App specific: Redis…
– Protobuf
8. DEV / API Gateway
CLIENT
SHIPMENT
GATEWAY
Giaohangnhanh Viettel Post VNPost
RESTful SOAP SOAP
9. DEV / Single Page App (SPA)
• Require JS
• Backbone JS
• React JS
• jQuery
• Semantic UI
• Custom Icon Font
• Gulp
• Phonegap
15. OPS / Logging / System & Custom Log
• Graphite: metric and log data store.
• Collectd: syslog and software metric collector.
• Grafana: Front-end, chart builder.
• Statsd: graphite proxy for other programming
languages.
16. OPS / Logging / System & Custom Log
Docker image: voduytuan/tc-graphite
20. OPS / Service discovery (cont.)
HAProxy
Consul-template
Docker Engine
Backend 01 : Port 32680
Backend 02 : Port 32681
Backend 03 : Port 32682
Update haproxy.cfg
& Reload haproxy
CONSUL REGISTRATOR
Notify
Update
Pull
1
2
3
4
5
Client
gliderlabs/registratorgliderlabs/consul-server
21. OPS / Service discovery (cont.)
Sample template of Haproxy, will parsed by Consul-template