当前位置:网站首页>[cloud native] what is the "grid" of service grid?
[cloud native] what is the "grid" of service grid?
2022-07-04 18:06:00 【Digital China cloud base】
What is service grid ? In the article about cloud Nativity , Often with microservices 、 Containers 、 A noun that accompanies concepts such as container orchestration is service grid , Some articles even connect service grid and container 、 Microservices 、DevOps They are listed as the four key technologies of cloud primordial , Its importance can be seen in . So what exactly is a service grid ?

Cloud native cannot be ignorant of the service grid of Technology
In fact, service grid is not an independent concept , It can be said that the service grid came into being after microservices , When talking about service grid, we have to start with micro Services .
Start with micro Services
Simply speaking , When we introduce microservice architecture and enjoy its many benefits , Also inevitably encountered many problems . Most of these problems can be summarized as communication problems between microservice applications , Service grid is a solution to these problems , It is used to manage the communication between micro services in the micro service application .

Microservice architecture “ Angels and Demons ” Like one and two sides
Want to figure out what kind of concept service grid is , A correct path is to find out what kind of problem it solves , That is to ask : What challenges did we encounter when we turned to microservice architecture ? So much so that we need a special microservice communication tool !
Challenges when turning to microservices
Take an online store application as an example , The program consists of several microservice applications , For example, get the requested Web Microservices 、 Payment micro service that realizes payment function 、 Shopping cart microservice 、 Product inventory micro service 、 Database and other micro services . These microservice applications are deployed in a kubernetes On the cluster .

Online store program based on micro service architecture
So what functions do micro services need to implement to make such an online store application run successfully ?
Microservice architecture needs to do
Business logic (Business Logic)
First, each microservice must implement its own corresponding functions .Web Microservices need to handle user interface requests , Payment micro service needs to realize payment function 、 The database needs to process data .

Essential business logic of each microservice
Communication configuration (ommunication Configuration)
In addition, in order to make our online store application run successfully , Not only does each microservice need to implement its own corresponding functions , Communication between micro services is also required .
When the user puts the goods into the shopping cart , At this point, microservices need to communicate with each other ,Web The microservice received a request , Then give it to the shopping cart microservice , The shopping cart microservice then communicates with the database to persist data .

When users add goods to the shopping cart, the communication of microservices
To realize the interaction between microservices like this , We need to configure the corresponding information for the micro service . So when we add new microservices , We need to configure information for all micro services that we need to communicate with , For example, all and Web The microservices of the microservices dialog need to be Web The corresponding information of the micro service configuration . This configuration information is also part of the application deployment code .

Add communication configuration to realize communication between microservices
Security logic (Security Logic)
Microservice applications also need to ensure security .
Usually , In many projects, we are kubernetes The cluster has set firewall rules . There is a proxy as the entry point to get the request first , Therefore, the cluster cannot directly access , Therefore, the application has security around the cluster . But once the request enters the cluster , Communication is not secure . Every micro service in the cluster can communicate with any other micro service , So there are no restrictions on communication . From a security point of view , This means that if an attacker enters the cluster , Then you can do anything , Because we don't have any additional security inside .

colony “ Internal worries ”
For some small applications, this may not be a problem , Because they don't actually have any user sensitive data , But for some important applications , For example, applications with a large amount of personal user data, such as banking systems , The security of data has to be considered . Therefore, additional configuration is required inside each application , To protect the communication between services in the cluster .

Add security logic to ensure the internal security of the cluster
Retry logic (Retry logic)
In addition, in order to make the whole application more robust , You also need to add retry logic for each micro service . That is, when a microservice cannot be accessed , Or lost the connection , At this time, you need to try connecting again .

Retry after disconnection
Therefore, developers need to add retry logic to the service .

Add retry logic to make the microservice architecture more robust
monitor (Metrics and Tracing)
When the microservice application is running , We also need to monitor the implementation of services , Like what http error 、 Get the number of requests received or sent by the microservice 、 Understand how long the request takes to identify bottlenecks in the application , Therefore, developers also need to add monitoring logic for microservices .

