CN116996437A - Service grid routing method, device, electronic equipment and medium - Google Patents

Service grid routing method, device, electronic equipment and medium Download PDF

Info

Publication number
CN116996437A
CN116996437A CN202311088387.6A CN202311088387A CN116996437A CN 116996437 A CN116996437 A CN 116996437A CN 202311088387 A CN202311088387 A CN 202311088387A CN 116996437 A CN116996437 A CN 116996437A
Authority
CN
China
Prior art keywords
service
agent
sbf
grid
fib
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.)
Pending
Application number
CN202311088387.6A
Other languages
Chinese (zh)
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.)
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Original Assignee
China Telecom Technology Innovation Center
China Telecom Corp 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 China Telecom Technology Innovation Center, China Telecom Corp Ltd filed Critical China Telecom Technology Innovation Center
Priority to CN202311088387.6A priority Critical patent/CN116996437A/en
Publication of CN116996437A publication Critical patent/CN116996437A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Landscapes

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

Abstract

The present disclosure relates to a service grid routing method, apparatus, electronic device, and medium. The method comprises the following steps: the service gateway hashes the name of a data packet of a service request from a client, obtains each level of prefix by gradually eliminating the last component of the name of the data packet, and sets the corresponding bit array position in a stable bloom filter SBF of the service gateway as a first value according to the hash value so as to record that all possibly matched name prefixes possibly exist in a forwarding information base FIB maintained by the service gateway in the SBF of the service gateway; searching the SBF step by step in each agent of the service grid to determine whether the prefixes of the various levels exist in one of the FIBs of the agents of the service grid; and creating FIB entries in the service grid for the requested data packets based on the results of the progressive searches in the various agents of the service grid.

Description

