CN116074320A - Co-proxy cluster communication method and device, electronic equipment and storage medium - Google Patents

Co-proxy cluster communication method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116074320A
CN116074320A CN202211719183.3A CN202211719183A CN116074320A CN 116074320 A CN116074320 A CN 116074320A CN 202211719183 A CN202211719183 A CN 202211719183A CN 116074320 A CN116074320 A CN 116074320A
Authority
CN
China
Prior art keywords
address
service cluster
cluster
communication request
service
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
CN202211719183.3A
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.)
Zhongke Sugon Information Industry Chengdu Co ltd
Dawning Information Industry Co Ltd
Original Assignee
Zhongke Sugon Information Industry Chengdu Co ltd
Dawning Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongke Sugon Information Industry Chengdu Co ltd, Dawning Information Industry Co Ltd filed Critical Zhongke Sugon Information Industry Chengdu Co ltd
Priority to CN202211719183.3A priority Critical patent/CN116074320A/en
Publication of CN116074320A publication Critical patent/CN116074320A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application discloses a method, a device, electronic equipment and a storage medium for communicating with an agent cluster, wherein the method comprises the following steps: acquiring an inter-proxy communication request of a first service cluster, wherein the inter-proxy communication request at least comprises an internal virtual address; determining a network address of a second service cluster for processing the same-agent request according to a preset address information table and the internal virtual address; and transmitting the communication request with the agent to the second service cluster for processing according to the network address. According to the embodiment of the application, the communication between the service clusters belonging to the same agent is realized through the preset address information table and the internal virtual address, no extra equipment is required to be introduced, the cost overhead of the communication between the service clusters is reduced, and the complex architecture of the service clusters can be realized, so that the availability of the service clusters is improved, and the use experience of a user is enhanced.

Description

