CN115883560A - Cluster load balancing method based on message middleware AOP - Google Patents

Cluster load balancing method based on message middleware AOP Download PDF

Info

Publication number
CN115883560A
CN115883560A CN202211518405.5A CN202211518405A CN115883560A CN 115883560 A CN115883560 A CN 115883560A CN 202211518405 A CN202211518405 A CN 202211518405A CN 115883560 A CN115883560 A CN 115883560A
Authority
CN
China
Prior art keywords
aop
broker
load balancing
message middleware
switch
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
CN202211518405.5A
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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202211518405.5A priority Critical patent/CN115883560A/en
Publication of CN115883560A publication Critical patent/CN115883560A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The utility model relates to a cluster load balancing method based on message middleware AOP, which belongs to the technical field of information processing and comprises the following steps: splitting the virtual host: splitting the virtual host into a plurality of virtual hosts at an agent layer, and respectively storing the virtual hosts on different Broker nodes; information storage: storing all switches under the same virtual host on different Broker nodes respectively; generating a corresponding relation: setting a corresponding relation between the exchanger and the Broker node stored in the exchanger; forwarding the request: and after receiving the access request, forwarding the request to the corresponding Broker node. The method and the device can solve the problem of compatibility of a series of protocols, and more importantly, the load borne by each Broker node can be balanced, so that the service traffic can be dispersed to a plurality of Broker nodes under the condition of large message throughput, the plurality of Broker nodes can bear the load, the effect of load balancing can be achieved, and the phenomenon that the load on one Broker node is too large can be avoided.

Description