Service grid routing method, device, electronic equipment and medium
Technical Field
The application belongs to the field of network security and technology, and in particular relates to a service grid routing method, a device, electronic equipment and a medium.
Background
In the age of rapid development of information technology today, more and more enterprises and organizations are beginning to build their applications using micro-service architecture to achieve higher scalability, reliability and flexibility. The micro-service architecture divides an application into multiple small independent services, each of which can be deployed, upgraded, and maintained independently. These services communicate over a network to form a distributed system.
However, micro-service architecture also presents new challenges, particularly in terms of inter-service communication. Because the services in the micro-service architecture are independent of each other, communication between the services involves interactions between multiple network nodes and multiple service instances, which is highly complex. To solve this problem, a service grid has been developed. A service grid is an infrastructure layer designed specifically for micro-service architecture, intended to manage communication between services. The method provides functions of reliability, security, observability and the like for communication among the micro services, so that the micro service architecture is easier to manage and expand.
However, most of the existing service grid architectures adopt a centralized control manner, which easily causes single-point faults and bottlenecks, and is difficult to cope with the communication requirements of large-scale complex micro-inter-service communication.
Disclosure of Invention
The application provides a service grid routing method, a service grid routing device and electronic equipment, and aims to provide a more efficient and reliable communication mode between micro services, so that the requirements of a distributed system are better met.
According to one aspect of the present application, there is provided a service grid routing method, comprising: the service gateway hashes the name of a data packet of a service request from a client, obtains prefixes of each level by gradually eliminating the last component of the name of the data packet, and sets the corresponding bit array position in the stable bloom filter SBF of the service gateway as a first value according to the hash value so as to record that all possibly matched name prefixes possibly exist in the FIB maintained by the service gateway in the SBF of the service gateway; searching the SBF step by step in each agent of the service grid to determine whether the prefixes of the various levels exist in one of the FIBs of the agents of the service grid; and creating FIB entries in the service grid for the requested data packets based on the results of the progressive searches in the various agents of the service grid.
According to an example embodiment, searching SBFs in respective agents of a service grid stepwise to determine whether the respective levels of prefixes are present in one of the FIBs of the agents of the service grid comprises: flooding in the whole service grid when each agent in the service grid does not have the longest prefix in each level of prefixes, and simultaneously each agent in the service grid transmits a copy of the request data packet to the client so as to record whether the route of the successful retrieval request data packet consistent with the number of all possible paths exists in the corresponding FIB in the stable bloom filter of each agent; forwarding a service request to a service represented by an agent if one of the prefixes is found in its corresponding FIB in the SBF of the service grid, and prioritizing in the SBF of the agent to indicate the priority of the agent forwarding the service request in forwarding rules, wherein the priority of the agent for which the longest prefix is found in its corresponding FIB in its SBF is high and decreases as the number of prefix components decreases; and if one of the prefixes exists in the corresponding FIB is not found in the SBF of any agent of the service grid, stopping the searching process when the number of the prefix components is zero, and recording the routing information of the service request which does not exist in the corresponding FIB in the SBF of each agent of the service grid by setting the corresponding bit array position to a second value which is different from the first value.
According to an example embodiment, creating FIB entries for requested data packets in a service grid based on results of progressive searches in respective agents of the service grid comprises: FIB entries are created in the service grid for the requested data packets based on priority flags made in the SBF of the agents and/or whether there is routing information for the service request in its corresponding FIB recorded in the SBF of each agent of the service grid.
According to an example embodiment, the method further comprises: when a new service is to be added into the service grid, the service gateway registers the new service into the service grid; interacting the service instance name of the new service with the prefix naming entity to verify whether the name prefix accords with the naming specification of the data naming network; recording the name prefix of the service instance name of the new service in the FIB of the service gateway under the condition that the name prefix of the service instance name of the new service accords with the naming specification of the data naming network; advertising a name prefix of a service instance name of the new service to each agent in a service grid; and each agent records the name prefix of the service instance name of the new service in its own FIB.
According to an example embodiment, the method further comprises: and after verifying whether the name prefix of the service instance name of the new service accords with the naming specification of the data naming network, returning a verification result to the client, wherein the verification result also comprises a failure reason under the condition that the verification result is verification failure.
According to an example embodiment, the method further comprises: when a service request from a client is received, the service gateway interacts a data packet of the service request with a prefix naming entity to verify whether the name prefix accords with the naming specification of the data naming network; and returning a verification result to the client, wherein the verification result further comprises a failure reason when the verification result is verification failure, and the client resends the data packet of the service request according to the failure reason in response to receiving the verification result of verification failure.
According to an example embodiment, the method further comprises: deleting the FIB entry of the agent when the forwarding routing rule in the FIB entry of the agent triggers zero within a period of time; and setting the corresponding bit array position in the agent's SBF to a second value different from the first value to indicate that the FIB entry is no longer present in its FIB.
According to an example embodiment, the method further comprises: when the SBF of the high priority agent and the SBF of the low priority agent which delete the FIB entries have priority information of the service request, forwarding a data packet of the service request to the low priority agent because the corresponding bit array position in the SBF of the high priority agent is set to a second value; in response to receiving a service request retransmitted by a client under the condition that a response is not received, forwarding a data packet of the service request from a low-priority agent to an agent with a second highest priority recorded in an SBF (service flow rate); and carrying out next-hop routing according to the routing information of the service request in the corresponding FIB recorded in the SBF of the next-highest priority proxy so as to direct the retransmitted data packet to the correct service instance, and simultaneously, re-creating the FIB entry for the requested data packet.
According to an example embodiment, the method further comprises: when an agent fails, the SBF associated with the agent is reset, stopping forwarding data packets through the agent; and forwarding the data packet over the alternate path.
According to an example embodiment, the method further comprises: in the event of a failed agent recovery, the corresponding bit array position in the SBF associated with the agent is updated with the SBF by setting the corresponding bit array position to a first value to force the agent to be used as a primary path or an additional path.
According to another aspect of the present application, there is provided an electronic apparatus including: one or more processors, and a memory coupled with the one or more processors, the memory storing computer readable program instructions that, when executed by the one or more processors, cause the one or more processors to perform a service grid routing method according to the present application.
According to a further aspect of the application there is provided a service grid routing device comprising means for performing the steps of the service grid routing method according to the application.
According to yet another aspect of the present application there is provided a non-transitory computer readable medium having instructions stored thereon for execution by a processor to perform a service grid routing method according to the present application.
According to a further aspect of the application there is provided a computer program product comprising a computer program which, when executed by a processor, performs a service grid routing method according to the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
For a better understanding of the present disclosure, and to show how the same may be carried into effect, reference will now be made, by way of example, to the accompanying drawings in which:
FIG. 1 shows a schematic block diagram of a prior art service network architecture implemented by means of centralized control;
FIG. 2 illustrates a schematic interactive block diagram of a content-driven based service grid routing mechanism, according to an exemplary embodiment of the present disclosure;
FIG. 3 shows a schematic block diagram of constructing a FIB using SBF according to an exemplary embodiment of the present disclosure;
FIGS. 4A and 4B illustrate a schematic flow diagram of a content-driven based service grid routing method according to an exemplary embodiment of the present disclosure;
fig. 5 shows a schematic block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
FIG. 6 illustrates a block diagram of an example structure of a computer system that may be employed in accordance with an example embodiment of the present disclosure.
Note that like reference numerals refer to corresponding parts throughout the drawings.
Detailed Description
Technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, but it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. The following description of the embodiments is merely exemplary in nature and is in no way intended to limit the disclosure, its application, or uses. It should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect. The relative arrangement of parts and steps, numerical expressions and numerical values set forth in these embodiments should be construed as exemplary only, and not limiting the scope of the present disclosure unless specifically stated otherwise.
The term "comprising" and variations thereof as used in this disclosure is meant to encompass at least the following elements/features, but not to exclude other elements/features, i.e. "including but not limited to". Furthermore, the term "comprising" and variations thereof as used in this disclosure is meant to encompass at least the following elements/features, but not to exclude other elements/features, i.e. "including but not limited to". Thus, inclusion is synonymous with inclusion. The term "based on" means "based at least in part on.
Reference throughout this specification to "one embodiment," "some embodiments," or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. For example, the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Moreover, appearances of the phrases "in one embodiment," "in some embodiments," or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units. Unless specified otherwise, the concepts of "first," "second," etc. are not intended to imply that the objects so described must be in a given order, either temporally, spatially, in ranking, or in any other manner.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Embodiments of the present disclosure will be described in detail below with reference to the attached drawings, but the present disclosure is not limited to these specific embodiments. The following embodiments may be combined with each other and some embodiments may not be repeated for the same or similar concepts or processes. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner as would be apparent to one of ordinary skill in the art from this disclosure in one or more embodiments.
The data naming network (NDN: named Data Networking) architecture is an Information-centric network (ICN: information-Centric Networking) proposal that introduces content-driven network operations to augment and/or replace the current host-centric internet model. In NDN, network primitives specify hierarchical content names instead of IP addresses based on hierarchical names, user requests (also called interest packages). Thus, routing and lookup operations within a node are also based on hierarchical names.
Unlike conventional IP networks, NDNs abstract data into pieces of content with unique identifiers and use these identifiers to locate and transfer data. Thus, in NDN, maintained in the forwarding information base are the names of the content blocks and the corresponding forwarding rules, rather than the IP addresses and routing tables. The routing mode based on the content enables the NDN router to autonomously select the optimal routing path and forwarding rule according to the needs without relying on a centralized controller for management and control, has better expandability, flexibility and robustness, and can better cope with complex environments and dynamic changes in a distributed system.
Fig. 1 shows a schematic block diagram of a service network architecture implemented by means of centralized control in the prior art. As shown in fig. 1, the service grid architecture is basically implemented by means of centralized control. In the service grid, the communication between agents adopts a framework called Sidecar, that is, each service instance has a separate agent Sidecar paired with it and is responsible for the communication between agents. In a service grid, the process of route forwarding is mainly implemented through communication between agents. The service agent will obtain the routing forwarding rules via the configuration file or control plane to determine to which service instance the request should be forwarded.
Service registration in a service grid: the service IP address, port, cluster, domain name and other relevant information are registered to the control plane by the attributed service agent.
Service discovery: the service agent acquires information such as a service registration port by calling a control plane, and the like, so that synchronization of micro-service information is realized.
Route forwarding: the service agent obtains the routing forwarding rules via a configuration file or control plane to determine to which service instance the request should be forwarded. However, the centralized control route forwarding mode is easy to cause single-point faults and bottlenecks, has centralized control, delay and maintenance problems, and is difficult to cope with the communication requirements of large-scale complex micro-service communication.
Based on this, this patent proposes a content-driven based service grid routing mechanism (CDSRM: content Driven Service Grid Routing Mechanism), as shown in fig. 2, which shows a schematic interactive block diagram of the content-driven based service grid routing mechanism according to an exemplary embodiment of the present disclosure. The method is a name-based routing mechanism, and aims to complete service routing among agents in the service grid by utilizing the advantages of hierarchical naming as simply and efficiently as possible, and realize routing without using an IP-based routing protocol as a rollback mechanism so as to improve the efficiency and expandability of the service grid and enable the service grid to be better suitable for a distributed system.
The main content of the content-driven-based service grid routing mechanism includes the following aspects: 1) Based on a stable bloom filter (SBF: stable Bloom Filters) of the forwarding information base (FIB: forward Information Database) construction; 2) Service route forwarding rules; 3) A retransmission mechanism; and 4) failure and recovery mechanisms. These aspects are described in detail below with reference to the drawings.
Stable bloom filters SBF are a common data structure commonly used to handle fast lookup and deduplication of mass data. The special bloom filter is used for recording the insertion times when elements are inserted and sampling the average value of the insertion times, so that the problems of instability and misjudgment rate of the traditional bloom filter are avoided.
The SBF has the functions of reducing the data transmission quantity by compressing data and reducing the misjudgment rate, improving the system performance and being commonly used in scenes such as routing, cache management, data duplication removal and the like. Its working principle is based on a hash function, mapping each element onto a plurality of bits and storing it in a bit vector. When retrieving an element, the SBF examines the corresponding bits in the bit vector, which may exist if the bits are all of a first value (e.g., 1); if at least one bit is a second value (e.g., 0), then the element is not present. The checking mode based on the bit vector can quickly and accurately judge whether the element exists or not, and has high-efficiency space utilization rate and time complexity. For ease of understanding, the following description will take as an example a first value of 1 and a second value of 0.
FIG. 3 shows a schematic block diagram of constructing a FIB using SBF according to an exemplary embodiment of the present disclosure. As shown in fig. 3, in constructing a forwarding routing table using SBF, each forwarding table entry is encoded as an entry containing a prefix of the name to be matched and a stable bloom filter. SBF provides an efficient way to check if an element is present in a dataset by recording the minimum hash value of all the hash functions of each element in the dataset. Specifically, when a packet arrives at a service grid proxy, the proxy will determine whether the packet needs to be routed to forward by matching the name prefix to the SBF filter.
In constructing FIB using SBF, the present application utilizes NDN hierarchical naming to define service names. The naming convention for NDNs is based on a hierarchy, similar to the form of uniform resource identifiers (URIs: uniform Resource Identifier), each layer is made up of a component, each component in turn being made up of a name and a list of optional parameters. NDN naming conventions allow the use of arbitrary characters and binary data, so that service names can be defined as a complex hierarchy to reflect the organization and functional characteristics of the service. For example, assuming that two micro services provide user authentication and user data services, respectively, their service names can be defined as: A/B/C/D/authentication/user and/A/B/C/D/data/user. wherein/A/B/C/D/represents the domain name (pod), cluster, version, etc. where the service is located. The service names thus defined may make the FIB constructed by the SBF clearer and easier to manage. Through SBF, each service name can be mapped to one or more service instances, thereby enabling content-based routing and load balancing. In routing the request, an agent in the service grid may determine the service instance of the request by looking up the SBF corresponding to the FIB and forward the request to the corresponding service instance.
SBF limits the flooding of packets by recording their paths. When the node receives the Service request, the portal agent (i.e., service Gateway SG) interacts the data packet of the Service request with the SPA, verifies whether the name prefix thereof meets the NDN naming specification, and forwards the verification result back to the requesting client. Then, the CDSRM hashes the name of the data packet and gradually eliminates the last component of the name to obtain each level of prefix, and then records in the SBF of each agent that each level of prefix may exist in its corresponding FIB by setting the corresponding bit array position to 1 according to the hash value.
Construction of SBF-based FIB and service route forwarding rules are further described below with reference to fig. 4A and 4B.
Fig. 4A shows a schematic flow chart 400A of a content-driven based service grid routing method according to an exemplary embodiment of the present disclosure.
As shown in fig. 4A, upon receiving a service request from a client, at step S410, the service gateway interacts the data packet of the service request with the prefix naming entity, verifying whether its name prefix meets the naming convention of the data naming network.
If the name prefix meets the naming specification of the data naming network, step S420 is performed, otherwise the client is required to retransmit the data packet meeting the naming specification.
According to one embodiment of the invention, it is assumed that there is no information about a certain service location in the control plane and that client a wants to obtain content/a/B/C/D/0 l.avi/v1, while it is assumed that this content is located in the service B2 version of a certain pod. After receiving the service request sent by the client a, the service gateway first interacts the data packet of the service request with the prefix naming entity (SPA: service Prefix Authentication) to verify whether the name prefix conforms to the naming specification of the data naming network, and sends the verification result back to the client. And when the verification result is verification failure, the verification result also comprises failure reasons, so that the client can correct the data packet according to the failure reasons so as to resend the corrected data packet of the service request.
At step S420, the service gateway hashes the name of the data packet, obtains each level of prefix by gradually eliminating the last component of the name of the data packet, and sets the corresponding bit array position in the SBF of the service gateway to 1 according to the hash value, so as to record in the SBF of the service gateway that all the possibly matched name prefixes may exist in the FIB maintained by the service gateway.
Continuing with the above embodiment in which the client a wants to obtain content/a/B/C/D/0 l.avi/v1, in the case where the name prefix meets the naming convention, the service gateway hashes the entire name, obtains each level of prefix by gradually eliminating the last component of the name, and records the relevant event in the SBF of the service gateway by setting the corresponding bit array position to 1 according to the hash value. That is, if the name of the retrieved content is/a/B/C/D, the name prefix/a/B/C/D,/a/B/C,/a/B and/a may all exist in the FIB maintained by the service gateway by setting the corresponding bit array position to 1 according to the hash value in the SBF of the service gateway.
At step S430, the SBF is looked up step by step in the service grid to determine if the level of prefix is present in one of the FIBs of the various agents of the service grid.
According to an embodiment of the present invention, step S430 may be further split, including sub-steps S4310, S4320 and S4330.
Specifically, at sub-step S4310, when none of the agents in the service grid has the longest prefix of the levels of prefixes, flooding is performed throughout the service grid, while each agent in the service grid transmits a copy of the request packet to the client to record in the SBF of each agent whether a route for successfully retrieving the request packet consistent with the number of all possible paths exists in the corresponding FIB. For example, by setting the corresponding bit array position to 1 according to the hash value, the routes of successful retrieval request packets, which are consistent with the number of all possible paths, are recorded in the SBF of each agent to exist in the FIB of the corresponding SBF
At sub-step S4320, if one of the levels of prefixes is found to exist in its corresponding FIB in the SBF of one of the agents of the service grid, the service request is forwarded to the service represented by the agent, and a priority flag is made in the SBF of the agent to indicate the priority of forwarding the service request by the agent in the forwarding rules. Where the priority of agents whose longest prefixes are found in their corresponding FIBs in their SBF is high and gradually decreases as the number of prefix components decreases.
At sub-step S4330, if one of the prefixes is not found to exist in its corresponding FIB in the SBF of any agent of the service grid, stopping the lookup process when the number of prefix components is zero, and recording in the SBF of each agent of the service grid, by setting the corresponding bit array position to 0, that no routing information for the service request exists in its corresponding FIB.
Continuing with the example of the embodiment described above in which client A wants to obtain content/A/B/C/D/0 l.avi/v1, a longest prefix match (LPM: longest prefix matching) is first performed on the packet's name in order to find the available information in the proxy's SBF. In this special case, no agent contains valuable information in its SBF, and the packet/A/B/C/D/0 l.avi/v1 will initially flood the entire network when it arrives at service B2. The proxy may then transmit multiple copies of the requested content to client a, leaving route-related information in the corresponding SBF consistent with the number of multiple paths for successful retrieval of the requested content. This operation is repeated along the reverse path in each proxy to client a. One possible scenario is represented as follows: information about the presence of/A/B/C/D/0 l.avi/v1 will be recorded in the SBF of each agent within the grid.
If relevant information is found in the SBF of an agent in the service grid (e.g., there is a certain level of prefix in its corresponding FIB), the service request is forwarded to the service represented by that agent, and a priority flag is made in the agent's SBF, indicating the priority in forwarding rules for forwarding such service request by that agent. It should be understood here that the priority of agents whose longest prefixes are found in their corresponding FIBs in their SBFs is high, and that the priority gradually decreases as the number of prefix components decreases. For example, the priority of the agent whose longest prefix/A/B/C/D/0 l.avi/v1 is found in its SBF is high, and the priority of the agent whose prefix/A/B/C/D/0 l.avi,/A/B/C,/A/B,/A is found in its corresponding FIB is reduced step by step.
If no relevant prefix information exists in the corresponding FIB of any agent in the service grid, including obtaining new prefix information by deleting the last component of the received name, stopping the searching process when the number of prefix components is zero, and recording the routing information that no service request exists in the corresponding FIB of each agent in the service grid by setting the corresponding bit array position to 0.
In step S440, FIB entries are created in the service grid for the requested data packets based on the priority flags made in the SBF of the agents and/or whether there is routing information for the service request in its corresponding FIB recorded in the SBF of each agent of the service grid.
According to the CDSRM disclosed by the disclosure, the proxy performs service route forwarding by searching the route forwarding rule in the FIB, so that flooding operation is avoided as much as possible when searching each time, and communication overhead is reduced. Wherein the routing cost is related to the number of name components provided by the SBF.
In addition, when there is a new service to be added to the service grid, the method 400A further includes a pre-step, and fig. 4B shows a schematic flowchart 400B of a content-driven-based service grid routing method according to an exemplary embodiment of the present disclosure.
As shown in fig. 4B, when there is a new service to be added to the service grid, the service gateway registers the new service to the service grid at step S401. According to a preferred embodiment of the invention, the service gateway registers the new service in the service grid by means of prefix broadcasting.
At step S402, the service instance name of the new service is interacted with the prefix naming entity to verify whether its name prefix meets the naming convention of the data naming network.
If the name prefix meets the naming specification of the data naming network, step S403 is performed, otherwise, the service instance name of the new service needs to be corrected and then verified.
Similar to the previous verification regarding service requests, the service gateway first interacts information such as the port, name, network address, etc. of the new service with the prefix naming entity to verify whether its name prefix meets the naming specifications of the data naming network, and sends the verification result back to the client. Wherein in case the verification result is verification failure, the verification result further includes a failure cause, so that in case the verification failure, the service instance name of the update service can be updated to re-verify.
At step S403, when the name prefix meets the naming convention, the name prefix of the service instance name of the new service is recorded in the FIB of the service gateway.
At step S404, the name prefix of the service instance name of the new service is advertised in the service grid to the respective agents.
At step S405, each agent records the name prefix of the service instance name of the new service in its FIB.
In the service grid, the related information of the service instance can dynamically change along with operations such as creation, deletion and the like of the container, and the corresponding name needs to be adjusted and updated. It is therefore necessary to update the information in the FIB about the individual services to avoid erroneous forwarding decisions due to outdated information.
In embodiments of the present application, the CDSRM updates information in the FIB in two ways, avoiding erroneous forwarding decisions. One way is to implement a least recently used replacement policy for FIB associated with each agent in the service grid, deleting FIB entries of agents when their forwarding routing rules trigger zero for a period of time, narrowing down the acceptable set of routes. Another way is to enable a temporary retransmission mechanism where retransmissions are treated in our routing mechanism as erroneous forwarding signals made in the past, in which case data packets containing the service request content would be forwarded to the service represented by the low priority agent, where the corresponding hash function and bit would be set to 0 in the SBF of the previous high priority agent to indicate that the FIB entry is no longer present in its FIB. This approach allows service routing to explore new paths when an error or old route is invalid.
According to an exemplary embodiment of the present application, there are two clients A, B sending requests to the service grid, assuming that client B wants to obtain content obtained by client a after a period of time during which the service instance changes, the requested content can only be obtained from the service represented by another agent, and in the FIB entry of this agent, the entry is deleted because it is determined that the call was zero during this period of time. If the SBF of the agent and the agent with low priority has priority information of the request content in the service grid, since the bit in the SBF is set to 0, the CDSRM will only forward the data packet to the agent with low priority, i.e. make a wrong decision, and then the client B will retransmit the same service request since no response is received, when the CDSRM receives the retransmission at this time, the data packet of the service request will be forwarded from the low priority agent to the agent with next higher priority before, and the next hop is routed according to the routing information of the service request in its corresponding FIB recorded in the SBF of the agent with high priority before, so as to direct the retransmitted data packet to the correct service instance, and at the same time, re-create the FIB entry for the requested data packet. It should be understood that in SBF, each content corresponds to a number of cells, each cell having a value of 0 or 1. When the related information of a certain content no longer needs to be stored, the corresponding cell can be zeroed, i.e. the value of the cell is set to 0. This process is referred to as "erasure," meaning that the cell is no longer associated with any content. Therefore, when the content/a/B/C/D/0 l.avi/v1 routing information is over-time, the corresponding cells in the proxy SBF will be erased, thereby ensuring only the latest information in the routing table, thereby saving space and improving query efficiency.
According to an embodiment of the present application, when an agent fails, the SBF associated with the agent is reset, stopping forwarding packets through the agent. At this time, the retransmission mechanism is triggered, and the proxy searches for an alternative path to forward the data packet, thereby ensuring the high efficiency of data packet transmission. In contrast, in the event of agent restoration, the SBF associated with the agent will be updated, i.e., the SBF will set this agent service route to "1" to force the use of the agent as a primary or additional path. Also, since the SBF may contain some outdated information, after a certain time, the proxy will use the insert and delete mechanism to clear the SBF, thereby preserving the valid information associated with the proxy service route. Based on this, high availability and performance of the service mesh agent network can be guaranteed, and the impact of outdated information on the network is minimized.
The content-driven service grid routing method provided by the application adopts a full-distributed service grid routing mechanism to realize content-driven routing forwarding, does not need an IP-based routing protocol as a backup mechanism, is suitable for data transmission of a large-scale distributed system, and has good expandability and adaptability. Because the filter can accurately predict the availability of the route forwarding path, the stable bloom filter can be used for rapidly determining the optimal route forwarding path, and the route forwarding efficiency is high. Meanwhile, the hierarchical naming structure of the data naming network provides better flexibility and expandability, and forwarding information base of each agent in the service grid can be dynamically updated to adapt to the change of network topology and the change of routing condition. Therefore, the service grid routing method based on the content driving provides a more efficient and reliable communication mode between micro services, and can better adapt to the requirements of a distributed system.
Some embodiments of the present disclosure also provide an electronic device. Fig. 5 illustrates a block diagram of some embodiments of the electronic device 5 of the present disclosure. The electronic device may be used to implement a method according to any of the embodiments of the present disclosure.
For example, in some embodiments, the electronic device 5 may be various types of devices, and may include, for example, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. For example, the electronic device 5 may comprise a display panel for displaying data and/or execution results utilized in the scheme according to the present disclosure. For example, the display panel may be various shapes such as a rectangular panel, an oval panel, a polygonal panel, or the like. In addition, the display panel may be not only a planar panel but also a curved panel or even a spherical panel.
As shown in fig. 5, the electronic apparatus 5 of this embodiment includes: a memory 51 and a processor 52 coupled to the memory 51. It should be noted that the components of the electronic device 5 shown in fig. 5 are only exemplary and not limiting, and that the electronic device 5 may also have other components according to practical application needs. The processor 52 may control other components in the electronic device 5 to perform the desired functions.
In some embodiments, memory 51 is used to store one or more computer readable instructions. Processor 52 is configured to execute computer readable instructions that when executed by processor 52 implement a method in accordance with any of the embodiments described above. The specific implementation of the steps of the method and the related explanation can be referred to the above embodiments, and the details are not repeated here.
For example, the processor 52 and the memory 51 may communicate with each other directly or indirectly. For example, the processor 52 and the memory 51 may communicate via a network. The network may include a wireless network, a wired network, and/or any combination of wireless and wired networks. The processor 52 and the memory 51 may also communicate with each other via a system bus, which is not limited by the present disclosure.
For example, the processor 52 may be embodied as various suitable processors, processing means, etc., such as a Central Processing Unit (CPU), a graphics processor (GPU: graphics Processing Unit), a Network Processor (NP), etc.; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The Central Processing Unit (CPU) can be an X86 or ARM architecture, etc. For example, the memory 51 may include any combination of various forms of computer-readable storage media, such as volatile memory and/or nonvolatile memory. The memory 51 may include, for example, a system memory storing, for example, an operating system, application programs, boot Loader (Boot Loader), database, and other programs. Various applications and various data, etc. may also be stored in the storage medium.
In addition, according to some embodiments of the present disclosure, various operations/processes according to the present disclosure, when implemented by software and/or firmware, may be installed from a storage medium or a network to a computer system having a dedicated hardware structure, such as the computer system 600 shown in fig. 6, which is capable of performing various functions including functions such as those described previously, and the like, when various programs are installed. FIG. 6 illustrates a block diagram of an example structure of a computer system that may be employed in accordance with an embodiment of the present disclosure.
In fig. 6, a Central Processing Unit (CPU) 601 executes various processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 to a Random Access Memory (RAM) 603. In the RAM 603, data required when the CPU 601 executes various processes and the like is also stored as needed. The central processing unit is merely exemplary, and it may also be other types of processors, such as the various processors described previously. The ROM 602, RAM 603, and storage section 608 may be various forms of computer-readable storage media, as described below. It should be noted that although ROM 602, RAM 603, and storage section 608 are shown in FIG. 6 separately, one or more of them may be combined or located in the same or different memories or storage modules.
The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output interface 605 is also connected to the bus 604.
The following components are connected to the input/output interface 605: an input portion 606 such as a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), a speaker, a vibrator, etc.; storage portion 608, including hard disk, tape, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, and the like. The communication section 609 allows communication processing to be performed via a network such as the internet. It will be readily appreciated that while the various devices or modules in computer system 600 shown in FIG. 6 are shown as communicating via bus 604, they may also communicate via a network or other means, wherein the network may include a wireless network, a wired network, and/or any combination of wireless and wired networks.
The drive 610 is also connected to the input/output interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In the case of implementing the above-described series of processes by software, a program constituting the software may be installed from a network such as the internet or a storage medium such as the removable medium 611.
The processes described above with reference to flowcharts may be implemented as computer software programs according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. When executed by the CPU 601, the computer program performs the functions defined above in the methods of the embodiments of the present disclosure.
It should be noted that in the context of this disclosure, a computer-readable medium can be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
In some embodiments, there is also provided a content-driven based service grid routing apparatus comprising means for performing the steps of the method of any of the embodiments described above.
In some embodiments, there is also provided a computer program comprising: instructions that, when executed by a processor, cause the processor to perform the method of any of the embodiments described above. For example, the instructions may be embodied as computer program code.
In an embodiment of the present disclosure, computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer, for example, through the internet using an internet service provider.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules, components or units referred to in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a module, component or unit does not in some cases constitute a limitation of the module, component or unit itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The above description is merely illustrative of some embodiments of the present disclosure and of the principles of the technology applied. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the disclosure may be practiced without these specific details. In other instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the disclosure. The scope of the present disclosure is defined by the appended claims.

