当前位置:网站首页>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 .
边栏推荐
猜你喜欢

ThreadLocal

Pikachu vulnerability platform exercise

微服务 - 配置中心 - Nacos

AirServer 7.3.0中文版手机设备无线传送电脑屏幕工具

Leetcode 15: sum of three numbers

Browser cache HTTP cache CDN cache localstorage / sessionstorage / cookies

项目管理工具——项目开发者工具

Special analysis of data security construction in banking industry

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

"Niuke | daily question" inverse Polish expression
随机推荐
Go language function
学习记录[email protected]研发效能度量指标
easyrecovery免费数据恢复工具操作简单一键恢复数据
Dragon Dragon community released the first Anolis OS Security Guide to escort users' business systems
Vim查找替换及正则表达式的使用
The second day of rhcsa summer vacation
systemVerilog中automatic用法
Seven suggestions for Server Protection
C编程 --“最大子数组的和” 的动态规划的解法
2022-07-24:以下go语言代码输出什么?A:[]int{};B:[]int(nil);C:panic;D:编译错误。 package main import ( “fmt“ ) f
Panda3D keyboard moving scene
Redis集群搭建(Windows)
ping命令
LCP插件创建对等VLAN接口
In depth understanding of pre post + +, -- and negative modulus
弹性布局总结
STL notes (I): knowledge system
STL notes (VIII): container - List
Exchange 2010 SSL certificate installation document
Powering 5g notebook market, Wentai technology joined the "Honghu plan"