CN109194753B - Method for processing event in service grid - Google Patents

Method for processing event in service grid Download PDF

Info

Publication number
CN109194753B
CN109194753B CN201811057619.0A CN201811057619A CN109194753B CN 109194753 B CN109194753 B CN 109194753B CN 201811057619 A CN201811057619 A CN 201811057619A CN 109194753 B CN109194753 B CN 109194753B
Authority
CN
China
Prior art keywords
service
instance
grid
request
service grid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811057619.0A
Other languages
Chinese (zh)
Other versions
CN109194753A (en
Inventor
李强
王凤琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Hongwei Technology Co Ltd
Original Assignee
Sichuan Hongwei Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Hongwei Technology Co Ltd filed Critical Sichuan Hongwei Technology Co Ltd
Priority to CN201811057619.0A priority Critical patent/CN109194753B/en
Publication of CN109194753A publication Critical patent/CN109194753A/en
Application granted granted Critical
Publication of CN109194753B publication Critical patent/CN109194753B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for processing events in a service grid, which comprises the following steps: A. the service grid applies dynamic routing rules to determine the service desired by the requester, B. the service grid retrieves a pool of instances from the service discovery endpoint, finds the correct destination address, C. the service grid selects the instance most likely to return a fast response based on various factors, D. the service grid attempts to send the request to the instance and records the delay and response type of the result, E. if the instance fails, the service grid retries the request on another instance, F. if the instance always returns an error, the service grid removes it from the load balancing pool, G. if the expiration time of the request has expired, the service grid will proactively fail the request, H. the service grid captures the above behavior data in the form of metric and distributed tracking and sends the data to the metric system. The method of the invention solves the problem of event processing for the service grid technology and is beneficial to the quick landing realization of the service grid technology.

Description

Method for processing event in service grid
Technical Field
The invention relates to the technical field of distributed systems of computer software, in particular to a method for processing events in a service grid.
Background
With the increasing penetration of the mobile internet, more and more companies and enterprises are gradually starting to face the internet and migrating customer-facing services and businesses to the online. When these online services are developed, as the number of clients increases, the architecture of the service platform also changes and evolves. From the early single application architecture to the micro-service architecture, clustering and distribution become standard technology.
The service grid technology is one of the most productive leading-edge technologies at present, and in the process of constructing a basic platform of a micro-service architecture, the service grid technology can further improve the overall performance of a system and reduce the research, development and operation costs. The services grid is a dedicated infrastructure layer for handling service-to-service intercommunication, which is responsible for securely and reliably delivering requests through a complex service topology that encompasses modern cloud-native applications.
The service grid is a network model, an abstraction layer above TCP/IP. It assumes that the underlying L3/L4 network exists and is capable of transferring bytes from one point to another. The services grid also assumes that the network is not as reliable as other aspects of the environment, so the services network must also be able to handle network failures. Event handling of the services grid is one of the basic functions of the services grid and is also a very difficult functional design. Enterprises are faced with this technical challenge in building a service grid.
Disclosure of Invention
The invention aims to overcome the defects in the background technology, and provides a method for processing events in a service grid, which is suitable for a system adopting cluster and/or distributed design, can solve the problem of event processing for the service grid technology with the most productivity at present, is beneficial to realizing the rapid landing of the service grid technology, can greatly reduce the operation and service cost of enterprises through the service grid technology, strengthens the soft infrastructure of business, further improves the system efficiency, and improves the reliability and stability of the whole system.
In order to achieve the technical effects, the invention adopts the following technical scheme:
a method of event handling in a services grid, comprising the steps of:
A. the service grid applies a dynamic routing rule to determine a service request required by a request end;
the routing rule is a mapping relation established between routing records of a routing table and back-end micro-services, and the dynamic routing rule is that a service grid can automatically establish a service routing table of the service grid according to specific routing information exchanged among routers and can timely automatically adjust the service routing table according to actual conditions of changes of links and nodes;
the routing determination includes determining whether the micro-service endpoint should be routed to a production environment or a software lifecycle phase environment; or the routing rule is dynamically configurable, can be globally applied, and can also be applied to any traffic slice;
B. the service grid searches the example pool from the service discovery end point to find out the correct micro-service end point address;
specifically, the service discovery endpoint is a micro-service endpoint, specifically provides functions of service registration and service discovery, and opens a corresponding service port, the instance pool is a pool-like set composed of all available micro-service instances, the function mechanism of the instance pool is similar to a database connection pool, and the server discovery endpoint provides an instance pool for retrieval, which can be used for searching a suitable micro-service endpoint;
C. the service grid selects and determines the microservice endpoint instance that is best able to return a fast response, including the observed delay of the most recent request, based on the influencing factors;
D. the service grid tries to send a service request to the microservice endpoint instance and records the delay and response type of the result;
E. if the micro-service endpoint instance fails, the service grid retries the service request on another micro-service endpoint instance;
F. if the micro-service endpoint example fails for multiple times, the service grid removes the micro-service endpoint example from the load balancing pool; that is, if the selected micro-service endpoint instance always returns an error within a given period of time, for example, if the indication that the micro-service endpoint instance returns an error is received more than 2 times within 1 minute, the service grid considers that it is a service down rather than a transient fault, in which case, the service grid removes the endpoint instance from the load balancing pool;
G. if the service request reaches the expiration time, the service grid actively makes the service request fail;
each request from the request end contains the expiration time of the request, and if the expiration time of the request is up and the response data of the service endpoint instance is not obtained, the service grid actively fails the request;
H. the service grid captures the behavior data in each step in a measuring and distributed tracking mode and sends the data to a measuring system;
the service grid captures the behavior data in the form of measurement and distributed tracking in each step, and sends the data to the measurement system, wherein the measurement system can be a Prometheus, Sysdig, graph, StastsD, Sensu monitoring measurement system.
Further, the instance pool in the step B is a single instance pool or a set of multiple instance pools.
Further, the influencing factors in the step C include, but are not limited to, historical records, measurement data of request time and response time, and load conditions of the micro-service endpoint, and other factors that may influence the response speed of the micro-service endpoint instance may also be considered in practice.
Further, the micro-service endpoint instance capable of returning the fast response most in the step C may be one micro-service endpoint instance, or may be multiple micro-service endpoint instances.
Further, the faults occurring in the micro-service endpoint instance include transient faults, service downtime, and network faults, and in practice, the faults that may occur in the micro-service endpoint instance are not limited to the above faults.
Further, in the step E, the service grid retries the service request form on another micro-service endpoint instance, the retried request is limited to the use of an idempotent HTTP request method, and the non-idempotent HTTP method cannot initiate the retried request.
Further, the step F further includes that the service grid puts the micro-service endpoint instance removed from the load balancing pool into the pool to be recovered, so as to perform a periodic retry in the subsequent process, and once the endpoint instance recovers to be normal during the retry, the end point instance can be removed from the pool to be recovered again and added into the load balancing pool again.
Compared with the prior art, the invention has the following beneficial effects:
the method for processing the event in the service grid can solve the problems in the background technology, namely the problem of event processing in the service grid technology with the highest productivity at present is solved, the service grid technology is favorable for realizing the quick landing of the service grid technology, the operation and service cost of an enterprise can be greatly reduced through the service grid technology, the soft infrastructure of business is reinforced, the system efficiency is further improved, and the reliability and the stability of the whole system are improved.
Drawings
FIG. 1 is a flow diagram of a method of event handling in a services grid in accordance with the present invention.
Detailed Description
The invention will be further elucidated and described with reference to the embodiments of the invention described hereinafter.
Example (b):
as shown in fig. 1, a method for processing events in a service grid, which may be applied to a micro-service architecture, and may be applied to data centers such as a distributed computing platform and a cloud computing platform, mainly includes the following steps:
step 101, the service grid applies dynamic routing rules to determine the services desired by the requestor.
Specifically, the routing rule refers to a mapping relationship established between a routing record of a routing table and a back-end microservice. The dynamic routing rule is specifically that the service grid can automatically establish a service routing table of the service grid according to specific routing information exchanged among routers, and can timely and automatically adjust the service routing table according to the actual condition of the change of links and nodes.
Wherein the routing determination includes determining whether to route to a microservice endpoint of the production environment or to a microservice endpoint of the software lifecycle phase environment; either the micro-service endpoint that should be routed to the local data center or the micro-service endpoint in the cloud host of the cloud service provider.
Preferably, the routing rules in this embodiment are dynamically configurable, and may be applied globally or to any traffic slice.
Step 102, the service grid retrieves the pool of instances from the service discovery endpoint to find the correct destination address.
Specifically, the service discovery endpoint is a micro-service endpoint that provides functions of service registration and service discovery and opens a corresponding service port.
Wherein, the instance pool is a kind of pool-like collection composed of all available micro service instances, and the function mechanism of the instance pool is similar to the database connection pool. The server discovery endpoint then provides a pool of instances that can be retrieved and used to find the appropriate microservice endpoint. In practice, the instance pool may be a single instance pool, or may be a set of instance pools consisting of a plurality of instance pools.
The service grid selects the most likely instance to return a quick response based on various influencing factors, step 103.
The service grid selects the instances that are most likely to return a quick response based on various influencing factors, including the observed delay of the most recent request. Specifically, the various influencing factors include historical records, measurement data of request time and response time, load conditions of micro-service endpoints and other information.
In practice, the fast response instance may be one micro-service endpoint instance or multiple micro-service endpoint instances.
The service grid attempts to send a request to the instance and records the delay and response type of the result, step 104.
The service grid attempts to send a request to the microservice endpoint instance selected in the previous step and records the latency and response type of the response result.
If the instance fails, the service grid will retry the request on another instance, step 105.
If the microservice endpoint instance selected in the previous step fails, the service grid will retry the request on another instance. The fault occurring in the instance may be a transient fault, or may be a service outage, a network fault, or the like.
Specifically, the retry request is limited to the use of an idempotent HTTP request method, and a non-idempotent HTTP method cannot initiate the retry request.
If the instance always returns an error, the service grid will remove it from the load balancing pool, step 106.
If the selected micro-service endpoint instance always returns errors within a given period of time, for example, the indication that the micro-service endpoint instance returns errors within 1 minute exceeds 2 times, and the specific limited time, that is, the number of times, can be set according to specific conditions in practice, the service grid will consider that it is a service downtime rather than a transient fault, and in this case, the service grid will remove this endpoint instance from the load balancing pool.
Preferably, in this embodiment, the service grid places the culled endpoint instance in another dedicated pool, the to-be-restored pool, for periodic retries at a later time. Once the endpoint instance returns to normal, it may be removed from this special pool again and rejoined to the load balancing pool.
If the expiration time of the request has expired, the service grid will proactively fail the request, step 107.
Each request from the requestor contains the expiration time of the request, and if the expiration time of the request has expired and no response data is obtained for the service endpoint instance, the service grid will proactively fail the request.
Step 108, the service grid captures the behavior data in the form of measurement and distributed tracking, and sends the data to the measurement system.
The service grid captures the behavior data in the form of measurement and distributed tracking in each step and sends the data to the measurement system.
Specifically, the measurement system may be a monitoring measurement system such as Prometheus, Sysdig, Graphite, StatsD, Sensu, or the like.
Therefore, the method for processing the events in the service grid solves the problem of event processing for the service grid technology with the most productivity at present, is beneficial to realizing the quick landing of the service grid technology, can greatly reduce the operation and service cost of enterprises through the service grid technology, strengthens the soft infrastructure of business, further improves the system efficiency, and improves the reliability and stability of the whole system.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (5)

1. A method for event handling in a services grid, comprising the steps of:
A. the service grid applies a dynamic routing rule to determine a service request required by a request end;
B. the service grid searches the example pool from the service discovery end point to find out the correct micro-service end point address;
C. the service grid selects and determines a micro-service endpoint instance which can return the fast response most according to the influence factors; the influencing factors in the step C comprise historical records, measurement data of request time and response time and load conditions of micro-service endpoints;
D. the service grid tries to send a service request to the microservice endpoint instance and records the delay and response type of the result;
E. if the micro-service endpoint instance fails, the service grid retries the service request on another micro-service endpoint instance; the service grid retries the service request formula on another micro-service endpoint instance in the step E, and the retried request is limited to an idempotent HTTP request method;
F. if the micro-service endpoint instance fails for multiple times within a given period of time, the service grid removes the micro-service endpoint instance from the load balancing pool;
G. if the service request reaches the expiration time, the service grid actively makes the service request fail;
H. the service grid captures the behavior data in each step in the form of measurement and distributed tracking and sends the data to the measurement system.
2. The method of claim 1, wherein the instance pool in step B is a single instance pool or a collection of multiple instance pools.
3. The method of claim 1, wherein the microservice endpoint instance that returns the most rapid response in step C may be one microservice endpoint instance or a plurality of microservice endpoint instances.
4. The method of claim 1, wherein the failures of the microservice endpoint instances include transient failures, service outages, and network failures.
5. The method of claim 1, wherein the step F further comprises the service grid placing the micro-service endpoint instances removed from the load balancing pool into the pool to be restored.
CN201811057619.0A 2018-09-11 2018-09-11 Method for processing event in service grid Active CN109194753B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811057619.0A CN109194753B (en) 2018-09-11 2018-09-11 Method for processing event in service grid

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811057619.0A CN109194753B (en) 2018-09-11 2018-09-11 Method for processing event in service grid

Publications (2)

Publication Number Publication Date
CN109194753A CN109194753A (en) 2019-01-11
CN109194753B true CN109194753B (en) 2021-09-17

Family

ID=64910267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811057619.0A Active CN109194753B (en) 2018-09-11 2018-09-11 Method for processing event in service grid

Country Status (1)

Country Link
CN (1) CN109194753B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11012520B2 (en) * 2019-03-11 2021-05-18 International Business Machines Corporation Manage a network of microservices
CN109981789B (en) * 2019-04-03 2021-09-07 浪潮云信息技术股份公司 Micro service engine based on agent mode
CN111767157B (en) * 2019-08-07 2024-05-17 北京京东尚科信息技术有限公司 Request processing method and device based on service grid
CN112351106B (en) * 2020-11-12 2021-08-27 四川长虹电器股份有限公司 Service grid platform containing event grid and communication method thereof
CN113259426B (en) * 2021-05-06 2022-08-16 网络通信与安全紫金山实验室 Method, system, device and medium for resolving data dependency in microservice
CN116567095B (en) * 2023-07-11 2023-12-08 南京坤伦大数据科技有限公司 Cloud computing distributed scheduling third party service grid system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047563A (en) * 2007-04-20 2007-10-03 北京航空航天大学 System, method and loading uniform method for implementing network resource adaptive
CN101202765A (en) * 2007-12-19 2008-06-18 苏州大学 Method of service mesh grid dispatching based on history feedback
CN101552732A (en) * 2005-03-10 2009-10-07 汤姆森许可贸易公司 Hybrid grid route selection protocol
CN106888129A (en) * 2017-04-20 2017-06-23 国家电网公司 It is a kind of can elastic telescopic distributed service management system and its method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552732A (en) * 2005-03-10 2009-10-07 汤姆森许可贸易公司 Hybrid grid route selection protocol
CN101047563A (en) * 2007-04-20 2007-10-03 北京航空航天大学 System, method and loading uniform method for implementing network resource adaptive
CN101202765A (en) * 2007-12-19 2008-06-18 苏州大学 Method of service mesh grid dispatching based on history feedback
CN106888129A (en) * 2017-04-20 2017-06-23 国家电网公司 It is a kind of can elastic telescopic distributed service management system and its method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"论Service Mesh在微服务架构中的优势";孙杰平;《通信世界》;20180825;第49页以及图Service Mesh的工作方式 *

Also Published As

Publication number Publication date
CN109194753A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN109194753B (en) Method for processing event in service grid
US9641449B2 (en) Variable configurations for workload distribution across multiple sites
JP4637842B2 (en) Fast application notification in clustered computing systems
CN101876924B (en) Database fault automatic detection and transfer method
US8260924B2 (en) User load balancing systems and methods thereof
US8738961B2 (en) High-availability computer cluster with failover support based on a resource map
EP3896570A1 (en) Systems and methods for server cluster application virtualization
US20150339308A1 (en) Managing site-based search configuration data
US20040153866A1 (en) Markov model of availability for clustered systems
US11941267B2 (en) Reseeding a mediator of a cross-site storage solution
US10320905B2 (en) Highly available network filer super cluster
US10826812B2 (en) Multiple quorum witness
WO2021051570A1 (en) Data storage method based on distributed cluster, and related device thereof
US11314431B2 (en) Distributed data blocks using storage path cost values
US11928352B2 (en) Maintaining the benefit of parallel splitting of ops between primary and secondary storage clusters in synchronous replication while adding support for op logging and early engagement of op logging
US20110153826A1 (en) Fault tolerant and scalable load distribution of resources
US10715608B2 (en) Automatic server cluster discovery
US10812576B1 (en) Hardware load balancer gateway on commodity switch hardware
US10979303B1 (en) Segmentation of maintenance on distributed systems
US20240036997A1 (en) Methods and systems to improve input/output (i/o) resumption time during a non-disruptive automatic unplanned failover from a primary copy of data at a primary storage system to a mirror copy of the data at a cross-site secondary storage system
US9172600B1 (en) Efficient I/O error analysis and proactive I/O failover to alternate paths for InfiniBand channel
US11334279B2 (en) Hierarchical blacklisting of storage system components
US11119994B1 (en) Record-by-record live migration using segmentation
US11841780B1 (en) Simulated network outages to manage backup network scaling
US8930762B1 (en) Optimal tracking of cluster-wide shared storage connectivity for graceful error handling

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200110

Address after: 610000 Chengdu City, Sichuan Province, China (Sichuan) Free Trade Pilot Area, No. 199 Tianfu Fourth Street, Chengdu High-tech Zone, 33 floors

Applicant after: Panovasic Co., Ltd.

Address before: 621000 Mianyang province high tech Zone, East Hing Road, No. 35 cotton

Applicant before: Sichuan Changhong Electrical Appliance Co., Ltd.

GR01 Patent grant
GR01 Patent grant