Claims (13)

1. A service grid routing method, comprising:
The service gateway hashes the name of a data packet of a service request from a client, obtains each level of prefix by gradually eliminating the last component of the name of the data packet, and sets the corresponding bit array position in a stable bloom filter SBF of the service gateway as a first value according to the hash value so as to record that all possibly matched name prefixes possibly exist in a forwarding information base FIB maintained by the service gateway in the SBF of the service gateway;
searching the SBF step by step in each agent of the service grid to determine whether the prefixes of the various levels exist in one of the FIBs of the agents of the service grid; and
FIB entries are created in the service grid for the requested data packets based on the results of the progressive searches in the various agents of the service grid.
2. The method of claim 1, wherein progressively looking up SBFs in respective agents of a service grid to determine whether the respective levels of prefixes are present in one of the FIBs of the agents of the service grid comprises:
flooding in the whole service grid when each agent in the service grid does not have the longest prefix in each level of prefixes, and simultaneously each agent in the service grid transmits a copy of the request data packet to the client so as to record whether the route of the successful retrieval request data packet consistent with the number of all possible paths exists in the corresponding FIB in the stable bloom filter of each agent;
Forwarding a service request to a service represented by an agent if one of the prefixes is found in its corresponding FIB in the SBF of the service grid, and prioritizing in the SBF of the agent to indicate the priority of the agent forwarding the service request in forwarding rules, wherein the priority of the agent for which the longest prefix is found in its corresponding FIB in its SBF is high and decreases as the number of prefix components decreases; and
if one of the prefixes exists in the corresponding FIB is not found in the SBF of any agent of the service grid, stopping the searching process when the number of the prefix components is zero, and recording the routing information of the service request which does not exist in the corresponding FIB in the SBF of each agent of the service grid by setting the corresponding bit array position to a second value which is different from the first value.
3. The method of claim 2, wherein creating FIB entries for the requested data packets in the service grid based on the results of the progressive searches in the respective agents of the service grid comprises:
FIB entries are created in the service grid for the requested data packets based on priority flags made in the SBF of the agents and/or whether there is routing information for the service request in its corresponding FIB recorded in the SBF of each agent of the service grid.
4. A method according to any one of claims 1-3, further comprising:
when a new service is to be added into the service grid, the service gateway registers the new service into the service grid;
interacting the service instance name of the new service with the prefix naming entity to verify whether the name prefix accords with the naming specification of the data naming network;
recording the name prefix of the service instance name of the new service in the FIB of the service gateway under the condition that the name prefix of the service instance name of the new service accords with the naming specification of the data naming network;
advertising a name prefix of a service instance name of the new service to each agent in a service grid;
each agent records the name prefix of the service instance name of the new service in its own FIB.
5. The method of claim 4, further comprising:
and after verifying whether the name prefix of the service instance name of the new service accords with the naming specification of the data naming network, returning a verification result to the client, wherein the verification result also comprises a failure reason under the condition that the verification result is verification failure.
6. The method of claim 1, further comprising:
when a service request from a client is received, the service gateway interacts a data packet of the service request with a prefix naming entity to verify whether the name prefix accords with the naming specification of the data naming network;
And returning a verification result to the client, wherein the verification result further comprises a failure reason when the verification result is verification failure, and the client resends the data packet of the service request according to the failure reason in response to receiving the verification result of verification failure.
7. A method according to claim 3, further comprising:
deleting the FIB entry of the agent when the forwarding routing rule in the FIB entry of the agent triggers zero within a period of time; and
the corresponding bit array position is set in the agent's SBF to a second value different from the first value to indicate that the FIB entry is no longer present in its FIB.
8. The method of claim 7, further comprising:
when the SBF of the high priority agent and the SBF of the low priority agent which delete the FIB entries have priority information of the service request, forwarding a data packet of the service request to the low priority agent because the corresponding bit array position in the SBF of the high priority agent is set to a second value;
in response to receiving a service request retransmitted by a client under the condition that a response is not received, forwarding a data packet of the service request from a low-priority agent to an agent with a second highest priority recorded in an SBF (service flow rate);
And carrying out next-hop routing according to the routing information of the service request in the corresponding FIB recorded in the SBF of the next-highest priority proxy so as to direct the retransmitted data packet to the correct service instance, and simultaneously, re-creating the FIB entry for the requested data packet.
9. The method of claim 1, further comprising:
when an agent fails, the SBF associated with the agent is reset, stopping forwarding data packets through the agent; and is also provided with
The data packet is forwarded through the alternate path.
10. The method of claim 9, further comprising:
in the event of a failed agent recovery, the SBF is updated by setting the corresponding bit array position in the SBF associated with the agent to a first value and forcing the agent to be used as a primary or additional path.
11. An electronic device, comprising:
one or more processors, and
a memory coupled to the one or more processors, the memory storing computer-readable program instructions that, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-10.
12. A service grid routing apparatus comprising means for performing the steps of the method according to any of claims 1-10.
13. A non-transitory computer readable medium having instructions stored thereon for execution by a processor to perform the steps of the method according to any of claims 1-10.
CN202311088387.6A 2023-08-25 2023-08-25 Service grid routing method, device, electronic equipment and medium Pending CN116996437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311088387.6A CN116996437A (en) 2023-08-25 2023-08-25 Service grid routing method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311088387.6A CN116996437A (en) 2023-08-25 2023-08-25 Service grid routing method, device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN116996437A true CN116996437A (en) 2023-11-03