Cluster load balancing method based on message middleware AOP
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a cluster load balancing method based on message middleware AOP.
Background
The message middleware (AMQP On middleware, AOP for short) is an open source message middleware product based On the cloud native message middleware and compatible with an AMQP message queue protocol.
AMQP, advanced Message Queuing Protocol, is a popular Message Queuing Protocol, and its basic contents are: the producer produces data and sends the data to the server-side appointed exchanger for storage, the exchanger sends the message copy to the bound queue, and the consumer pulls the data of the appointed queue to the server side for consumption. Common products compatible with the AMQP protocol are RabbitMQ, AOP and the like.
Currently, in the message middleware AOP, all switches and queues under the same Vhost are collectively stored in one Broker node, and all service operations for the Vhost need to be completed through the same Broker node. The message throughput of most current service systems is very large, and all service traffic is concentrated on the same Broker node, so that the load of the Broker node is very large.
Disclosure of Invention
An object of the present disclosure is to provide a cluster load balancing method based on message middleware AOP, so as to solve the above technical problems in the related art.
In order to achieve the above object, according to a first aspect of the present disclosure, there is provided a cluster load balancing method based on message middleware AOP, including the following steps:
splitting the virtual host: splitting the virtual host into a plurality of virtual hosts at an agent layer, and respectively storing the virtual hosts on different Broker nodes;
information storage: storing all switches under the same virtual host on different Broker nodes respectively;
generating a corresponding relation: setting a corresponding relation between the exchanger and a Broker node stored in the exchanger;
forwarding the request: and after receiving the access request, forwarding the request to the corresponding Broker node.
As an optional technical solution, the information storing step further includes:
after all the switches under the same virtual host are respectively stored on different Broker nodes, the queue bound with the switch is stored on the Broker node stored by the switch.
As an optional technical solution, in the information storage step, all switches under the same virtual host are uniformly stored on different Broker nodes;
as an optional technical solution, in the information storing step, the storing rule of the switch is:
all exchangers are uniformly stored on different Broker nodes after hash calculation.
As an optional technical solution, the step of generating the corresponding relationship includes:
and generating a corresponding relation between the name of the switch and the Broker node stored in the switch by using the name of the switch.
As an optional technical solution, the manner of generating the correspondence between the switch and the Broker node stored in the switch is as follows:
generating an index value between the name of the exchanger and a Broker node stored in the exchanger by using the name of the exchanger and a mode of taking the remainder of n through a hash function;
wherein n is the number of the split virtual hosts in the step of splitting the virtual hosts.
As an optional technical solution, the method for balancing cluster load based on message middleware AOP further includes a step of storing a correspondence, where the storing a correspondence includes:
after the generating the correspondence step is completed, storing the correspondence obtained through the generating the correspondence step at an agent layer.
As an optional technical solution, in the step of forwarding the request, when the client requests to access a certain switch and/or queue, the proxy layer first analyzes the corresponding relationship between the switch and the Broker node, and then forwards the request to the corresponding Broker node to complete the request operation.
As an optional technical solution, the step of splitting the virtual host further includes: and respectively splitting the virtual hosts into a plurality of virtual hosts at the agent layer, and respectively storing the virtual hosts on different Broker nodes.
As an optional technical solution, in the step of forwarding the request, the client accesses the cluster through a proxy layer.
According to a second aspect of the present disclosure, there is further provided a cluster load balancing system based on message middleware AOP, where the cluster load balancing method based on message middleware AOP in the first aspect is applied to any one cluster load balancing system based on message middleware AOP, and the system includes at least one client, a proxy layer, and multiple Broker nodes;
the client is used for sending information requesting access to the agent layer;
and the agent layer analyzes the corresponding relation according to the information to obtain the Broker node which is requested to be accessed, and forwards the request to the corresponding Broker node.
According to a third aspect of the present disclosure, there is further provided a cluster, to which the message middleware AOP-based cluster load balancing method of the first aspect is applied, where the cluster includes a plurality of clients.
According to a fourth aspect of the present disclosure, there is also provided a computer program product containing instructions which, when run on a computer, make the computer perform the message middleware AOP based cluster load balancing method in the present disclosure.
According to the fifth aspect of the present disclosure, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the message middleware AOP-based cluster load balancing method in the present disclosure.
Through the technical scheme, the virtual host (Vhost) can be disassembled into a plurality of virtual hosts, the virtual hosts are dispersed on different Broker nodes, and all switches under the same virtual host are respectively stored on different Broker nodes, so that the problem of compatibility of a series of protocols can be solved, more importantly, the load borne by each Broker node is balanced, the service traffic can be dispersed on the plurality of Broker nodes under the condition of large message throughput, the plurality of Broker nodes can bear the load, the effect of load balancing can be achieved, and the phenomenon that the load on one Broker node is overlarge is avoided.
The cluster load balancing method based on the message middleware AOP at least has the following beneficial effects:
1. by the message middleware AOP-based cluster load balancing method, the operation pressure of a single virtual host can be distributed to the whole message middleware AOP cluster, the cluster load balancing effect is achieved, and the stability and the availability of the cluster are improved.
2. By the cluster load balancing method based on the message middleware AOP, a message queue protocol of the message middleware can be compatible, and the reconstruction and the application work of user migration can be effectively reduced.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure, but do not constitute a limitation of the disclosure. In the drawings:
fig. 1 is a schematic step diagram of a cluster load balancing method based on message middleware AOP according to an exemplary embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a client access queue provided in an exemplary embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
In the present disclosure, the term "and/or" is used merely to describe an association relationship of an associated object, which means that there may be three relationships, for example, a switch and/or a queue, which may represent three cases: there are switches alone, switches and queues simultaneously, and queues alone.
In the specification of the present disclosure, terms such as "first", "second", and "third", etc., are used only for distinguishing different objects or for distinguishing different processes for the same object, and are not used for describing a specific order of the objects, and do not mean that they have order and importance differences.
Furthermore, the terms "including" and "having," and any variations thereof, as referred to in the description of the present disclosure, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that in the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," in an embodiment of the present disclosure is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The most key inventive concept of the present disclosure is: in a service system, in a usage scenario where traffic is concentrated on one or more virtual hosts, the virtual host (Vhost) can be split (mapped) into multiple virtual hosts, and the multiple virtual hosts are dispersed on different Broker nodes, and all switches under the same virtual host are respectively stored on different Broker nodes, so that not only can the problem of compatibility of a series of protocols be solved, but also more importantly, the load borne by each Broker node can be balanced, so that traffic can be dispersed on multiple Broker nodes under the condition of large message throughput, and multiple Broker nodes can bear the load, thereby achieving the effect of balancing the load of the whole message middleware cluster, and being beneficial to avoiding the overlarge load on one Broker node.
As shown in fig. 1 to fig. 2, according to a first aspect of the present disclosure, there is provided a cluster load balancing method based on message middleware AOP, including the following steps: splitting a virtual host, storing information, generating a corresponding relation and forwarding a request; wherein, the step of splitting the virtual host comprises: splitting the virtual host into a plurality of virtual hosts at an agent layer, and storing the virtual hosts on different Broker nodes respectively; the information storage step comprises the following steps: storing all switches under the same virtual host on different Broker nodes respectively; the step of generating the corresponding relation comprises: setting a corresponding relation between the exchanger and a Broker node stored in the exchanger; the step of forwarding the request comprises: and after receiving the access request, forwarding the request to the corresponding Broker node.
Through the technical scheme, the virtual host (Vhost) can be disassembled into a plurality of virtual hosts, the virtual hosts are dispersed on different Broker nodes, and all switches under the same virtual host are respectively stored on different Broker nodes, so that the problem of compatibility of a series of protocols can be solved, more importantly, the load borne by each Broker node is balanced, the service traffic can be dispersed on the plurality of Broker nodes under the condition of large message throughput, the plurality of Broker nodes can bear the load, the effect of load balancing can be achieved, and the phenomenon that the load on one Broker node is overlarge is avoided.
In the present disclosure, the mutual terms related to the message middleware AMQP need to be described include:
the Message middleware (Advanced Message Queuing Protocol, AMQP for short) is an application layer standard Advanced Message queue Protocol for providing unified Message service, is an open standard of the application layer Protocol, and is designed for a Message-oriented middleware. The client and the message middleware based on the protocol can transfer messages and are not limited by conditions of different products, different development languages and the like of the client/middleware.
A Virtual Host (Vhost, also referred to as Virtual Host) refers to a collection of switches, message queues, and related objects. The virtual hosts are independent server domains sharing the same authentication and encryption environment, and one client can select one virtual host after logging in to the server by using a related application program.
The Producer (i.e., the Producer referred to in the background, in english name: producer) is a client application that issues messages to the switch.
A Consumer (i.e., a Consumer referred to in the background, in english, the name: consumer) refers to a client application that requests messages from a message queue.
The Server (i.e. the Server mentioned in the background art, the name of english is Server) is a process for receiving the connection of the client and implementing the AMQP message queue and routing function.
Client (English name: client): AMQP connection or initiator of session. AMQP is asymmetric, with clients producing and consuming messages that the server stores and routes.
Exchanger (English name: exchange): and the entity in the server is used for receiving the messages sent by the producer and routing the messages to the queue in the server.
Channel (English name: channel): a separate bi-directional data stream channel in the multiplex connection. A physical transmission medium is provided for the session.
Furthermore, it can be understood that the cluster load balancing method based on the message middleware AOP of the present disclosure also needs the AMQP message transmission protocol to solve the following problems:
first, broker node redirection problem: in the related art, one virtual host (Vhost) corresponds to one Broker node, and in the technical solution of the present disclosure, one virtual host (Vhost) corresponds to a plurality of Broker nodes.
Second, the problem of single channel usage multi-topic: in the prior art, the message transmission protocol allows the client to use multiple themes in a single channel, i.e. the single channel is likely to be connected to multiple Broker nodes to send requests.
In an exemplary embodiment of the present disclosure, the information depositing step of the present disclosure may further include: after all the switches under the same virtual host are respectively stored on different Broker nodes, the queue bound with the switch is stored on the Broker node stored by the switch.
Therefore, the queues can be effectively stored on the corresponding Broker nodes, and the one-to-one correspondence among the queues, the switches bound with the queues, and the Broker nodes storing the queues and the switches can be ensured. Therefore, on one hand, an association relation exists among the queues, the exchangers and the corresponding Broker nodes, and on the other hand, the problem of information loss during storage can be avoided to a certain extent.
In an exemplary embodiment of the disclosure, in the information storing step of the disclosure, all switches under the same virtual host can be uniformly stored on different Broker nodes.
Therefore, under the condition of huge message throughput, all the Broker nodes can bear the pressure of the service traffic more uniformly, and the load is shared more uniformly among all the Broker nodes.
In an exemplary embodiment of the disclosure, in the information storing step of the disclosure, the storing rule of the exchanger is: all exchangers are uniformly stored on different Broker nodes after hash (hash) calculation.
Thus, using hash calculations ensures that all switches are uniformly stored on different Broker nodes. For example, a consistent hash (hash) algorithm, which is an improved version of a common modulo hash algorithm, may be selected, and the function calculation method of the consistent hash algorithm is not changed, but a ring-shaped hash space is constructed instead of a common linear hash space, because each node in the distributed system may fail and a new node may be added in the dynamic state, the consistent hash algorithm may be used to ensure the consistency of the system.
In an exemplary embodiment of the present disclosure, the generating of the correspondence relationship of the present disclosure includes: and generating a corresponding relation between the name of the switch and the Broker node stored in the switch by using the name of the switch.
Therefore, the switch can generate unique and simple corresponding relation with the Broker node stored in the switch, and the client can quickly and quasi-group forward the access request to the corresponding Broker node when requesting to access a certain Broker node, so that the network interaction time is reduced, and the system efficiency is improved.
In an exemplary embodiment of the present disclosure, the manner of generating the correspondence between the switch and the Broker node stored in the switch of the present disclosure is as follows: generating an index value between the name of the exchanger and a Broker node stored in the exchanger by using the name of the exchanger and a mode of taking the remainder of n through a hash function;
wherein n is the number of the split virtual hosts in the step of splitting the virtual hosts.
Therefore, all the exchangers can accurately form unique corresponding relation with the Broker node, the exchanger can use the Hash remainder algorithm to be very simple, and the system operation efficiency can be effectively improved.
In an exemplary embodiment of the present disclosure, the method for cluster load balancing based on message middleware AOP of the present disclosure further includes a step of storing a correspondence, where the storing a correspondence includes: after the generating the correspondence step is completed, storing the correspondence obtained through the generating the correspondence step at an agent layer.
Therefore, the generated corresponding relation is stored in the agent layer, so that the agent layer can conveniently and quickly analyze the corresponding relation between the exchanger (or the queue) and the Broker node, and can quickly forward the information requested to be accessed to the corresponding Broker node to quickly finish the work.
In an exemplary embodiment of the disclosure, in the forwarding request step of the disclosure, when the client requests to access a certain switch and/or queue, the proxy layer first resolves the corresponding relationship between the switch and the Broker node, and then forwards the request to the corresponding Broker node to complete the request operation.
In an exemplary embodiment of the present disclosure, the splitting the virtual host step of the present disclosure may further include: and respectively splitting the virtual hosts into a plurality of virtual hosts at the agent layer, and respectively storing the virtual hosts on different Broker nodes.
Therefore, the cluster load balancing method based on the message middleware AOP can enable a plurality of virtual hosts to be split into a plurality of virtual hosts, and is beneficial to realizing the effect of load balancing of all Broker nodes corresponding to all the virtual hosts under the whole cluster.
In an exemplary embodiment of the present disclosure, in the forwarding request step of the present disclosure, the client accesses the cluster through a proxy layer.
As shown in fig. 2, a specific embodiment is taken as an example, that is, a client sends a request, where the request includes a flow that requires to access three queues, and a flow aspect of the cluster load balancing method based on the message middleware AOP according to the present disclosure is described. It should be understood, however, that this example is only an exemplary embodiment, is for the purpose of facilitating understanding, is not intended to limit the technical solutions of the present disclosure, and is not intended to be the only embodiment of the present disclosure.
First, in a first step, assuming that a virtual host (vhost) is split into three, the three split virtual hosts are named: the system comprises a first virtual sub-host vhost1, a second virtual sub-host vhost2 and a third virtual sub-host vhost3, wherein the first virtual sub-host vhost1, the second virtual sub-host vhost2 and the third virtual sub-host vhost3 are respectively stored on a first node Broker1, a second node Broker2 and a third node Broker 3.
A second step, assuming that there are three switches and the three switches are named as a first switch E1, a second switch E2 and a third switch E3, respectively, using the names of the first switches (e.g., E1, E2 and E3), and storing the obtained index values (i.e., the above-mentioned corresponding relationship) on the corresponding first node Broker1, second node Broker2 and third node Broker3 through an algorithm of hashing function to balance 3; meanwhile, the first queue q1, the second queue q2 and the third queue q3 corresponding to the three switches are stored on the corresponding Broker nodes following the bound switches, and the agent layer simultaneously stores the corresponding relationship between the switches and the Broker nodes.
And thirdly, the client accesses the cluster through the agent layer, and when a certain exchanger or queue needs to be accessed, the agent layer forwards the access request to the corresponding Broker node by using the corresponding relation between the exchanger and the Broker node to complete the request operation.
It can be understood that the present disclosure is directed to a service system, in a usage scenario where traffic is concentrated on one or more virtual hosts, mapping the virtual host into a plurality of virtual hosts and dispersing the virtual hosts in a plurality of Broker nodes, so that the whole message middleware cluster can achieve the effect of balance of liabilities.
According to a second aspect of the present disclosure, there is further provided a cluster load balancing system based on message middleware AOP, where the cluster load balancing method based on message middleware AOP in the first aspect is applied to any cluster load balancing system based on message middleware AOP, and the system includes at least one client, an agent layer and a plurality of Broker nodes;
the client is used for sending information requesting access to the agent layer;
and the agent layer analyzes the corresponding relation according to the information to obtain the Broker node which is requested to be accessed, and forwards the request to the corresponding Broker node.
Thus, through the cluster load balancing system based on the message middleware AOP disclosed by the present disclosure, in a usage scenario where traffic of a service system is concentrated on one or more virtual hosts, a virtual host (Vhost) can be disassembled (mapped) into a plurality of virtual hosts, and the virtual hosts are dispersed on different Broker nodes, and all switches under the same virtual host are respectively stored on different Broker nodes, so that not only can a series of protocol compatibility problems be solved, but also more importantly, the load borne by each Broker node can be balanced, so that traffic can be dispersed on a plurality of Broker nodes under a condition of large message throughput, and a plurality of Broker nodes can bear the load, thereby achieving the effect of balancing the load of the whole message middleware cluster, and being beneficial to avoiding an overlarge load on a certain Broker node.
According to a third aspect of the present disclosure, there is also provided a cluster to which the message middleware AOP-based cluster load balancing method in the first aspect of the present disclosure is applied, where the cluster includes a plurality of clients.
Thus, the load of the cluster with the message middleware can be evenly distributed to a plurality of Broker nodes, and the overload on a certain Broker node can be avoided.
According to a fourth aspect of the present disclosure, there is also provided a computer program product containing instructions which, when run on a computer, make the computer perform the message middleware AOP based cluster load balancing method in the present disclosure.
According to a fifth aspect of the present disclosure, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the message middleware AOP-based cluster load balancing method in the present disclosure.
The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a register, a hard disk, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, any suitable combination of the above, or any other form of computer readable storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuit (ASIC). In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
In the embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In the present disclosure, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Furthermore, any combination between various embodiments of the disclosure may be made without departing from the spirit thereof, which is also to be considered as disclosed herein, and although the subject matter has been described in language specific to method logic acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A cluster load balancing method based on message middleware AOP is characterized by comprising the following steps:
splitting the virtual host: splitting the virtual host into a plurality of virtual hosts at an agent layer, and storing the virtual hosts on different Broker nodes respectively;
information storage: storing all switches under the same virtual host on different Broker nodes respectively;
generating a corresponding relation: setting a corresponding relation between the exchanger and the Broker node stored in the exchanger;
forwarding the request: and after receiving the access request, forwarding the request to the corresponding Broker node.
2. The message middleware AOP-based cluster load balancing method according to claim 1, wherein said information storing step further comprises:
after all the switches under the same virtual host are respectively stored on different Broker nodes, the queue bound with the switch is stored on the Broker node stored by the switch.
3. The message middleware AOP-based cluster load balancing method according to claim 1,
in the information storage step, all the switches under the same virtual host are uniformly stored on different Broker nodes.
4. The message middleware AOP-based cluster load balancing method according to claim 1, wherein in the information storing step, the storing rule of the switch is:
all exchangers are uniformly stored on different Broker nodes after hash calculation.
5. The message middleware AOP-based cluster load balancing method according to claim 1, characterized in that said step of generating correspondences comprises:
and generating a corresponding relation between the name of the switch and the Broker node stored in the switch by using the name of the switch.
6. The message middleware AOP-based cluster load balancing method of claim 5, wherein the manner of generating the corresponding relationship between the switch and the Broker node stored in the switch is as follows:
generating an index value between the name of the exchanger and a Broker node stored in the exchanger by using the name of the exchanger and a mode of taking the remainder of n through a hash function;
wherein n is the number of the split virtual hosts in the step of splitting the virtual hosts.
7. The message middleware AOP-based cluster load balancing method according to claim 1, further comprising a correspondence storing step, wherein the correspondence storing step comprises:
after the generating the correspondence step is completed, storing the correspondence obtained through the generating the correspondence step at an agent layer.
8. The method for cluster load balancing based on message middleware AOP as claimed in claim 1, wherein in the step of forwarding request, when the client requests to access a certain switch and/or queue, the agent layer firstly resolves the corresponding relationship between the switch and the Broker node, and then forwards the request to the corresponding Broker node to complete the request operation.
9. The message middleware AOP-based cluster load balancing method according to any one of claims 1 to 8, wherein in the step of splitting virtual hosts, further comprising: and respectively splitting the virtual hosts into a plurality of virtual hosts at the agent layer, and respectively storing the virtual hosts on different Broker nodes.
10. The message middleware AOP-based cluster load balancing method according to any of claims 1 to 8, wherein in the step of forwarding the request, the client accesses the cluster through a proxy layer.
CN202211518405.5A 2022-11-30 2022-11-30 Cluster load balancing method based on message middleware AOP Pending CN115883560A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211518405.5A CN115883560A (en) 2022-11-30 2022-11-30 Cluster load balancing method based on message middleware AOP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211518405.5A CN115883560A (en) 2022-11-30 2022-11-30 Cluster load balancing method based on message middleware AOP

