Grid data surface edge vehicle upgrading method and device
During the Sidecar upgrade process, the first Sidecar stops acquiring and processing data, and then passes the information to the second Sidecar to take over the connection. This solves the problem of business interruption for user applications during Sidecar upgrades and achieves imperceptible upgrades and stability. promote.
Patent Information
- Application Number
- CN202310224466.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-09
- Publication Date
- 2024-09-17
AI Technical Summary
During the data plane sidecar upgrade process of existing service mesh technology, user application services are not completely insensitive, which may lead to business interruption and increase in network traffic, especially during the process of TCP connection disconnection and re-establishment.
When the sidecar is upgraded, the first sidecar stops obtaining the business data of the transport layer data flow. After confirming that the data has been completely processed, it sends the business information to the second sidecar to take over the FD connection, avoiding re-authentication, ensuring that data is not lost and reducing network traffic. .
It achieves the imperceptibility of user application services during the Sidecar upgrade process, avoids data loss and sudden increase in network traffic, and improves system stability and performance.
Smart Images

Figure CN118659968A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a method and device for upgrading a grid data plane sidecar. Background Art
[0002] Existing service mesh technology separates the service governance capabilities of the data plane and user applications into different processes, and service governance can be upgraded separately from user applications. However, during the upgrade of the data plane proxy sidecar, the user application business is not completely imperceptible. Since the data plane proxy sidecar needs to pull a new image and restart the process during the upgrade process, under the existing technology, the data plane proxy sidecar will disconnect the socket connection with the user application, which may cause business interruption of the user application.
[0003] In the existing Sidecar upgrade solution, the client sends a request to the modular open smart network (MOSN) device, and the MOSN sends the TCP1 file descriptor (FD) and the connection status data to the New MOSN. The New MOSN accepts the FD and request data and creates a new Conection structure. At this time, the New MOSN has a copy of TCP1. Then the New MOSN selects a new Server, establishes a TCP3 connection, forwards the request to the Server, and the Server replies with the first response message to the New MOSN. The NewMOSN then replies with the second response message to the client through the copy of TCP1 passed by the MOSN.
[0004] In the existing Sidecar upgrade solution, the connection between Sidecar and the backend server is newly established. In this way, even if the client FD is not disconnected, it may still have an impact on the client if the client is required to disconnect because the session with the server no longer exists. Summary of the invention
[0005] The embodiments of the present application provide a grid data plane sidecar upgrade method and device, which are used to avoid data loss during the sidecar upgrade without affecting the services of user applications.
[0006] In the first aspect, an embodiment of the present application provides a grid data plane sidecar upgrade method, which is applied to a sidecar control system, the sidecar control system including a first sidecar and a second sidecar, the method including: the first sidecar stops obtaining business data of a transport layer data stream; the first sidecar determines that the obtained business data has been completely processed; the first sidecar sends business information to the second sidecar, the business information including business data offset information, connection information, filter information and routing information of the business processed by the first sidecar, so that the second sidecar takes over the FD connection according to the business information and obtains the business data of the transport layer data stream.
[0007] In this possible implementation, when the first sidecar is upgraded to the second sidecar, the first sidecar will transmit the business information to the second sidecar, and the second sidecar can directly connect based on the business information without reauthenticating the connection, thus avoiding the impact on user business. At the same time, the first sidecar will first determine that the acquired business data has been fully processed to avoid data loss during the sidecar upgrade.
[0008] In a possible implementation, before the first sidecar stops acquiring the service data of the transport layer data stream, the method further includes: the first sidecar stores the acquired service data in an internal storage space; and the first sidecar generates an application layer message based on the service data.
[0009] In one possible implementation, the first sidecar stops obtaining business data of the transport layer data stream, including: the first sidecar stops obtaining business data of the transport layer data stream from the network cache space; after the first sidecar generates an application layer message based on the business data, the method further includes: the first sidecar deletes target business data, and the target business data is the business data corresponding to the application layer message in the network cache space.
[0010] In this possible implementation, the first sidecar generates an application layer message based on the business data and deletes the corresponding target business data. On the one hand, this reduces the space occupied by the network cache space and saves network resources; on the other hand, it increases the method for determining whether the business data in the network cache space is used.
[0011] In a possible implementation, before the first sidecar stops obtaining the service data of the transport layer data flow from the network cache space, the method further includes: the first sidecar increases the capacity of the network cache space, and the cache space capacity is used to store the service data of the transport layer data flow.
[0012] In this possible implementation, since the first sidecar stops acquiring business data of the transport layer data stream, the network cache space capacity is increased to avoid network traffic congestion.
[0013] In one possible implementation, after the first sidecar stops acquiring business data of the transport layer data stream and before the first sidecar determines that the acquired business data has been completely processed, the method further includes: the first sidecar generates an application layer message based on the remaining business data in the internal storage space.
[0014] In one possible implementation, after the first sidecar stops acquiring business data of the transport layer data stream and before the first sidecar determines that the acquired business data has been completely processed, the above method also includes: when the remaining business data in the internal storage space is insufficient to generate a complete application layer message, the first sidecar acquires supplementary business data from the network cache space; the first sidecar generates an application layer message based on the supplementary business data and the remaining business data.
[0015] In this possible implementation, when the remaining business data of the first sidecar is insufficient to generate a complete application layer message, the first sidecar will obtain supplementary business data from the network cache space, thereby increasing the way in which the business data obtained by the first sidecar is completely processed.
[0016] In a possible implementation, the method further includes: the first sidecar receives an offline notification from the second sidecar, where the offline notification is used to trigger the first sidecar to go offline; and the first sidecar performs an offline operation.
[0017] In the second aspect, an embodiment of the present application provides a grid data plane sidecar upgrade method, which is applied to a sidecar control system, the sidecar control system includes a first sidecar and a second sidecar, the method includes: the second sidecar receives business information from the first sidecar, the business information includes business data offset information, connection information, filter information and routing information for business processing by the first sidecar; the second sidecar takes over the FD connection according to the business information; the second sidecar obtains the business data of the transport layer data flow according to the business information.
[0018] In this possible implementation, the second sidecar can be directly connected according to the service information without the need to re-authenticate the connection, thereby avoiding the impact on user services.
[0019] In a possible implementation, the method further includes: the second sidecar sends an offline notification to the first sidecar, where the offline notification is used to trigger the first sidecar to perform an offline operation.
[0020] In another possible implementation, the method further includes: the second sidecar restores the network cache space capacity increased by the first sidecar, and the cache space capacity is used to store business data of the target business flow.
[0021] In a third aspect, an embodiment of the present application provides a first sidecar, including: a processor and a memory. The processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the first sidecar to implement any one of the methods provided in the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a second sidecar, including: a processor and a memory. The processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the second sidecar to implement any one of the methods provided in the second aspect.
[0023] In a fifth aspect, an embodiment of the present application provides a chip, comprising: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute any one of the methods provided in the first aspect.
[0024] In a sixth aspect, an embodiment of the present application provides a chip, comprising: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to run the code instructions to execute any one of the methods provided in the second aspect.
[0025] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, in which at least one computer program instruction is stored. The computer program instruction is loaded and executed by a processor to implement any one of the methods provided in the first aspect above.
[0026] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, in which at least one computer program instruction is stored. The computer program instruction is loaded and executed by a processor to implement any one of the methods provided in the second aspect above.
[0027] In a ninth aspect, an embodiment of the present application provides a computer program product, comprising computer execution instructions, which, when executed on a computer, enable the computer to execute any one of the methods provided in the first aspect.
[0028] In the tenth aspect, an embodiment of the present application provides a computer program product, including computer execution instructions, which, when executed on a computer, enable the computer to execute any one of the methods provided in the second aspect.
[0029] The technical effects brought about by any implementation method in the third aspect to the tenth aspect can be referred to the technical effects brought about by the corresponding implementation methods in the first aspect and the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of a sidecar upgrade method.
[0031] Figure 2 A schematic diagram of another sidecar upgrade method;
[0032] Figure 3 A schematic diagram of a flow chart of a grid data plane sidecar upgrade method provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of a flow chart of another method for upgrading a sidecar of a grid data plane provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of the structure of a first sidecar provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of the structure of a second sidecar provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of the structure of another first sidecar provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of the structure of another second sidecar provided in an embodiment of the present application;
[0038] Fig. 9 A schematic diagram of the structure of a sidecar management system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In the description of this application, unless otherwise specified, " / " indicates that the objects associated with each other are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship between associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
[0040] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0041] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0042] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0043] It is understood that the "embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the various embodiments in the entire specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It is understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0044] It can be understood that some optional features in the embodiments of the present application may be implemented independently in certain scenarios without relying on other features, such as the solution on which they are currently based, to solve corresponding technical problems and achieve corresponding effects, or may be combined with other features according to needs in certain scenarios. Accordingly, the devices provided in the embodiments of the present application may also realize these features or functions accordingly, which will not be elaborated here.
[0045] In this application, unless otherwise specified, the same or similar parts between the various embodiments can refer to each other. In this application, if there is no special description or logical conflict between the various embodiments, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and different embodiments can be combined to form new embodiments according to their inherent logical relationships. The following implementation methods of this application do not constitute a limitation on the scope of protection of this application.
[0046] In order to facilitate understanding of the technical solutions of the embodiments of the present application, a brief introduction to the relevant technologies of the embodiments of the present application is given below:
[0047] 1. Service mesh technology.
[0048] In the distributed architecture of microservices, service mesh technology can separate the non-functional service governance logic in distributed applications from the business process and inject it into the sidecar process outside the process, providing service capabilities such as connection, security, flow control, grayscale release, and observation between services in a non-invasive manner, thereby achieving lightweight business and infrastructure-based service governance.
[0049] Existing service mesh technology separates the service governance capabilities of the data plane and user applications into different processes, and service governance can be upgraded separately from user applications. However, during the upgrade of the data plane proxy Sidecar, the business of the user application is not completely imperceptible. Since the data plane proxy Sidecar needs to pull a new image and restart the process during the upgrade process, under the existing technology, the data plane proxy Sidecar will disconnect the socket connection with the user application, which may cause business interruption of the user application. Especially for Hypertext Transfer Protocol (HTTP) 2.0 or private long connection protocols, disconnection will cause business interruption. Although the user application can reconnect, this requires corresponding modification of the user application.
[0050] On the other hand, in the scenario where Sidecar acts as an application layer (L7) gateway, a data plane Sidecar will connect to a large number of clients or servers at the same time. Once the update process of the data plane Sidecar is completed, the data plane Sidecar needs to re-establish the transmission control protocol (TCP) connection with a large number of clients or servers at the same time. The re-establishment process is very slow and will cause a large increase in instantaneous network traffic. If not handled properly, it may cause a cascading avalanche problem of the data plane Sidecar.
[0051] like Figure 1As shown, the client's Sidecar1 needs to be upgraded to Sidecar3, and the server's Sidecar2 needs to be upgraded to Sidecar4. When Sidecar1 and Sidecar2 are upgraded separately, the client's connection to Sidecar will be disconnected twice if the connection cannot be maintained. B' is the connection between Sidecar3 and Sidecar2. When Sidecar2 is upgraded to Sidecar4, Sidecar3 is disconnected from Sidecar2, triggering the downstream client's connection to be disconnected from Sidecar3 again. The server's connection to Sidecar will be disconnected once. After a Sidecar upgrade is restarted, the TCP three-way handshake messages of two client connections will be sent on the network, causing a sudden increase in the system's network traffic. In addition, for long-connected servers, disconnection will also cause the business side to be unable to continue accessing, resulting in client disconnection.
[0052] like Figure 2 As shown in the figure, in the existing Sidecar upgrade solution, the client sends a request to the modular open smart network (MOSN) device. MOSN sends the file descriptor (FD) of TCP1 and the connection status data to the New MOSN through the domain socket. The New MOSN accepts the FD and request data and then creates a new Conection structure, and transmits the Connection ID of the Connection to the MOSN. At this time, the New MOSN has a copy of TCP1. Then the New MOSN selects a new Server, establishes a TCP3 connection, forwards the request to the Server, and the Server replies with the first response message to the New MOSN. The New MOSN then replies with the second response message to the client through the copy of TCP1 transmitted by the MOSN.
[0053] In the existing Sidecar upgrade solution, the connection between Sidecar and the backend server is newly established. Even if the client FD is not disconnected, it may still affect the client if the client must also disconnect because the session with the server no longer exists. In addition, only one Sidecar is upgraded. For scenarios where Sidecars need to be deployed on both ends and upgraded at the same time, there is still a network pressure problem caused by a large number of reconnections due to disconnections during the upgrade.
[0054] An embodiment of the present application provides a grid data plane sidecar upgrade method, which is applied to a sidecar control system. The sidecar control system includes a first sidecar and a second sidecar. The first sidecar obtains business data of a transport layer data stream from a network cache space and stores it in an internal storage space, and then generates an application layer message based on the transport layer data stream. When the first sidecar is triggered to be updated to the second sidecar, the first sidecar stops obtaining business data of the transport layer data stream. After determining that the obtained business data has been completely processed, the first sidecar sends business information to the second sidecar. The business information includes connection information, filter information and routing information for business processing by the first sidecar.
[0055] In the embodiment of the present application, the data plane proxy Sidecar can be divided into a Pod injection proxy and a node-level proxy. The grid data plane sidecar upgrade method provided in the embodiment of the present application is applicable to both the Pod injection proxy and the node-level proxy.
[0056] It is understandable that in the embodiments of the present application, the execution subject may execute some or all of the steps in the embodiments of the present application, and these steps or operations are only examples. The embodiments of the present application may also execute other operations or variations of various operations. In addition, the various steps may be executed in different orders presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application need to be executed.
[0057] It should be noted that the message names between the devices or the names of the parameters in the messages in the following embodiments of the present application are only examples, and other names may be used in the specific implementation, and the embodiments of the present application do not specifically limit this.
[0058] like Figure 3 As shown, a grid data plane sidecar upgrade method provided by an embodiment of the present application is applied to a sidecar control system, the sidecar control system includes a first sidecar and a second sidecar, and the method includes the following steps:
[0059] 301. The first sidecar obtains business data.
[0060] The first sidecar obtains the service data of the transport layer data stream from the downstream network protocol stack cache space, and then stores the service data in the internal storage space.
[0061] 302. The first sidecar generates an application layer message based on the business data.
[0062] The first sidecar decodes the service data of the transport layer (L4) data stream through a decoder, and generates a corresponding application layer (L7) message based on the decoded service data. The application layer message is then sent to the upstream device.
[0063] 303. The first sidecar deletes the target business data.
[0064] The first sidecar deletes the target business data, which is the business data corresponding to the application layer message in the network protocol stack cache space (network cache space).
[0065] In an embodiment of the present application, the network protocol stack cache space may be one or more ring buffers / queue buffers (ringr buffer), which are used to store L4 data streams (i.e., external L4 files). After the first sidecar obtains the target business data from the ring buffer, the L4 processor of the first sidecar records the unprocessed offset of the data stream corresponding to the newly obtained target business data. After the first sidecar generates a corresponding application layer (L7) message according to the target business data and sends it to an upstream device, the first sidecar updates the processed L4 data stream offset in the ring buffer and deletes the target business data that has been determined to be processed.
[0066] The above steps 301 to 303 are a method for the first sidecar to process the business data of the transport layer data flow before triggering the upgrade of the first sidecar.
[0067] In the embodiment of the present application, through the above steps 301 to 303, the sidecar control system can determine the undetermined offset of the network protocol stack cache space, that is, determine the unprocessed part of the L4 message file in the network protocol stack cache space. This ensures that after the first sidecar is updated to the second sidecar, the previous work is not affected.
[0068] After the first sidecar is triggered to be updated to the second sidecar, the first sidecar and the second sidecar perform the following steps:
[0069] 304. The first sidecar stops obtaining service data of the transport layer data stream.
[0070] After the first sidecar is triggered to be updated to the second sidecar, the first sidecar stops obtaining the service data of the transport layer data flow from the network protocol stack cache space.
[0071] like Figure 4As shown, in a possible implementation, the first sidecar also dynamically increases the ringr buffer, thereby increasing the size of the network protocol stack cache space (network cache space capacity), so that the user application can maintain a normal message sending speed and avoid information congestion.
[0072] In one possible implementation, when the amount of downstream messages is large, the first sidecar can use the TCP congestion algorithm to slow down the sending speed of the downstream client.
[0073] In one possible implementation, the first sidecar also obtains other data. After the first sidecar stops obtaining the business data of the transport layer data stream, the first sidecar prioritizes sending the business data, thereby processing the obtained business data as soon as possible.
[0074] 305. The first sidecar determines that the acquired business data has been completely processed.
[0075] After determining that it is in the upgrade state, the decoder of the first sidecar enters the upgrade state, generates an application layer message according to the remaining business data stored internally in the first sidecar, and then sends the application layer message to the upstream device.
[0076] After the first sidecar generates an application layer message based on the remaining business data and then sends the application layer message to the upstream device, the first sidecar can determine that there is no unprocessed business data in the internal storage space and the acquired business data has been completely processed.
[0077] like Figure 4 As shown, in a possible implementation, when the remaining business data of the first sidecar is insufficient to generate a complete application layer message, the first sidecar will also obtain supplementary business data, and then generate an application layer message based on the supplementary business data and the remaining business data, and then send the application layer message to the upstream device.
[0078] Specifically, when the decoder of the first sidecar determines that the remaining business data is insufficient to generate a complete application layer message, and such application message contains the size of the area of each message itself, the decoder sends a feedback message to the L4 processor of the first sidecar, where the feedback message can indicate the size of the supplementary business data to be obtained, and then the L4 processor of the first sidecar obtains the supplementary business data of the specified size according to the feedback message. After receiving the supplementary business data, the decoder can generate an application layer message based on the supplementary business data and the remaining business data, and then send the application layer message to the upstream device.
[0079] It can be understood that after the first sidecar sends the application layer message to the upstream device, the first sidecar will update the offset of the external L4 file in the network protocol stack cache space, thereby deleting the business data that has been determined to be processed in the network protocol stack cache space.
[0080] 306. The first sidecar sends service information to the second sidecar.
[0081] The first sidecar sends business information to the second sidecar, where the business information includes business data offset information, connection information, filter information, and routing information for business processing by the first sidecar.
[0082] The above-mentioned service data offset information includes the offset information of the unprocessed byte stream in the external L4 file and the offset information of the confirmed message.
[0083] The above connection information may include the FD number of the first sidecar, the certificate information of the first sidecar, the certificate-related user information, the request information for the first sidecar to establish a connection with the client and / or the server, the application protocol type information (such as http protocol and tcp protocol), the IP address of the first sidecar, and the source address of the first sidecar, the client and / or the server.
[0084] The above filter information may include IP address decoding information, header field modification information, and service data processing information.
[0085] The above routing information may include the IP address of the client and / or server, and the certificate information of the client and / or server.
[0086] It is understandable that the business information may include other information used by the second sidecar to perform business processing, which will not be described in detail here.
[0087] It can be understood that in the embodiment of the present application, the purpose of the first sidecar sending business information to the second sidecar is that the second sidecar can implement the business originally processed by the first sidecar through the business information. Therefore, in one possible implementation method, the L4 processor of the first sidecar will transmit the relevant information of the created monitoring object and the connected object to the L4 processor of the second sidecar. And the L7 processor of the first sidecar transmits the relevant information of the created routing object and session object to the L7 processor of the second sidecar, and the first sidecar will also pass the unprocessed byte stream offset and the confirmed message offset in the saved L4 external file to the L4 processor of the second sidecar. The specific transmission method can be the above-mentioned method of sending business information. The above-mentioned monitoring objects, connected objects, routing objects and session objects can be clients and / or servers.
[0088] In the embodiment of the present application, there is no unprocessed business data in the internal storage space of the first sidecar, so there is no need to copy the cached byte stream in the decoder.
[0089] 307. The second sidecar takes over the FD connection based on the business information.
[0090] Based on the received business information, the second sidecar takes over the FD connection with the client and / or server according to the connection information, filter information, and routing information in the business information.
[0091] In one possible implementation, the L4 processor of the second sidecar rebuilds the connection with the listening object and the connected object based on the relevant information of the created listening object and the connected object transmitted by the L4 processor of the first sidecar; and the L7 processor of the second sidecar rebuilds the connection with the routing object and the session object based on the relevant information of the created routing object and the session object transmitted by the L7 processor of the first sidecar.
[0092] 308. The second sidecar obtains the service data of the transport layer data stream.
[0093] According to the received business information, the second sidecar starts to obtain the business data of the transport layer data stream. Specifically, after taking over the FD connection, the second sidecar obtains the business data of the transport layer data stream according to the business data offset information in the business information, that is, the second sidecar restarts to obtain the unprocessed byte stream in the external L4 file according to the business data offset information.
[0094] 309. The second sidecar sends an offline notification to the first sidecar.
[0095] The second sidecar sends a logoff notification to the first sidecar, and the logoff notification is used to trigger the first sidecar to log off. Accordingly, after the first sidecar receives the logoff notification, the first sidecar performs a logoff operation.
[0096] like Figure 4 As shown, in one possible implementation, the second sidecar also restores the network cache space capacity increased by the first sidecar, and the cache space capacity is used to store business data. It can be understood that this step is the reverse step of the first sidecar increasing the size of the network protocol stack cache space in the above step 304, thereby restoring the size of the network protocol stack cache space after the upgrade.
[0097] An embodiment of the present application provides a first sidecar 500. In the embodiment of the present application, the first sidecar 500 can be divided into functional modules according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0098] In the case of dividing each functional module into corresponding functional modules, Figure 5 A possible structural diagram of the first sidecar 500 involved in the above embodiment is shown. Figure 5 As shown, the first sidecar 500 includes:
[0099] The storage module 501 is used to store the acquired business data into the internal storage space; for example, executing step 301 in the above method embodiment.
[0100] The generating module 502 is used to generate an application layer message according to the service data, for example, by executing step 302 in the above method embodiment.
[0101] In a possible implementation, the generating module 502 includes:
[0102] The first generating unit 503 is configured to generate an application layer message according to the remaining service data in the internal storage space, for example, by executing step 305 in the above method embodiment.
[0103] In a possible implementation, the generating module 502 further includes:
[0104] The acquisition unit 504 is used to acquire the supplementary service data from the network cache space when the remaining service data in the internal storage space is insufficient to generate a complete application layer message; for example, execute step 305 in the above method embodiment.
[0105] The second generating unit 505 is configured to generate an application layer message according to the supplementary service data and the remaining service data, for example, by executing step 305 in the above method embodiment.
[0106] The deletion module 506 is used to delete the target service data, where the target service data is the service data corresponding to the application layer message in the network cache space. For example, step 303 in the above method embodiment is executed.
[0107] The increasing module 507 is used to increase the capacity of the network cache space, and the cache space capacity is used to store the service data of the transport layer data flow. For example, step 304 in the above method embodiment is performed.
[0108] The stop module 508 is used to stop acquiring the service data of the transport layer data stream; for example, executing step 304 in the above method embodiment.
[0109] The stop module 508 is specifically used for:
[0110] Stop acquiring the service data of the transport layer data stream from the network cache space; for example, execute step 304 in the above method embodiment.
[0111] The determination module 509 is used to determine whether the acquired business data has been completely processed; for example, executing step 305 in the above method embodiment.
[0112] The sending module 510 is used to send business information to the second sidecar, where the business information includes business data offset information, connection information, filter information, and routing information for business processing by the first sidecar, so that the second sidecar takes over the FD connection according to the business information and obtains the business data of the transport layer data stream. For example, step 306 in the above method embodiment is executed.
[0113] The receiving module 511 is used to receive an offline notification from the second sidecar, where the offline notification is used to trigger the first sidecar to go offline; for example, step 309 in the above method embodiment is executed.
[0114] The offline module 512 is used to perform offline operations, such as executing step 310 in the above method embodiment.
[0115] The modules of the first sidecar can also be used to perform other actions in the method embodiment. All relevant contents of the steps involved in the method embodiment can be referred to the functional description of the corresponding functional modules, which will not be repeated here.
[0116] An embodiment of the present application provides a second sidecar 600. In the embodiment of the present application, the second sidecar 600 can be divided into functional modules according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0117] In the case of dividing each functional module into corresponding functional modules, Figure 6 A possible structural diagram of the second sidecar 600 involved in the above embodiment is shown. Figure 6 As shown, the second sidecar 600 includes:
[0118] The receiving module 601 is used to receive business information from the first sidecar, where the business information includes business data offset information, connection information, filter information and routing information for business processing by the first sidecar; for example, execute step 306 in the above method embodiment.
[0119] The takeover module 602 is used to take over the FD connection according to the service information; for example, execute step 307 in the above method embodiment.
[0120] The acquisition module 603 is used to acquire the service data of the transport layer data stream according to the service information, for example, by executing step 308 in the above method embodiment.
[0121] The sending module 604 is used to send a logoff notification to the first sidecar, where the logoff notification is used to trigger the first sidecar to log off. For example, step 309 in the above method embodiment is performed.
[0122] The recovery module 605 is used to restore the increased network cache space capacity of the first sidecar, where the cache space capacity is used to store the service data of the target service flow. For example, step 309 in the above method embodiment is performed.
[0123] The modules of the second sidecar can also be used to perform other actions in the method embodiment. All relevant contents of the steps involved in the method embodiment can be referred to the functional description of the corresponding functional modules, which will not be repeated here.
[0124] Figure 7 It is a schematic diagram of a first sidecar structure provided in an embodiment of the present application. The first sidecar 700 may include one or more central processing units (CPU) 701 and a memory 705. The memory 705 stores one or more applications or data.
[0125] Among them, the memory 705 can be volatile storage or persistent storage. The program stored in the memory 705 may include one or more modules, each of which may include a series of instruction operations in the first sidecar. Furthermore, the central processor 701 can be configured to communicate with the memory 705 and execute a series of instruction operations in the memory 705 on the first sidecar 700.
[0126] The central processor 701 is used to execute the computer program in the memory 705, so that the first sidecar 700 is used to execute: the first sidecar stops obtaining the service data of the transport layer data stream; the first sidecar determines that the obtained service data has been completely processed; the first sidecar sends service information to the second sidecar, and the service information includes the service data offset information, connection information, filter information and routing information of the first sidecar for service processing, so that the second sidecar takes over the FD connection according to the service information and obtains the service data of the transport layer data stream. For specific implementation methods, please refer to Figure 3 Steps 301-309 in the illustrated embodiment are not described in detail here.
[0127] The first sidecar 700 may also include one or more power supplies 702, one or more wired or wireless network interfaces 703, one or more input and output interfaces 704, and / or one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0128] The first sidecar 700 may execute the aforementioned Figure 3 The operations performed by the first sidecar in the illustrated embodiment are not described in detail here.
[0129] Figure 8It is a schematic diagram of a second sidecar structure provided in an embodiment of the present application. The second sidecar 800 may include one or more central processing units (CPU) 801 and a memory 805. The memory 805 stores one or more applications or data.
[0130] Among them, the memory 805 can be volatile storage or persistent storage. The program stored in the memory 805 may include one or more modules, each of which may include a series of instruction operations in the second sidecar. Furthermore, the central processor 801 can be configured to communicate with the memory 805 and execute a series of instruction operations in the memory 805 on the second sidecar 800.
[0131] The central processor 801 is used to execute the computer program in the memory 805, so that the second sidecar 800 is used to perform: the second sidecar receives the business information from the first sidecar, the business information includes the business data offset information, connection information, filter information and routing information of the business processing by the first sidecar; the second sidecar takes over the FD connection according to the business information; the second sidecar obtains the business data of the transport layer data flow according to the business information. For specific implementation methods, please refer to Figure 3 Steps 301-309 in the illustrated embodiment are not described in detail here.
[0132] The second sidecar 800 may also include one or more power supplies 802, one or more wired or wireless network interfaces 803, one or more input and output interfaces 804, and / or one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0133] The second sidecar 800 can perform the aforementioned Figure 3 The operations performed by the second sidecar in the illustrated embodiment are not described in detail here.
[0134] like Fig. 9 As shown, the embodiment of the present application provides a sidecar management system 900, which includes a first sidecar 901 and a second sidecar 902, wherein the first sidecar 901 can execute the aforementioned Figure 3 The operations performed by the first sidecar in the embodiment shown in the figure may be performed by the second sidecar 902. Figure 3The operations performed by the second sidecar in the illustrated embodiment are not described in detail here.
[0135] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, all or part of the processes (or functions) described in the embodiments of the present application are implemented. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)), etc. In the embodiment of the present application, the computer may include the aforementioned device.
[0136] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in a claim. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
Claims
1. A method for upgrading a grid data surface sidecar, characterized in that: The method is applied to a sidecar management system, the sidecar control system includes a first sidecar and a second sidecar, and the method includes: The first sidecar stops acquiring service data of the transport layer data stream; The first sidecar determines that the acquired business data has been completely processed; The first sidecar sends business information to the second sidecar, where the business information includes business data offset information, connection information, filter information, and routing information processed by the first sidecar, so that the second sidecar takes over the FD connection according to the business information and obtains the business data of the transport layer data stream.
2. The method according to claim 1, characterized in that Before the first sidecar stops acquiring service data of the transport layer data flow, the method further includes: The first sidecar stores the acquired business data in the internal storage space; The first sidecar generates an application layer message according to the service data.
3. The method according to claim 2, characterized in that The first sidecar stops obtaining service data of the transport layer data stream, including: The first sidecar stops obtaining service data of the transport layer data flow from the network cache space; After the first sidecar generates an application layer message according to the service data, the method further includes: The first sidecar deletes target business data, where the target business data is business data corresponding to the application layer message in the network cache space.
4. The method according to claim 3, characterized in that Before the first sidecar stops obtaining service data of the transport layer data flow from the network cache space, the method further includes: The first sidecar increases the network cache space capacity, and the cache space capacity is used to store business data of the transport layer data flow.
5. The method according to claim 4, characterized in that After the first sidecar stops acquiring service data of the transport layer data flow and before the first sidecar determines that the acquired service data has been completely processed, the method further includes: The first sidecar generates an application layer message according to the remaining service data in the internal storage space.
6. The method according to claim 4, characterized in that After the first sidecar stops acquiring service data of the transport layer data flow and before the first sidecar determines that the acquired service data has been completely processed, the method further includes: When the remaining service data in the internal storage space is insufficient to generate a complete application layer message, the first sidecar obtains supplementary service data from the network cache space; The first sidecar generates an application layer message according to the supplementary service data and the remaining service data.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The first sidecar receives a logoff notification from the second sidecar, where the logoff notification is used to trigger the first sidecar to log off; The first sidecar performs a offline operation.
8. A method for upgrading a grid data surface sidecar, characterized in that: The method is applied to a sidecar management system, the sidecar control system includes a first sidecar and a second sidecar, and the method includes: The second sidecar receives service information from the first sidecar, where the service information includes service data offset information, connection information, filter information, and routing information performed by the first sidecar; The second sidecar takes over the FD connection according to the service information; The second sidecar obtains service data of the transport layer data stream according to the service information.
9. The method according to claim 8, characterized in that The method further comprises: The second sidecar sends an offline notification to the first sidecar, where the offline notification is used to trigger the first sidecar to perform an offline operation.
10. The method according to claim 7 or 8, characterized in that: The method further comprises: The second sidecar restores the network cache space capacity increased by the first sidecar, where the cache space capacity is used to store the service data of the target service flow.
11. A first sidecar, characterized in that: The first sidecar includes: A stop module is used to stop obtaining service data of the transport layer data stream; A determination module is used to determine whether the acquired business data has been completely processed; A sending module is used to send business information to the second sidecar, where the business information includes business data offset information, connection information, filter information and routing information of the business processed by the first sidecar, so that the second sidecar takes over the FD connection according to the business information and obtains the business data of the transport layer data stream.
12. The first sidecar according to claim 11, characterized in that: The first sidecar further includes: A storage module, used to store the acquired business data into an internal storage space; A generation module is used to generate an application layer message according to the business data.
13. The first sidecar according to claim 12, characterized in that: The stop module is specifically used for: Stop obtaining service data of the transport layer data stream from the network cache space; The first sidecar further includes: The deletion module is used to delete target business data, where the target business data is the business data corresponding to the application layer message in the network cache space.
14. The first sidecar according to claim 13, characterized in that: The first sidecar further includes: The increasing module is used to increase the capacity of the network cache space, and the cache space capacity is used to store the business data of the transport layer data flow.
15. The first sidecar according to claim 14, characterized in that: The generation module comprises: The first generating unit is used to generate an application layer message according to the remaining business data in the internal storage space.
16. The first sidecar according to claim 14, characterized in that: The generation module comprises: An acquisition unit, used to acquire supplementary service data from a network cache space when the remaining service data in the internal storage space is insufficient to generate a complete application layer message; The second generating unit is used to generate an application layer message according to the supplementary service data and the remaining service data.
17. The first sidecar according to any one of claims 11 to 16, characterized in that: The first sidecar further includes: A receiving module, configured to receive an offline notification from the second sidecar, wherein the offline notification is used to trigger the first sidecar to go offline; The offline module is used to perform offline operations.
18. A second sidecar, characterized in that: The second sidecar includes: A receiving module, configured to receive service information from the first sidecar, wherein the service information includes service data offset information, connection information, filter information, and routing information for service processing by the first sidecar; A takeover module, used for taking over the FD connection according to the service information; The acquisition module is used to acquire the service data of the transport layer data stream according to the service information.
19. The second sidecar according to claim 18, characterized in that: The second sidecar also includes: A sending module is used to send an offline notification to the first sidecar, where the offline notification is used to trigger the first sidecar to go offline.
20. The second sidecar according to claim 18 or 19, characterized in that: The second sidecar also includes: A recovery module is used to restore the increased network cache space capacity of the first sidecar, where the cache space capacity is used to store the business data of the target business flow.
21. A first sidecar, characterized in that: The first sidecar includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the first sidecar to implement the method according to any one of claims 1-7.
22. A second sidecar, characterized in that: The second sidecar includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the second sidecar to implement the method as described in any one of claims 8-10.
23. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program instruction, and the computer program instruction is loaded and executed by a processor to implement the method according to any one of claims 1 to 7.
24. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program instruction, and the computer program instruction is loaded and executed by a processor to implement the method according to any one of claims 8 to 10.
25. A sidecar management system, characterized in that: The sidecar management system includes a first sidecar and a second sidecar, wherein the first sidecar is used to execute the method according to any one of claims 1 to 7, and the second sidecar is used to execute the method according to any one of claims 8 to 10.
Citation Information
Patent Citations
System and method for realizing seamless upgrading of sidecar based on addition of temporary container
CN111552496A
Data transmission method and device, equipment and storage medium
CN113765867A
Node for operating container group, and management system and method for container group
CN115705198A