Family

ID=88532094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311088387.6A Pending CN116996437A (en) 2023-08-25 2023-08-25 Service grid routing method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116996437A (en)

Similar Documents

Publication Publication Date Title
CN110708393B (en) Method, device and system for transmitting data
JP7325506B2 (en) Business processing method, device, electronic device and computer program based on blockchain system
US9178829B2 (en) System for communication in a tactical network
US9679156B2 (en) Database virtualization
US8935560B2 (en) System and method of file locking in a network file system federated namespace
US20010014917A1 (en) Position identifier management apparatus and method, mobile computer, and position identifier processing method
WO2023202276A1 (en) Domain name resolution request processing method and apparatus, and device, medium and program product
CN110601981A (en) Service routing method, service provider cloud domain and service calling cloud domain
US11140072B2 (en) Transparent satellite routing system and method
US20140337471A1 (en) Migration assist system and migration assist method
CN111124299A (en) Data storage management method, device, equipment, system and storage medium
US20220200952A1 (en) Network address translation between networks
US20220292068A1 (en) Method, electronic device, and computer program product for storing and searching for data
US20220138220A1 (en) Dedicated replication channels for replicating records between regions
US11662928B1 (en) Snapshot management across cloud provider network extension security boundaries
WO2012136091A2 (en) Data migration method and system in peer-to-peer network
CN116996437A (en) Service grid routing method, device, electronic equipment and medium
US11323355B1 (en) Partition abstraction in distributed computing systems
WO2019214208A1 (en) Data processing method and apparatus in instant messaging system, medium, and computing device
CN114584545A (en) Data management method, device, system, storage medium and electronic equipment
CN114629951A (en) Address service switching method and device, computer equipment and storage medium
US8185911B2 (en) System and method for simplification of data structure in wireless communications
US7506032B1 (en) Transfer of arbitrary size messages over memory based interconnects
WO2024055741A1 (en) Method and apparatus for establishing network connection, electronic device and storage medium
US11601497B1 (en) Seamless reconfiguration of distributed stateful network functions

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