Co-proxy cluster communication method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a method and apparatus for co-proxy trunking communication, an electronic device, and a storage medium.
Background
The existing large-scale physical machines or virtual clusters often need a load balancing technology to realize the balance consistency of cluster services, so that the problem of overhigh local load is avoided. Currently, linux virtual servers (Linux Virtual Server, LVS) are commonly used for realizing load balancing of large-scale physical machines or virtual clusters, work in a four-layer network model, can realize high-performance and high-availability cluster load service, and have the characteristics of simple configuration and multiple working modes. The LVS has multiple working modes, including a Direct Routing (DR) mode, a tunnel mode, a route forwarding mode, and the like, where the DR mode receives an access request sent by a client to a virtual internet protocol address (Virtual Intern et Protocol, VIP) module, the VIP module determines, according to an equalization algorithm set by the LVS, that a Real Server (RS) processes the access request, and a destination address of a data packet of the access request is modified to be an address of the determined RS.
However, with application of the micro service concept, the service architecture of the server cluster also becomes more complex, and the DR mode of the existing LVS only can realize access of the external node to the service inside the service cluster, but there is a limit to access among the service clusters belonging to the same LVS, as in fig. 1, load balancing proxy is performed between different servers in the service cluster through the LVS, the LVS can proxy load balancing of the cluster service a and the cluster service B, when the cluster service a accesses the cluster service B through the LVS, because of the LVS load balancing mechanism, an access request of the service cluster a is returned to the service cluster a by the LVS, and cannot be fed back to the service cluster a after being processed by the service cluster B, and communication cannot be performed between the service clusters of the LVS proxy through the LVS.
Disclosure of Invention
The embodiment of the application provides a communication method of the same agent cluster, so as to solve the communication problem between service clusters of the same load balancing agent, and improve the application of the service clusters to complex service architecture on the basis of not changing the service cluster structure, thereby improving the availability of the service clusters and improving the user experience.
According to an aspect of an embodiment of the present application, there is provided a method for trunking communication with a proxy, where the method includes:
acquiring an inter-proxy communication request of a first service cluster, wherein the inter-proxy communication request at least comprises an internal virtual address;
determining a network address of a second service cluster for processing the same-agent request according to a preset address information table and the internal virtual address;
and transmitting the communication request with the agent to the second service cluster for processing according to the network address.
According to the method and the device for processing the same-proxy request, the processing of the same-proxy request is achieved through the preset address information table and the internal virtual address, extra equipment is not required to be introduced, cost expenditure of communication between service clusters can be reduced, communication interaction between the service clusters is assisted, complex architecture of the service clusters is facilitated, usability of the service clusters is improved, and therefore user experience is improved.
Further, in some application embodiments, the method further includes: and determining that the second service cluster and the first service cluster belong to the same load balancing agent according to the network segment to which the internal virtual address belongs.
According to the method and the device for processing the request, the network segment is used for judging the load balancing agent, which belongs to the same area as the first service cluster and the second service cluster, so that the request of the same agent is prevented from being transferred to the external service cluster, and the safety of the request processing can be improved.
Further, in some application embodiments, determining, according to a preset address information table and the internal virtual address, a network address of a second service cluster that processes the peer-proxy request includes:
extracting the internal virtual address within the co-agent communication request;
determining at least one internal service cluster corresponding to the internal virtual address and a real network address of the internal service cluster according to the preset address information table;
and determining the second service cluster for processing the peer-to-proxy communication request in the at least one internal service cluster according to a preset load balancing rule, and taking the real network address corresponding to the second service cluster as the network address.
According to the embodiment of the application, the internal service clusters corresponding to the internal virtual addresses and the real network addresses are arranged in the preset address information table, so that the configuration difficulty of the address information table can be reduced, the access relation in the service clusters is convenient to manage, the second service cluster for processing the same-agent communication request is selected in the internal service clusters through the load balancing rule, unified access management among different service clusters can be realized, the problem that local load is too high in the service clusters is avoided, and the robustness of the service clusters can be enhanced.
Further, in some application embodiments, the preset load balancing rule includes at least one of: minimum connection dynamic scheduling rules, minimum expected delay dynamic scheduling rules, queuing-free scheduling rules, local minimum connection scheduling rules.
In the embodiment of the application, the second service cluster for processing the communication request with the proxy is determined through different load balancing rules, so that the matching degree of the second service cluster and the communication request with the proxy can be improved, and the processing efficiency of the communication request with the proxy can be improved.
Further, in some application embodiments, transmitting the peer-to-proxy communication request to the second service cluster for processing according to the network address includes:
Analyzing the data packet of the communication request with the proxy to determine a destination internet protocol address field and a destination media access control address field;
updating a real server internet protocol address and a real server media access control address within said network address to said internet protocol address field and said destination media access control address field of said peer-to-peer communication request;
and transmitting the updated data packet to the second service cluster so that the second service cluster processes the peer-to-proxy communication request.
According to the embodiment of the application, the network address is used for modifying the data packet of the communication request with the proxy, so that the accurate transmission of the data packet can be realized, the communication request with the proxy can not be transmitted to the second service cluster, the accuracy of communication in the service cluster can be improved, and the problem that communication can not be performed among the service clusters belonging to the same load balancing proxy is solved.
Further, in some application embodiments, the internal virtual address of the internal service cluster is configured in the preset address information table, where the internal virtual address is a unidirectional virtual address.
According to the embodiment of the application, the difficulty in updating the service cluster system can be reduced by dynamically configuring the internal virtual address in the preset address information table, so that the service cluster system can still realize internal cluster access based on the preset address information table after being updated, and the unidirectional virtual address in the preset address information table can improve the accuracy of communication control, prevent communication conflict caused by the virtual address and improve the safety of communication in the service cluster.
Further, in some embodiments, the network segment is different from the network segment to which the virtual address corresponds to the external cluster.
According to the method and the device for processing the communication request with the proxy, the internal service cluster and the external cluster for processing the communication request with the proxy are isolated in a network segment setting mode, so that the internal communication request is prevented from flowing into the external cluster, and the safety of the transmission of the communication request with the proxy can be further improved.
According to another aspect of the embodiments of the present application, there is provided a peer-proxy trunking communication device, where the device includes:
the system comprises a request acquisition module, a first service cluster and a second service cluster, wherein the request acquisition module is used for acquiring an agent-to-agent communication request of the first service cluster, and the agent-to-agent communication request at least comprises an internal virtual address;
the cluster determining module is used for determining the network address of the second service cluster for processing the same-agent request according to a preset address information table and the internal virtual address;
and the request forwarding module is used for transmitting the peer-to-proxy communication request to the second service cluster for processing according to the network address.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the co-proxy trunking communication method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the peer-proxy trunking communication method according to any embodiment of the present invention when executed.
According to the technical scheme, the network address of the second service cluster for processing the same-agent communication request is determined based on the preset address information table and the internal virtual address of the same-agent communication request by acquiring the same-agent communication request of the first service cluster, and the same-agent communication request is sent to the second service cluster for processing according to the network address.
It should be understood that the number of the devices, what is described in this section is not intended to identify key or critical features of the embodiments of the application, nor is it intended to be limiting as to the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an exemplary diagram of service cluster information communication provided according to an embodiment of the present application;
fig. 2 is a flowchart of a method for communicating with a proxy cluster according to an embodiment of the present application;
FIG. 3 is a flow chart of another method of co-proxy trunking communication provided in accordance with an embodiment of the present application;
fig. 4 is an exemplary diagram of a method of communicating with a proxy cluster according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a method for communicating with a proxy cluster according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a peer-proxy trunking communication device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device implementing a peer-proxy trunking communication method according to an embodiment of the present invention.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 2 is a flowchart of a peer-to-proxy trunking communication method according to an embodiment of the present application, where the method may be applicable to a case of information communication between service clusters belonging to the same load balancer, and the method may be performed by a peer-to-proxy trunking communication device, which may be implemented in the form of hardware and/or software, and the peer-to-proxy trunking communication device may be configured to a proxy load-balanced load balancer, where the load balancer may include a server or a server cluster. As shown in fig. 2, the method provided in the embodiment of the present application specifically includes:
step 110, an inter-proxy communication request of the first service cluster is obtained, wherein the inter-proxy communication request at least includes an internal virtual address.
The first service cluster may be a service cluster of the load balancer agent, and may have information interaction requirements with other service clusters, and the first service cluster may be formed by one or more servers. The peer-to-proxy communication request may be a request to enable information interaction between service clusters belonging to the same equilibrium server proxy, and the peer-to-proxy communication request may be generated according to a prior art communication protocol or by a custom communication protocol. The internal virtual address may be a virtual address of the service cluster for communication, which may include VIP addresses or media access control addresses (Media Access Control Address, MAC), etc., which may be implemented by configuration of the load balancer.
In an embodiment of the present application, the first service cluster may send a peer-to-peer communication request to the load balancer, and the load balancer may receive the peer-to-peer communication request, where the peer-to-peer communication request may be used by the first service cluster to access other service clusters that belong to the load balancer. The peer-to-peer communication request may be generated according to a specified communication rule, and may include at least an internal virtual address within the peer-to-peer communication request that may be directed within the load balancer to other service clusters that handle the peer-to-peer communication request. In some embodiments, the co-agent communication request may be a transmission control protocol (Transmission Control Protocol, TCP) message and the internal virtual address may be the destination IP address of the co-agent communication request.
And 120, determining the network address of the second service cluster for processing the same agent request according to the preset address information table and the internal virtual address.
The preset address information table may be an information table storing internal virtual addresses and real addresses of the server clusters, and the preset address information table may have a corresponding relationship between the internal virtual addresses and the real addresses of the server clusters. The second service cluster may be a service cluster in communication with the first service cluster, in some embodiments the first service cluster and the second service cluster may implement different business services, while in other embodiments the first service cluster and the second service cluster may be different physical machines or virtual machines that implement the same business services. The network address may be a real address accessing the second service cluster, and may include an IP address or a MAC address.
In this embodiment of the present application, a network address corresponding to the preset information table may be searched according to an internal virtual address, and a service cluster corresponding to the network address may be used as a second service cluster for processing a same proxy request. In some embodiments, the preset information table may be a routing information table configured by a virtual network card of the load balancer, and routing information of a service request processed by the virtual network card may be stored in the preset information table.
And 130, transmitting the communication request of the same agent to the second service cluster for processing according to the network address.
In this embodiment of the present application, the load balancer may transmit the peer-to-proxy communication request to the second service cluster according to the determined network address of the second service cluster, and the second service cluster may process the peer-to-proxy communication request, and further in some embodiments, the transmission process of the peer-to-proxy communication request may be implemented based on an equalization algorithm of the load balancer, so as to ensure load balancing in the service cluster.
According to the embodiment of the application, the second service cluster for processing the same-agent communication request and the network address of the second service cluster are determined by receiving the same-agent communication request of the first service cluster and using the preset address information table and the internal virtual address of the same-agent communication request, and the second service cluster is processed by sending the same-agent communication request to the second service cluster according to the network address.
Fig. 3 is a flowchart of another co-proxy trunking communication method according to an embodiment of the present application, where the embodiment of the present application is embodied on the basis of the embodiment of the present application, and the internal access is prevented from affecting the external access by distinguishing the processing directions of the co-proxy communication requests through the judgment of the internal virtual address network segment, and referring to fig. 3, the method provided in the embodiment of the present application specifically includes the following steps:
step 210, obtaining a communication request with the proxy of the first service cluster, wherein the communication request with the proxy at least comprises an internal virtual address.
Step 220, determining that the second service cluster and the first service cluster belong to the same load balancing agent according to the network segment to which the internal virtual address belongs.
The network segments may be network segments to which the configured internal virtual address belongs in the virtual network card of the load balancer, and service clusters of the load balancer agents may all be configured to the same network segment.
In this embodiment of the present application, the internal virtual address in the peer-to-peer agent communication request may be determined by determining, by determining a network segment to which the internal virtual address belongs, whether the internal virtual address belongs to a virtual address used in the service cluster of the load balancer agent, if yes, it may be determined that the first server cluster and the second service cluster of the communication belong to the same load balancing agent, if not, the peer-to-peer agent communication request is an external communication request, and the peer-to-peer agent request cannot be transmitted in the service cluster of the load balancer agent, and by determining a network segment of the internal virtual address, the internal request is isolated from the external request, thereby preventing the internal request transmission from affecting the external request transmission.
Step 230, extracting the internal virtual address within the communication request with the proxy.
In embodiments of the present application, an internal virtual address within an agent-to-agent communication request may be extracted, which may be located in a destination address field of the agent-to-agent communication request.
Step 240, determining at least one internal service cluster corresponding to the internal virtual address and a real network address of the internal service cluster according to the preset address information table.
The internal service cluster may be a service cluster of the load balancer agent, and the internal service cluster may have a corresponding relationship with an internal virtual address in a preset address information table. The real network address may be a network address of each internal service cluster, which may be used to access the internal service cluster.
In the embodiment of the application, the internal service cluster having a pair relationship with the internal virtual address and the real network address of the internal service cluster can be searched in the preset address information table. The preset address information table may store the internal virtual address in association with identification information of the internal service cluster, where the identification information may include a service cluster name, a service cluster real network address, etc., it may be understood that one internal virtual address in the preset address information table may be stored in association with a plurality of internal service clusters, and a plurality of determined internal service clusters having a corresponding relationship with the internal virtual address may be used.
Step 250, determining a second service cluster for processing the communication request with the proxy in at least one internal service cluster according to a preset load balancing rule, and taking the real network address corresponding to the second service cluster as the network address.
The preset load balancing rule can be a rule configured in the load balancer for carrying out load balancing on the internal service clusters, and can save service distribution balancing among the internal service clusters and prevent service problems caused by overlarge local load in the internal service clusters.
In the embodiment of the present application, a preset load balancing rule may be obtained, a second service cluster for processing a communication request with an agent may be selected from one or more internal service clusters corresponding to the internal virtual address according to the preset load balancing rule, and the determined real network address of the second service cluster may be used as a network address for transmitting intra-cluster information.
In some application embodiments, the preset load balancing rules include at least one of: minimum connection dynamic scheduling rules, minimum expected delay dynamic scheduling rules, queuing-free scheduling rules, local minimum connection scheduling rules.
In this embodiment of the present application, a preset load balancing rule configured in a load balancer may include: one or more of a minimum connection dynamic scheduling rule, a minimum expected delay dynamic scheduling rule, a queuing-free scheduling rule and a local minimum connection scheduling rule can realize balanced service of the internal service cluster through calling a preset load balancing rule. It is understood that the preset load balancing rules of the load balancer configuration may include, but are not limited to, those described above.
Step 260 parses the data packet of the communication request with the proxy to determine the destination internet protocol address field and the destination media access control address field.
The data packet may be a data unit transmitted with the proxy communication request, and the data packet may include a destination internet protocol address field and a destination media access control address field.
In the embodiment of the application, the received communication request with the proxy can be analyzed, and the location of the destination internet protocol address field and the destination media access control address field in the communication request with the proxy can be determined in the communication request with the proxy. In some embodiments, the peer-to-peer communication request may be transmitted in the form of a TCP packet, and the header of the TCP packet may be parsed for the location of the Internet protocol address field and the destination media access control address field in the peer-to-peer communication request.
Step 270, updating the real server internet protocol address and the real server media access control address in the network address to the internet protocol address field and the destination media access control address field of the proxy communication request.
In this embodiment of the present application, the network address of the second service cluster may include a real server internet protocol address and a real server media access control address, and the information of the internet protocol address field and the destination media access control address field determined in the peer-to-peer communication request may be updated to the real server internet protocol address and the real server media access control address in the network address, respectively, so that the peer-to-peer communication request may be transmitted to the second service cluster.
Step 280, transmitting the updated data packet to the second service cluster to enable the second service cluster to process the peer-to-peer communication request.
In this embodiment of the present application, after the data packets of the peer-to-peer communication request are updated to the network address of the second service cluster, the updated data packets may be transmitted to the second service cluster, so as to implement transmission of the peer-to-peer communication request, so that the second service cluster may process the peer-to-peer communication request, thereby implementing a response of the second service cluster to the first service cluster.
In the embodiment of the application, by acquiring the peer-to-peer communication request generated by the first service cluster, confirming that the first service cluster and the second service cluster processing the peer-to-peer communication request belong to the same load balancing agent according to the network segment of the internal dotted line address in the peer-to-peer communication request, extracting the internal virtual address in the peer-to-peer communication request, searching the internal service cluster corresponding to the internal virtual address and the real network address corresponding to the internal service cluster in the preset address information table, determining the second service cluster processing the peer-to-peer communication request in each internal service cluster according to the preset load balancing rule, taking the real network address of the second service cluster as the network address, analyzing the data packet of the communication request with the agent to determine a destination Internet protocol address field and a destination media access control address field, updating the real server Internet protocol address and the real server media access control address of the network address to the fields, transmitting the updated data packet to the second service cluster to enable the second service cluster to process the communication request with the agent, thereby realizing the communication between the service clusters belonging to the same agent, avoiding introducing extra equipment, reducing the cost overhead of the communication between the service clusters, realizing the complex architecture of the service clusters, improving the availability of the service clusters and enhancing the use experience of users.
In some application embodiments, the method for communicating with the proxy cluster provided in the embodiments of the present application further includes:
and configuring an internal virtual address of the internal service cluster in a preset address information table, wherein the internal virtual address is a unidirectional virtual address.
The unidirectional virtual address may be a virtual address that can only be transmitted in one direction, for example, a unidirectional virtual address configured by the service cluster a, and the service cluster B may transmit data to the service cluster a using the unidirectional virtual address, where when the service cluster a transmits data to the service cluster B, the unidirectional virtual address cannot be used, and another unidirectional virtual address needs to be used.
In this embodiment of the present application, a preset address information table may be configured in advance, each internal service cluster may have a corresponding internal virtual address, and the internal virtual address configured in the preset address information table may be a unidirectional virtual address, where the internal service cluster may only use the unidirectional virtual address to transmit to the corresponding internal virtual address.
In other embodiments, the network segment is different from the network segment to which the virtual address corresponds to the external cluster.
In the embodiment of the application, the load balancer executing the method of the embodiment of the application can also execute the access scheduling of the external cluster to the internal service cluster, and the scheduling process can also be realized by the virtual address, but the virtual address used by the external cluster communication is different from the network segment of the internal virtual address, so that the load balancer can conveniently judge the processing mode of the access request, and the interference between the internal access request and the external access request is prevented.
In some embodiments, fig. 4 is an exemplary diagram of a method for communicating with a proxy cluster according to an embodiment of the present application, and referring to fig. 4, a load balancing service cluster may be implemented by an LVS, where the load balancing service cluster may simultaneously proxy a and service B, the load balancing service cluster may provide a first Direct Server (DS) for an external access link, the first DS may provide a routing function for the external access link, the load balancing service cluster may further provide a second DS for an internal access link, the second DS may provide a routing function for the internal access link, and the internal access link may refer to a data access link between a service cluster a and a service cluster B that are proxied by the load balancing service cluster, where the service cluster a and the service cluster B may be respectively composed of one or more RSs.
Based on the access link shown in fig. 4, when the service cluster a needs to communicate with the service cluster B, the communication manner between the service cluster a and the service cluster B may be as shown in fig. 5. When the service cluster A requests the service of the service cluster B, the peer-to-peer communication request sent by the service cluster A can access the second DS through the internal VIP of the peer-to-peer communication request, the peer-to-peer communication request can be resolved by the second DS based on the internal VIP, the source IP address, the destination IP address and the destination MAC address are extracted from the peer-to-peer communication request, then the service cluster B can be matched according to one or more pre-configured load balancing strategies, so that the RS service address is determined, the destination IP address and the destination MAC address in the peer-to-peer communication request can be updated according to the RS service address, the updated destination IP address and the destination MAC address of the peer-to-peer communication request point to the RS service address, and the peer-to-peer communication request can be forwarded to the RS of the service cluster B, and the RS can process the peer-to-peer communication request. Further, the RS may modify the IP address of the peer-to-peer communication request after processing the peer-to-peer communication request, thereby implementing a request for responding to the service cluster a. The response process may be of a type similar to the request process, the service cluster B may send the response information to the second DS through the internal VIP, the second DS may determine that the second DS may parse the response information based on the internal VIP, and extract the source IP address, the destination IP address, and the destination MAC address, which may be understood that, at this time, the source IP address, the destination IP address, and the destination MAC address of the response information may be exactly opposite to the request for communication with the proxy, where the source IP address is an IP address of the RS in the service cluster B, and the destination IP address and the destination MAC address may be an IP address and a MAC address of the RS in the service cluster a. The second DS may also select one or more RS service addresses within the service cluster a using one or more load balancing policies, modify response information according to the RS service addresses, and feed back the modified response information to the RSs of the service cluster a.
While based on the access link shown in fig. 4, when the external service cluster realizes communication to the internal service cluster, the communication request may be sent to the first DS through the VIP, it may be understood that the VIP is different from the network segment to which the VIP accessing the second DS belongs, the communication request may only access the first DS through the VIP, only the communication request of the external service cluster is processed in the first DS, the first DS may select the internal RS in the communication request through load balancing, and the first DS may forward the communication request to the internal RS for processing, thereby realizing communication of the external service cluster to the internal service cluster. In this embodiment of the present application, the VIP capable of accessing the external communication request of the first DS may be divided into different network segments with the VI P of the internal communication request, so that the internal access request accesses the second DS, and the external access request accesses the first DS, so that the internal access request and the external access request do not affect each other, thereby improving the security of inter-cluster communication.
Further, in some application embodiments, the first DS and the second DS may be located in the same physical device, where two sets of preset address information tables may be configured in the physical device, where the first set of preset address information tables is stored in association with an external VIP, and the second set of preset address information tables is stored in association with an internal VIP, when the physical device receives a communication request, it may determine, by using the first set of preset address information tables, an RS that processes the communication request if the network segment belongs to the external VIP, and determine, by using the second set of preset address information tables, an RS that processes the communication request if the network segment belongs to the internal VIP, and may forward the communication request to the corresponding RS for processing, thereby compatible with access of the external service cluster to the internal service cluster and access of the internal service cluster to the internal service cluster.
Fig. 6 is a schematic structural diagram of a peer-proxy trunking communication device according to an embodiment of the present application, as shown in fig. 6, the device includes: a request acquisition module 301, a cluster determination module 302 and a request forwarding module 303.
The request obtaining module 301 is configured to obtain a peer-to-peer communication request of the first service cluster, where the peer-to-peer communication request includes at least an internal virtual address.
The cluster determining module 302 is configured to determine, according to a preset address information table and the internal virtual address, a network address of a second service cluster that processes the peer-proxy request.
And the request forwarding module 303 is configured to transmit the peer-proxy communication request to the second service cluster for processing according to the network address.
According to the embodiment of the application, the request acquisition module receives the communication request with the agent of the first service cluster, the cluster determination module determines the second service cluster for processing the communication request with the agent by using the preset address information table and the internal virtual address of the communication request with the agent, and the network address of the second service cluster, and the request forwarding module sends the communication request with the agent to the second service cluster for processing according to the network address.
In some application embodiments, further comprising: and the network segment judging module is used for determining that the second service cluster and the first service cluster belong to the same load balancing agent according to the network segment to which the internal virtual address belongs.
In other embodiments, the network segment is different from the network segment to which the virtual address corresponds to the external cluster.
In some application embodiments, cluster determination module 302 includes:
and the address extraction unit is used for extracting the internal virtual address in the co-agent communication request.
And the address searching unit is used for determining at least one internal service cluster corresponding to the internal virtual address and the real network address of the internal service cluster according to the preset address information table.
And the cluster determining unit is used for determining the second service cluster for processing the peer-to-peer communication request in the at least one internal service cluster according to a preset load balancing rule, and taking the real network address corresponding to the second service cluster as the network address.
In some application embodiments, the preset load balancing rules include at least one of: minimum connection dynamic scheduling rules, minimum expected delay dynamic scheduling rules, queuing-free scheduling rules, local minimum connection scheduling rules.
In some embodiments, the request forwarding module 303 includes:
and the field determining unit is used for analyzing the data packet of the communication request with the agent to determine a destination internet protocol address field and a destination media access control address field.
And the information updating unit is used for updating the real server Internet protocol address and the real server media access control address in the network address to the Internet protocol address field and the destination media access control address field of the peer-to-peer communication request.
And the request sending unit is used for transmitting the updated data packet to the second service cluster so that the second service cluster processes the peer-to-proxy communication request.
In some embodiments, the apparatus provided in the embodiments of the present application further includes: the address configuration module is configured to configure the internal virtual address of the internal service cluster in the preset address information table, where the internal virtual address is a unidirectional virtual address.
The peer-to-peer communication device provided by the embodiment of the application can execute the peer-to-peer communication method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 7 is a schematic structural diagram of an electronic device implementing a peer-proxy trunking communication method according to an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the peer cluster communication method.
In some embodiments, the peer cluster communication method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more of the steps of the co-agent cluster communication method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the co-proxy cluster communication method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of embodiments of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of embodiments of the present application, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for communicating with a proxy cluster, applied to a load balancer, comprising:
acquiring an inter-proxy communication request of a first service cluster, wherein the inter-proxy communication request at least comprises an internal virtual address;
determining a network address of a second service cluster for processing the same-agent request according to a preset address information table and the internal virtual address;
and transmitting the communication request with the agent to the second service cluster for processing according to the network address.
2. The method as recited in claim 1, further comprising: and determining that the second service cluster and the first service cluster belong to the same load balancing agent according to the network segment to which the internal virtual address belongs.
3. The method of claim 1, wherein determining the network address of the second service cluster that handles the co-proxy request based on the pre-set address information table and the internal virtual address comprises:
extracting the internal virtual address within the co-agent communication request;
determining at least one internal service cluster corresponding to the internal virtual address and a real network address of the internal service cluster according to the preset address information table;
and determining the second service cluster for processing the peer-to-proxy communication request in the at least one internal service cluster according to a preset load balancing rule, and taking the real network address corresponding to the second service cluster as the network address.
4. A method according to claim 3, wherein the preset load balancing rules comprise at least one of: minimum connection dynamic scheduling rules, minimum expected delay dynamic scheduling rules, queuing-free scheduling rules, local minimum connection scheduling rules.
5. The method of claim 1, wherein said transmitting said peer-to-peer communication request to said second service cluster for processing in accordance with said network address comprises:
analyzing the data packet of the communication request with the proxy to determine a destination internet protocol address field and a destination media access control address field;
updating a real server internet protocol address and a real server media access control address within said network address to said internet protocol address field and said destination media access control address field of said peer-to-peer communication request;
and transmitting the updated data packet to the second service cluster so that the second service cluster processes the peer-to-proxy communication request.
6. The method according to any one of claims 1, further comprising:
and configuring the internal virtual address of the internal service cluster in the preset address information table, wherein the internal virtual address is a unidirectional virtual address.
7. The method of claim 2, wherein the network segment is different from the network segment to which the virtual address corresponds to the external cluster.
8. A co-proxy trunking communication device, comprising:
The system comprises a request acquisition module, a first service cluster and a second service cluster, wherein the request acquisition module is used for acquiring an agent-to-agent communication request of the first service cluster, and the agent-to-agent communication request at least comprises an internal virtual address;
the cluster determining module is used for determining the network address of the second service cluster for processing the same-agent request according to a preset address information table and the internal virtual address;
and the request forwarding module is used for transmitting the peer-to-proxy communication request to the second service cluster for processing according to the network address.
9. An electronic device, the electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the co-proxy trunking communication method of any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the co-proxy cluster communication method of any one of claims 1-7 when executed.
CN202211719183.3A 2022-12-30 2022-12-30 Co-proxy cluster communication method and device, electronic equipment and storage medium Pending CN116074320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211719183.3A CN116074320A (en) 2022-12-30 2022-12-30 Co-proxy cluster communication method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211719183.3A CN116074320A (en) 2022-12-30 2022-12-30 Co-proxy cluster communication method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116074320A true CN116074320A (en) 2023-05-05