Publications (1)

Publication Number Publication Date
CN115883560A true CN115883560A (en) 2023-03-31

Family

ID=85764862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211518405.5A Pending CN115883560A (en) 2022-11-30 2022-11-30 Cluster load balancing method based on message middleware AOP

Country Status (1)

Country Link
CN (1) CN115883560A (en)

Similar Documents

Publication Publication Date Title
US11036669B2 (en) Scalable direct inter-node communication over peripheral component interconnect-express (PCIe)
US10545914B2 (en) Distributed object storage
US20220318184A1 (en) Virtual rdma switching for containerized applications
US8954992B2 (en) Distributed and scaled-out network switch and packet processing
CN111034160B (en) non-DSR distributed load balancer with virtual VIP and source agent over load balancing connection
US20160119421A1 (en) Methods and systems for accessing virtual storage servers in a clustered environment
AU2021269201B2 (en) Utilizing coherently attached interfaces in a network stack framework
US11064021B2 (en) Method, device and computer program product for managing network system
CN108200018B (en) Flow forwarding method and equipment, computer equipment and readable medium in cloud computing
KR100834361B1 (en) Effiviently supporting multiple native network protocol implementations in a single system
US11108686B1 (en) Port allocation at distributed network address translators
JP2023545985A (en) Managing task flows in edge computing environments
EP4145792B1 (en) Resource publishing method and apparatus, gateway, cloud platform and computer storage medium
CN113765801B (en) Message processing method and device applied to data center, electronic equipment and medium
CN115883560A (en) Cluster load balancing method based on message middleware AOP
CN112804366A (en) Method and device for resolving domain name
Ekane et al. Networking in next generation disaggregated datacenters
JP2024523990A (en) Hardware Accelerator Service Aggregation
EP4323872A1 (en) Hardware accelerator service aggregation

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