当前位置:网站首页>[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 )
边栏推荐
- 2022 national CMMI certification subsidy policy | Changxu consulting
- ARTS_20220628
- Talk about seven ways to realize asynchronous programming
- 【系统盘转回U盘】记录系统盘转回U盘的操作
- Mathematical analysis_ Notes_ Chapter 7: differential calculus of multivariate functions
- S5PV210芯片I2C适配器驱动分析(i2c-s3c2410.c)
- The top half and bottom half of the interrupt are introduced and the implementation method (tasklet and work queue)
- Internet addiction changes brain structure: language function is affected, making people unable to speak neatly
- 大规模服务异常日志检索
- gatling 之性能测试
猜你喜欢
ISO27001认证办理流程及2022年补贴政策汇总
曾经的“彩电大王”,退市前卖猪肉
Talk about seven ways to realize asynchronous programming
“在越南,钱就像躺在街上”
Zhijieyun - meta universe comprehensive solution service provider
The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!
Offline and open source version of notation -- comprehensive evaluation of note taking software anytype
Implementation of super large-scale warehouse clusters in large commercial banks
[HCIA continuous update] WLAN overview and basic concepts
估值900亿,超级芯片IPO来了
随机推荐
Numpy 的仿制 2
国产数据库TiDB初体验:简单易用,快速上手
Open source PostgreSQL extension age for graph database was announced as the top-level project of Apache Software Foundation
【Proteus仿真】基于VSM 串口printf调试输出示例
How to test MDM products
[HCIA continuous update] WLAN overview and basic concepts
简单易用的地图可视化
Self reflection of a small VC after two years of entrepreneurship
12 - explore the underlying principles of IOS | runtime [isa details, class structure, method cache | t]
Pytoch deep learning environment construction
[unity ugui] scrollrect dynamically scales the grid size and automatically locates the middle grid
78 year old professor Huake impacts the IPO, and Fengnian capital is expected to reap dozens of times the return
【华为HCIA持续更新】SDN与FVC
[daily question] 871 Minimum refueling times
CocosCreator事件派发使用
Easy to use map visualization
内核中时间相关的知识介绍
Implementation of super large-scale warehouse clusters in large commercial banks
【系统盘转回U盘】记录系统盘转回U盘的操作
补能的争议路线:快充会走向大一统吗?