Family

ID=86181442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211719183.3A Pending CN116074320A (en) 2022-12-30 2022-12-30 Co-proxy cluster communication method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116074320A (en)

Similar Documents

Publication Publication Date Title
US11463511B2 (en) Model-based load balancing for network data plane
CN111258627B (en) Interface document generation method and device
CN112787913B (en) Intelligent network card assembly, physical machine, cloud service system and message sending method
US20150052575A1 (en) Steering Traffic Among Multiple Network Services Using a Centralized Dispatcher
CN113794788B (en) Gateway diversion method, system, device, equipment, storage medium and product
CN115567446A (en) Message forwarding method and device, computing equipment and uninstalling card
CN114500633B (en) Data forwarding method, related device, program product and data transmission system
CN110768911A (en) Efficient flow guiding method, device, equipment, system and storage medium
CN105100101A (en) Method, apparatus and system based on SSL session
CN112073503A (en) High-performance load balancing method based on flow control mechanism
CN114978808B (en) Data forwarding method and device, electronic equipment and storage medium
CN116074320A (en) Co-proxy cluster communication method and device, electronic equipment and storage medium
EP2965204B1 (en) Server to client reverse persistence
CN116303171A (en) Data interaction method and device between servers, electronic equipment and medium
US20230081696A1 (en) Methods for Shunting Clustered Gateways
CN113726881B (en) Communication connection establishment method, related device and computer readable storage medium
CN116016448A (en) Service network access method, device, equipment and storage medium
CN115633037A (en) Method, device, virtual gateway equipment, medium and system for forwarding data packet
CN115242597A (en) Information processing method, device and storage medium
EP3136251B1 (en) Flit transmission method and device of network on chip
CN116418863B (en) Communication method and device based on socks5 transparent proxy
CN116306407B (en) Verification method, device, equipment and storage medium of Network On Chip (NOC)
CN114567687B (en) Message forwarding method, device, equipment, medium and program product
US20240036939A1 (en) Deterministic execution of background jobs in a load-balanced system
CN115296952B (en) Equipment scheduling method, device, equipment and storage medium

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