当前位置:网站首页>Microservices and related component concepts
Microservices and related component concepts
2022-07-25 05:25:00 【Java world from scratch】
List of articles
1. Reference material
2. Microservice related concepts
1. Monomer architecture

Develop all the functions of the business in one project , Deploy as a package .
advantage : Simple architecture 、 Low deployment cost 、 Suitable for small projects .
Inferiority : High coupling degree 、 Expandability of .
2. Distributed architecture

Split the system according to business functions , Each business function module is developed as an independent project , It's called a service .
advantage : loose coupling 、 Good scalability 、 Suitable for large Internet projects .
shortcoming : The architecture is complex 、 Difficulty .
3. Microservice architecture

Microservice is a well-designed distributed architecture .
characteristic :
- Single responsibility : Microservices have smaller granularity , Each service corresponds to a unique business capability , Single responsibility .
- autonomous : Team independence 、 Technology independence 、 Data independence , Independent deployment and delivery .
- Service oriented : The service provides a unified standard interface , It has nothing to do with language and Technology .
- Strong isolation : Isolate service calls 、 Fault tolerance 、 Downgrade , Avoid cascading problems .
advantage : Smaller split granularity 、 The service is more independent 、 Less coupling .
shortcoming : The architecture is very complex 、 Operation and maintenance 、 monitor 、 Deployment is more difficult .
Service splitting principle
- Different microservices , Don't develop the same business repeatedly
- Microservice data independence , Do not access databases of other microservices
- Microservices can expose their business as interfaces , For other microservices to call
Call between services
service A Can pass Http Request call service B.

3. Microservice framework and technical components

2.1 Registry Center
problem :
- service A When initiating a remote call , How to know about the service B Example of ip Address and port ?( Register at the service center 、 Pull the service list )
- There are multiple services B Address of the instance , service A How to choose when calling ?( Load balancing algorithm )
- service A How to know about a service B Whether the instance is still healthy , Is it down ?( The heartbeat detection )
The role of the registry is , Save the list of services 、 Detect service status through heartbeat 、 Allocate service instances through load balancing algorithm .
2.2 The remote invocation
Realize the call between services (HTTP agreement )
2.3 Configuration center
When there are more and more instances of microservice deployment , Up to dozens 、 Hundreds of hours , Modifying the microservice configuration one by one will drive people crazy , And it's easy to make mistakes . We need a unified configuration management solution , Sure Centrally manage the configuration of all instances .

2.4 gateway
Front end requests do not allow direct access to microservices , You must go through the gateway first .
The gateway has the functions of routing and filtering , Routing is to distribute requests to a micro service , Filtering will directly intercept unqualified requests .

2.5 Service monitoring 、 Protect
Protect service callers , Protect service calls from cascading failures , It is possible to quickly return to the service failure , Don't let users wait for a long time .
Protect service providers , Interface current limiting .
边栏推荐
- [cloud co creation] design Huawei cloud storage architecture with the youngest cloud service hcie (Part 1)
- Forwarding and sharing function of wechat applet
- Implement is by yourself_ base_ of
- What should testers do if they encounter a bug that is difficult to reproduce?
- Build keyword driven automated testing framework
- 微服务 - Hystrix 熔断器
- VPP cannot load up status interface
- Learning records [email protected] R & D effectiveness measurement indicators
- After Oracle user a deletes a table under user B's name, can user B recover the deleted table through the recycle bin?
- What about reinstalling win11 system?
猜你喜欢

The third question of force deduction -- the longest substring without repeated characters

微服务 - 远程调用(Feign组件)

Wechat applet related operation examples

Redis集群搭建(Windows)

Win11 how to view the file explorer tab

C Programming -- the solution of dynamic programming of "the sum of the largest subarray"

SystemVerilog中interface(接口)介绍
Set up private CA server

Realsense D435i 深度图优化_高精度模式

微信小程序相关操作示例
随机推荐
Solve the problem that uni app applet obtains routes and route parameters
Anshi semiconductor management paid a visit to Wentai technology and Gree Electric appliance
Tips for downloading videos in batches
Go language function
background
JWT(json web token)
deep报错
Browser cache HTTP cache CDN cache localstorage / sessionstorage / cookies
Interface idempotency
Implement is by yourself_ base_ of
Airserver 7.3.0 Chinese version mobile device wireless transmission computer screen tool
Zhou Chen, vice president of zhanrui market, responded to everything about 5g chip chunteng 510!
Build keyword driven automated testing framework
Learning records [email protected] R & D effectiveness measurement indicators
Set up private CA server
Solution of win11 blue screen code 0x0000001a
VIM search and replacement and the use of regular expressions
VPP cannot load up status interface
自己实现is_class
The price is 17300! Why does Huawei mate x face Samsung fold?