From monolithic application to microservice framework


challenges:
1. version control
After testing the branch A, pull the latest code(merged B) -> confilcts ? no conflicts? -> regression testing
2. change to go language
3. upgrade the library go1.12-go1.13
4. only one testing server waiting for multi testing tasks
pain points due to strong dependency

service isolation solves code duplication

micro-service:
MQ to acchieve service decoupling via asyn msg communication
independent database per service, isolation
each service deployed on the web can only be accessed through PORT

Exposing external interface: HTTP
exposing internal interface: rpc
-> layered architecture
support multi -language

blueprint of microservice
gateway: each kind of web service may contain a cluster with ips and port -> we need router, and registration center --> healthy service discovery -> get ip and port
1,router 2.service discovery 3.authentication 4.fuse (two many requests) 5.ip blacklist/whiltelist 6. load balancer


inner service register at the registration center using ip/port
web -> service discovery -> get healthy service's ip/port(a kind of srv may be a cluster) -> to web -> connect to that service
configuration center: without it, if we have to change certain config in one srv, we need to restart that srv, causing other srvs to fail
-> read from one place can solve this problem
link tracing: a transaction may span many services, easy to troubleshoot the error

浙公网安备 33010602011771号