Add monitoring logic
You can see , In order to make the microservice application run successfully , The development team of each microservice needs to deal with the business logic of each microservice , You also need to add many other logic irrelevant to the actual business to each micro service , And you may also need to configure some additional things in the cluster , This is when the problem arises .
Problems arise
There is a lot of extra logic to deal with , It means that the developers of microservices cannot concentrate on the actual service logic , Instead, be busy adding security for each microservice 、 The logic of communication . For every microservice , This greatly increases its complexity , When the number of micro services reaches a certain number , It is almost impossible to configure these logic for many micro services one by one .

Configuring logic for many microservices becomes an impossible task
The service grid provides a solution to this problem .
The solution given by the service grid
Instead of adding a lot of logic to each micro service alone , A more reasonable approach is to separate these logic independent of the actual business logic from microservices , Put it into one of its agents , Centralized processing . This applet is a third-party program , We can easily configure the application , There is no need to worry about how the logic is implemented .

Take away the irrelevant logic with business logic , Unified governance
In addition, developers do not have to add agent configuration to the deployment file of microservices , Because the service grid has a control plane , It will automatically add this proxy to each micro service . So now microservices can communicate with each other through these agents , To realize service to service communication composed of control plane , These agents are service grids . So now developers can focus on developing the actual business logic .
Service grid is essentially a network responsible for the communication between microservices , It decouples service governance capabilities from business development , Make developers focus more on business development and innovation . At the same time, the service governance capacity will be sunk to the infrastructure , Leave professional things to professional people , The iterative update of governance capability can also be independent of business . In today's era when microservice architecture is gradually becoming mainstream , Service grid is helping us better realize cloud nativity .
( Some pictures are from the Internet , If there is any infringement , Delete... Now )
边栏推荐
- [daily question] 556 Next bigger element III
- regular expression
- Numpy 的仿制 2
- Rainfall warning broadcast automatic data platform bwii broadcast warning monitor
- DB-Engines 2022年7月数据库排行榜:Microsoft SQL Server 大涨,Oracle 大跌
- curl 命令妙用
- 【Hot100】31. Next spread
- Zhijieyun - meta universe comprehensive solution service provider
- [test development] software testing - Basics
- 简单易用的地图可视化
猜你喜欢
![[HCIA continuous update] overview of WLAN workflow](/img/0a/b3986307589a9f7379fe1dd707b9f8.png)
[HCIA continuous update] overview of WLAN workflow

What if Kaili can't input Chinese???

如何进行MDM的产品测试

"In Vietnam, money is like lying on the street"

The Block:USDD增长势头强劲

Offline and open source version of notation -- comprehensive evaluation of note taking software anytype

Perfectly integrated into win11 style, Microsoft's new onedrive client is the first to see
Blood spitting finishing nanny level series tutorial - play Fiddler bag grabbing tutorial (2) - first meet fiddler, let you have a rational understanding

Self reflection of a small VC after two years of entrepreneurship

【Hot100】32. Longest valid bracket
随机推荐
Stars open stores, return, return, return
Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue
[test development] software testing - Basics
[Huawei HCIA continuous update] SDN and FVC
Make a grenade with 3DMAX
Tutorial on the use of Huawei cloud modelarts (with detailed illustrations)
Analysis of I2C adapter driver of s5pv210 chip (i2c-s3c2410. C)
超标量处理器设计 姚永斌 第6章 指令解码 摘录
比李嘉诚还有钱的币圈大佬,刚在沙特买了楼
Summary of subsidy policies across the country for dcmm certification in 2022
Electronic pet dog - what is the internal structure?
【系统分析师之路】第七章 复盘系统设计(结构化开发方法)
通过事件绑定实现动画效果
Is BigDecimal safe to calculate the amount? Look at these five pits~~
The top half and bottom half of the interrupt are introduced and the implementation method (tasklet and work queue)
I2C子系统之适配器的设备接口分析(i2c-dev.c文件分析)
KS007基于JSP实现人个人博客系统
Talk about seven ways to realize asynchronous programming
内核中时间相关的知识介绍
[HCIA continuous update] WLAN overview and basic concepts