1.介绍microservice
2.介绍springboot
3.创建协作的微服务
4.docker部署微服务
5.添加api描述,openapi/swagger
6.添加持久层
7.reactive microservice
构建 scalable, resilient and manageable microservice
问题:
- How I learned about microservices and what experience I have of their benefits and challenges
autonomous software component, having its own persistence and communicating with api
多个好处:Decomposing the platform's functionality into a set of autonomous software components provides a number of benefits:
好处1:deploy parts of system, integrating existing systems
好处2:replace components with customers'
好处3:being delievered and upgraded seperately
好处3:scaled out to serveral server instances independently
面临挑战:
挑战1:manually configuring load balancers and manually setting up new nodes. time-consuming and error-prone.
挑战2:chain of failures
挑战3:keepping the configuration consistent and up-to-date in all of instances of components
挑战4:monitoring, in terms of latency issues and hardware usage(CPU, memory, disk and the network)
挑战5 collecting log files and correlating related log events
- What is a microservice-based architecture?
defining microservice: splitting up a monolithic application into smaller components, achieving two goals:
1. faster development, enabling continuous deployments
2.easier to scale, manually or automatically
an autonomous software component: independently upgradable and scalable
条件1:mircroservices don't share data in database
条件2:communicating with well defined interface
条件3:deployed as seperate runtime processes, such as docker
条件4:microservice instance is stateless
How big should a microservice be?
1.small enough to fit to the head of a develper
2.not jeopardize performance(latency) or data consistency
- Challenges with microservices
- Design patterns for handling challenges
- Software enablers that can help us handle these challenges
- Other important considerations that aren't covered in this book