CN112350973A - Remote procedure call load balancing method and device and data processing system - Google Patents

Remote procedure call load balancing method and device and data processing system Download PDF

Info

Publication number
CN112350973A
CN112350973A CN201910723986.8A CN201910723986A CN112350973A CN 112350973 A CN112350973 A CN 112350973A CN 201910723986 A CN201910723986 A CN 201910723986A CN 112350973 A CN112350973 A CN 112350973A
Authority
CN
China
Prior art keywords
connection
rpc
client
service instance
target 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
CN201910723986.8A
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.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya 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 Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN201910723986.8A priority Critical patent/CN112350973A/en
Publication of CN112350973A publication Critical patent/CN112350973A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a remote procedure call load balancing method and device and a data processing system. In detail, in the embodiment of the application, when the server system receives an RPC connection request sent by a client, a target service instance corresponding to the RPC connection request is determined. Then, establishing an RPC connection between the client and the target service instance, wherein the RPC connection is a long connection. And finally, when the RPC connection time reaches the corresponding connection time threshold, disconnecting the RPC connection between the client and the target service instance, so that the client initiates a new RPC connection request. Therefore, in a long-connection remote procedure call connection scene, when the RPC connection duration reaches a certain connection duration threshold, the server-side system actively disconnects the RPC connection, so that the client re-initiates the RPC connection request, and load balance of long connection is realized when the newly established RPC connection is subjected to balanced distribution.

Description

Remote procedure call load balancing method and device and data processing system
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and an apparatus for load balancing for remote procedure call, and a data processing system.
Background
With the development of network technology, many network services may be deployed on a common cloud system in the form of micro services, and the micro services may be interconnected by establishing Remote Procedure Call (RPC) connections.
In order to implement traffic load balancing for microservices, some public cloud systems provide a connection-based load balancer that implements traffic load balancing by balancing the number of connections. However, for a long connection that is maintained for a long time after establishment, the load balancer cannot achieve load balancing based on the connection, so that such a public cloud system cannot achieve traffic load balancing of the micro-service that employs the long-connection RPC.
Disclosure of Invention
In order to overcome at least one of the deficiencies in the prior art, an object of the present application is to provide a remote procedure call load balancing method applied to a server-side system, the server-side system including a plurality of service instances of remote procedure call RPC protocol, the method including:
receiving an RPC connection request sent by a client;
determining a target service instance corresponding to the RPC connection request;
establishing RPC connection between the client and the target service instance, wherein the RPC connection is long connection;
and when the RPC connection time reaches the corresponding connection time threshold, disconnecting the RPC connection between the client and the target service instance, so that the client initiates a new RPC connection request.
Another objective of the present application is to provide a remote procedure call load balancing method, applied to a data processing system, where the data processing system includes a server system and a client of an RPC protocol, and the server system includes a plurality of service instances of the RPC protocol; the method comprises the following steps:
the server-side system receives an RPC connection request sent by a client;
determining a target service instance corresponding to the RPC connection request in the service end system;
establishing RPC connection between the client and the target service instance, wherein the RPC connection is long connection;
when the RPC connection time reaches the corresponding connection time threshold, disconnecting the RPC connection between the client and the target service instance;
and the client reinitiates a new RPC connection request after detecting that the RPC connection is disconnected.
Another object of the present application is to provide a remote procedure call load balancing apparatus, which is applied to a server system, the server system includes a plurality of service instances of remote procedure call RPC protocol, the apparatus includes:
the request receiving module is used for receiving an RPC connection request sent by a client;
the instance determining module is used for determining a target service instance corresponding to the RPC connection request;
the connection establishing module is used for establishing RPC connection between the client and the target service instance, wherein the RPC connection is long connection;
and the connection disconnection module is used for disconnecting the RPC connection between the client and the target service instance when the RPC connection duration reaches the corresponding connection duration threshold value, so that the client initiates a new RPC connection request.
Another object of the present application is to provide a data processing system, comprising a server-side system and a client of an RPC protocol, wherein the server-side system comprises a plurality of service instances of the RPC protocol;
the server-side system receives an RPC connection request sent by a client; determining a target service instance corresponding to the RPC connection request in the service end system; establishing RPC connection between the client and the target service instance, wherein the RPC connection is long connection; when the RPC connection time reaches the corresponding connection time threshold, disconnecting the RPC connection between the client and the target service instance;
and the client reinitiates a new RPC connection request after detecting that the RPC connection is disconnected.
Compared with the prior art, the method has the following beneficial effects:
according to the remote procedure call load balancing method, the remote procedure call load balancing device and the remote procedure call load balancing data processing system, in a long-connection-type remote procedure call connection scene, when the RPC connection duration reaches a certain connection duration threshold value, the RPC connection is actively disconnected by the server system, so that a client-side re-initiates an RPC connection request, and load balancing of long connection is achieved when balance distribution is conducted on newly established RPC connection.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is an interaction diagram of a server-side system according to a first embodiment of the present application;
fig. 2 is a schematic flowchart of a remote procedure call load balancing method according to a first embodiment of the present application;
fig. 3 is a schematic flowchart of a remote procedure call load balancing method according to a second embodiment of the present application;
fig. 4 is a functional block diagram of a remote procedure call load balancing apparatus according to a third embodiment of the present application.
Icon: 1-a data processing system; 10-a service end system; 410-remote procedure call load balancing means; 411-request receiving module; 412-instance determination module; 413-connection establishment module; 414-connect disconnect module; 100-service instance; 300-client.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The short connection is a connection with relatively short existence time, the short connection is disconnected by four-way handshake message interaction after the client and the service instance finish one-time data packet transmission, and the short connection can be established by three-way handshake message interaction when the data packet transmission is needed next time.
A long connection is a connection that has a relatively long lifetime and is maintained continuously after the long connection is established between the client and the service instance, through which the client and the service instance may perform multiple data packet transmissions.
A connection-based load balancing scheme may be generally used in a short connection scenario, where a certain policy balancing policy manages the establishment process of a short connection to distribute connections evenly among multiple service instances. Although the data volume transmitted by each short connection is different, the short connection is disconnected after one-time data packet transmission is completed, and load balance of the flow of a plurality of service instances can be basically realized by continuously balancing and distributing the connection quantity of the plurality of service instances.
However, for a long connection, although the number of connections of multiple service instances can also be balanced in the connection establishment phase, since the long connection is maintained for a long time once the connection is established, the traffic load balance of the service instances cannot be realized by means of balanced distribution of the connection.
For example, although the number of connections on each service instance is balanced, if the traffic of long connections on individual service instances is large and the traffic of long connections on other service instances is small, the traffic load of individual service instances is significantly larger than the traffic load of other service instances. However, due to the characteristic that long connections are continuously maintained, the load balancer cannot adjust the long connection allocation of each service instance, and cannot realize load balancing.
For another example, when a service instance is started earlier and releases a service to the outside, a large number of clients will establish long connections with the service instance of the earlier released service first, and the number of clients that may be connected with the service instance started later or expanded later is small. However, due to the continuous maintaining characteristic of long connections, the load balancer cannot adjust the long connection allocation of each service instance, and cannot realize load balancing.
In view of this, the present embodiment provides a method and an apparatus for load balancing of remote procedure call connections of long connections, and the scheme is explained in detail below.
First embodiment
Referring to fig. 1, fig. 1 is an interaction diagram of a server system 10 and at least one client 300 according to an embodiment of the present disclosure, where the server system 10 and the at least one client 300 together form a data processing system 1. The server-side system 10 may include a plurality of service instances 100, and the server-side system 10 may include a server running the RPC protocol, and the server may run on the plurality of service instances 100 of the server-side system 10. In this embodiment, the server may provide a first micro service deployed on the server-side system 10, and the client 300 may be a second micro service that needs to remotely invoke the service instance 100.
In another example, the server-side system 10 may also be a cluster composed of a plurality of data processing devices, and the plurality of service instances 100 may be different data processing devices in the cluster, respectively. In another example, the server-side system 10 may also be an independent data processing device, and the plurality of service instances 100 may be relatively independent service processes on the data processing device.
Referring to fig. 2, fig. 2 is a diagram illustrating a remote procedure call load balancing method applied to the server-side system 10 shown in fig. 1 in the first embodiment, and the steps of the method are described in detail below.
Step S210, receiving the RPC connection request sent by the client 300.
In this embodiment, the server-side system 10 may receive the RPC connection request sent by the client 300. The RPC connection request may be a long-connection RPC connection request, such as a connection request of GRPC (*** RPC) provided by ***, which is an http 2-based RPC scheme provided by ***.
Step S220, determine a target service instance 100 corresponding to the RPC connection request.
In one example, the client 300 is configured with a plurality of communication channels for sending RPC connection requests, and the server-side system 10 may record service instances 100 corresponding to different communication channels. The client 300 selects different communication channels to send each time the RPC connection request is sent, and the server system 10 determines the service instance 100 corresponding to the target communication channel as the target service instance 100 according to the target communication channel for receiving the RPC connection request.
For example, in this embodiment, the Server system 10 may be a system deployed on Amazon Web Server (AWS) public cloud, and the Server system 10 has a Network Load Balancing (NLB) function provided by the AWS public cloud, and the NLB function may determine the corresponding target service instance 100 according to a communication channel through which the client 300 sends the RPC connection request.
In this way, by using different communication channels when the client initiates an RPC connection request each time, it is possible to avoid that the same client always establishes an RPC connection with the same service instance, that is, load balancing allocation is achieved by selecting a communication channel on the client side.
In another example, the server system 10 itself may also determine, through a connection-based load balancing mechanism, a target service instance 100 corresponding to the RPC connection request from among the plurality of RPC service instances 100. For example, the service end system 10 may select the target service instance 100 in the following three ways:
1) after receiving an RPC connection request, randomly selecting one of the service instances 100 as the target service instance 100; 2) performing Hash (Hash) calculation according to the initiation time of the RPC connection request, and determining a target service instance 100 in the plurality of service instances 100 according to the obtained Hash value; 3) and according to the current connection number of the service instances 100, selecting the service instance 100 with the least connection number as the target service instance 100, and the like.
Step S230, establishing an RPC connection between the client 300 and the target service instance 100.
After determining the target service instance 100, an RPC connection between the client 300 and the target service instance 100 may be established, so that the client 300 may remotely call the service provided by the target service instance 100.
Step S240, when the RPC connection time reaches the corresponding connection time threshold, the RPC connection between the client 300 and the target service instance 100 is disconnected, so that the client 300 initiates a new RPC connection request.
In this embodiment, since the requirement of the RPC connection for continuous data transmission is not particularly high, the server system 10 may be allowed to send a new RPC connection request to the server system 10 by the client 300 again to establish a new RPC connection after disconnecting the RPC connection between the client 300 and the target service instance 100. The server system 10 determines a new target service instance 100 according to the new RPC connection request, and establishes an RPC connection between the client 300 and the new target service instance 100.
Thus, by means of regularly disconnecting the long connection, when a new RPC connection is established, the connection-based load balancing mechanism of the server system 10 may play a role, and load balancing allocation is performed for the new RPC connection, so that the newly determined target service instance 100 may be different from the original target service instance 100, thereby realizing load balancing of the long connection.
For example, in this embodiment, after the client X with a large data traffic establishes the RPC long connection with the service instance a, the service instance a starts timing, and when the timing reaches the connection duration threshold, disconnects the RPC connection with the client X. After the RPC connection is disconnected, the client X can initiate a new RPC request to the server system again. At this time, according to the load balancing mechanism of the client X itself or the load balancing mechanism of the server system, the client X and the service instance B can establish the RPC connection. Therefore, even in a scene using long connection, the client X with large data traffic can be prevented from always maintaining RPC connection with a certain service instance, and the problem of unbalanced load of the service instance caused by the difference of the data traffic of the client is avoided.
As another example, when service instance A starts and publishes a service before service instance B, C, D, a large number of clients may first establish RPC long connections with service instance A. In this embodiment, for each RPC connection, when the timing reaches the corresponding connection duration threshold, the service instance a disconnects the corresponding RPC connection. After the RPC connection is disconnected, the clients may initiate new RPC requests to the server system again, and at this time, the clients may be allocated to establish RPC connections with the service instance A, B, C, D in a balanced manner according to their own load balancing mechanisms or the load balancing mechanism of the server system. Therefore, the problem of unbalanced load of the service instances caused by overlarge difference of RPC connection quantity maintained by each service instance in the situation that the service instances are different in starting time or the service instances are expanded in a long connection scene can be solved.
Optionally, in this embodiment, when the RPC connection between the client 300 and the target service instance 100 is established, the service end system 10 may determine a corresponding connection duration threshold for the RPC connection within a preset connection duration interval, and then disconnect the RPC connection according to the connection duration threshold in step S240.
Thus, after a plurality of clients 300 simultaneously initiate RPC connection requests to a certain service instance 100, different connection duration thresholds can be set for the RPC connections of the clients 300, which can prevent the RPC connections of the clients 300 from being disconnected simultaneously and then re-initiating the RPC connection requests simultaneously, thereby avoiding complete interruption of services and reducing the concurrency impact on the service end system 10.
Optionally, in the foregoing manner, when determining the corresponding connection duration threshold for the RPC connection, the server system 10 may randomly determine the corresponding connection duration threshold for the RPC connection within a preset connection duration interval, so as to avoid that the connection duration thresholds set for different RPC connections are the same.
Optionally, in the above manner, the server-side system 10 may record preset connection duration intervals corresponding to different service types in advance. The server-side system 10 may obtain the service type corresponding to the RPC connection request received in step S210, and then determine a connection duration threshold for the RPC connection within a preset connection duration interval corresponding to the service type.
In this embodiment, the action of the server that regularly disconnects the RPC connection and the server that selects a communication channel in multiple channels to send the action of the RPC connection request are packaged into a GRPC load balancing library through Java annotation technology and Spring framework, the client and the server can realize utilizing the GRPC load balancing scheme based on the AWS NLB by introducing a small amount of annotations in the framework, the service intrusion is less, and the development of service developers is facilitated.
Second embodiment
Referring to fig. 3, a flow chart of a remote procedure call load balancing method applied to a data processing system 1 according to a second embodiment is shown, where the data processing system 1 may include the server system 10 and the client 300 shown in fig. 1. The method may include the following steps.
In step S310, the server-side system 10 receives the RPC connection request sent by the client 300.
In step S320, the server-side system 10 determines a target service instance corresponding to the RPC connection request in the server-side system 10.
In step S330, the server-side system 10 establishes an RPC connection between the client 300 and the target service instance, where the RPC connection is a long connection.
Step S340, when the RPC connection duration reaches the corresponding connection duration threshold, the service end system 10 disconnects the RPC connection between the client and the target service instance.
In step S350, the client 300 initiates a new RPC connection request to the server-side system 10 after detecting that the RPC connection is disconnected.
For the detailed processes of the steps S310, S320, S330, S340 and S350, reference is made to the descriptions of the steps S210, S230 and S240 in the first embodiment, which are not repeated herein.
Third embodiment
Referring to fig. 4, the present embodiment provides a remote procedure call load balancing apparatus 410 applied to the server system 10 shown in fig. 1, where the remote procedure call load balancing apparatus 410 may include a request receiving module 411, an instance determining module 412, a connection establishing module 413, and a connection disconnecting module 414.
The request receiving module 411 is configured to receive an RPC connection request sent by the client 300.
In this embodiment, the request receiving module 411 may be configured to execute step S210 shown in fig. 2, and reference may be made to the description of step S210 for a detailed description of the request receiving module 411.
The illustrated instance determination module 412 determines a target service instance 100 corresponding to the RPC connection request.
In this embodiment, the instance determining module 412 may be configured to execute the step S220 shown in fig. 2, and the detailed description about the instance determining module 412 may refer to the description about the step S220.
The connection establishment module 413 is configured to establish an RPC connection between the client 300 and the target service instance 100, where the RPC connection is a long connection.
In this embodiment, the connection establishing module 413 may be configured to execute the step S230 shown in fig. 2, and the detailed description about the connection establishing module 413 may refer to the description about the step S230.
The disconnection module 414 is configured to disconnect the RPC connection between the client 300 and the target service instance 100 when the RPC connection duration reaches the corresponding connection duration threshold, so that the client 300 initiates a new RPC connection request.
In this embodiment, the disconnection module 414 may be configured to execute step S240 shown in fig. 2, and reference may be made to the description of step S240 for a detailed description of the disconnection module 414.
To sum up, the remote procedure call load balancing method and device provided by the application have the advantages that in a long-connection-form remote procedure call connection scene, the RPC connection is actively disconnected by the server system when the RPC connection duration reaches a certain connection duration threshold, so that the client re-initiates the RPC connection request, and therefore load balancing of long connection is realized when balance distribution is carried out on newly established RPC connection.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only for various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A remote procedure call load balancing method is applied to a server-side system, the server-side system comprises a plurality of service instances of Remote Procedure Call (RPC) protocol, and the method comprises the following steps:
receiving an RPC connection request sent by a client;
determining a target service instance corresponding to the RPC connection request;
establishing RPC connection between the client and the target service instance, wherein the RPC connection is long connection;
and when the RPC connection time reaches the corresponding connection time threshold, disconnecting the RPC connection between the client and the target service instance, so that the client initiates a new RPC connection request.
2. The method of claim 1, wherein the client is configured with a plurality of communication channels for sending RPC connection requests, and the server-side system records service instances corresponding to different communication channels; the step of determining a target service instance corresponding to the RPC connection request includes:
and determining the service instance corresponding to the target communication channel as the target service instance according to the target communication channel for receiving the RPC connection request.
3. The method of claim 1, wherein the step of determining a target service instance corresponding to the RPC connection request comprises:
and determining a target service instance corresponding to the RPC connection request in a plurality of service instances through a mechanism based on connection load balancing.
4. The method of claim 3, wherein the determining the target service instance corresponding to the RPC connection request among the plurality of service instances through the connection load balancing based mechanism comprises:
after an RPC connection request is received, randomly selecting one of the service instances as the target service instance;
performing hash calculation according to the initiation time of the RPC connection request, and determining a target service instance in the plurality of service instances according to the obtained hash value; or
And selecting the service instance with the minimum connection number as the target service instance according to the current connection number of the plurality of service instances.
5. The method of claim 1, further comprising:
when the RPC connection between the client and the target service instance is established, a connection duration threshold value is determined for the RPC connection in a preset connection duration interval.
6. The method of claim 5, wherein the step of determining a corresponding connection duration threshold for the RPC connection within a predetermined connection duration interval comprises:
and randomly determining a connection duration threshold value for the RPC connection within a preset connection duration interval.
7. The method according to claim 5, wherein the server-side system records preset connection duration intervals corresponding to different service types in advance; the step of randomly determining a connection duration threshold for the RPC connection within a preset connection duration interval comprises the following steps:
acquiring a service type corresponding to the RPC connection request;
and determining a connection duration threshold value for the RPC connection in a preset connection duration interval corresponding to the service type.
8. A remote procedure call load balancing method is characterized by being applied to a data processing system, wherein the data processing system comprises a service end system and a client side of an RPC protocol, and the service end system comprises a plurality of service instances of the RPC protocol; the method comprises the following steps:
the server-side system receives an RPC connection request sent by a client;
the server-side system determines a target service instance corresponding to the RPC connection request in the server-side system;
the server-side system establishes RPC connection between the client and the target service instance, wherein the RPC connection is long connection;
when the RPC connection time reaches the corresponding connection time threshold, the server-side system disconnects the RPC connection between the client and the target service instance;
and the client initiates a new RPC connection request to the server side system after detecting that the RPC connection is disconnected.
9. A remote procedure call load balancing apparatus applied to a server-side system including a plurality of service instances of a Remote Procedure Call (RPC) protocol, the apparatus comprising:
the request receiving module is used for receiving an RPC connection request sent by a client;
the instance determining module is used for determining a target service instance corresponding to the RPC connection request;
the connection establishing module is used for establishing RPC connection between the client and the target service instance, wherein the RPC connection is long connection;
and the connection disconnection module is used for disconnecting the RPC connection between the client and the target service instance when the RPC connection duration reaches the corresponding connection duration threshold value, so that the client initiates a new RPC connection request.
10. A data processing system is characterized by comprising a server-side system and a client of an RPC protocol, wherein the server-side system comprises a plurality of service instances of the RPC protocol;
the server-side system receives an RPC connection request sent by a client; determining a target service instance corresponding to the RPC connection request in the service end system; establishing RPC connection between the client and the target service instance, wherein the RPC connection is long connection; when the RPC connection time reaches the corresponding connection time threshold, disconnecting the RPC connection between the client and the target service instance;
and the client reinitiates a new RPC connection request after detecting that the RPC connection is disconnected.
CN201910723986.8A 2019-08-07 2019-08-07 Remote procedure call load balancing method and device and data processing system Pending CN112350973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910723986.8A CN112350973A (en) 2019-08-07 2019-08-07 Remote procedure call load balancing method and device and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910723986.8A CN112350973A (en) 2019-08-07 2019-08-07 Remote procedure call load balancing method and device and data processing system

Publications (1)

Publication Number Publication Date
CN112350973A true CN112350973A (en) 2021-02-09

Family

ID=74366448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910723986.8A Pending CN112350973A (en) 2019-08-07 2019-08-07 Remote procedure call load balancing method and device and data processing system

Country Status (1)

Country Link
CN (1) CN112350973A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220491A (en) * 2021-07-07 2021-08-06 中邮消费金融有限公司 Remote call self-adaptive load balancing method, device and system and computer equipment
CN114928596A (en) * 2022-04-20 2022-08-19 上海昱极科技有限公司 Data transmission method and device in micro-service communication process
WO2023045363A1 (en) * 2021-09-23 2023-03-30 中兴通讯股份有限公司 Conference message pushing method, conference server, and electronic device
WO2023142699A1 (en) * 2022-01-26 2023-08-03 华为技术有限公司 Communication method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795289A (en) * 2009-12-30 2010-08-04 华为技术有限公司 Method, device and system for remote procedure call control
CN105677451A (en) * 2014-11-18 2016-06-15 北京风行在线技术有限公司 Load balancing method and equipment used for multiple processes
CN106533845A (en) * 2016-12-27 2017-03-22 海尔优家智能科技(北京)有限公司 Long-connection state monitoring method and device
CN107979653A (en) * 2018-01-16 2018-05-01 北京小米移动软件有限公司 Load-balancing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795289A (en) * 2009-12-30 2010-08-04 华为技术有限公司 Method, device and system for remote procedure call control
CN105677451A (en) * 2014-11-18 2016-06-15 北京风行在线技术有限公司 Load balancing method and equipment used for multiple processes
CN106533845A (en) * 2016-12-27 2017-03-22 海尔优家智能科技(北京)有限公司 Long-connection state monitoring method and device
CN107979653A (en) * 2018-01-16 2018-05-01 北京小米移动软件有限公司 Load-balancing method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220491A (en) * 2021-07-07 2021-08-06 中邮消费金融有限公司 Remote call self-adaptive load balancing method, device and system and computer equipment
CN113220491B (en) * 2021-07-07 2021-10-29 中邮消费金融有限公司 Remote call self-adaptive load balancing method, device and system and computer equipment
WO2023045363A1 (en) * 2021-09-23 2023-03-30 中兴通讯股份有限公司 Conference message pushing method, conference server, and electronic device
WO2023142699A1 (en) * 2022-01-26 2023-08-03 华为技术有限公司 Communication method and apparatus
CN114928596A (en) * 2022-04-20 2022-08-19 上海昱极科技有限公司 Data transmission method and device in micro-service communication process

Similar Documents

Publication Publication Date Title
CN112350973A (en) Remote procedure call load balancing method and device and data processing system
US11284126B2 (en) Method and system for streaming media live broadcast
CN108173774B (en) Client upgrading method and system
CN110868465A (en) Load balancing system and method for container cloud
EP4011055A1 (en) Methods, apparatuses and computer readable medium for subscriber management with a stateless network architecture in a fifth generation (5g) network
CN112751897B (en) Load balancing method, device, medium and equipment
CN110971506B (en) Decentralized real-time cluster communication method, device, equipment and system
CN116633934A (en) Load balancing method, device, node and storage medium
CN111064742A (en) Method, device and related equipment for realizing intranet access based on network agent
CN106790689B (en) Node recommendation method, server and client based on peer-to-peer network
CN109257448B (en) Session information synchronization method and device, electronic equipment and storage medium
CN112613919A (en) Information processing method and related device
CN110011891B (en) Cross-network service processing method and system
CN103905341A (en) Resource scheduling method, resource scheduling device and resource scheduling system
CN116260824A (en) Service data transmission method, system, storage medium and related equipment
CN111478937B (en) Load balancing method and device
CN112925946B (en) Service data storage method and device and electronic equipment
US7818401B2 (en) Method and apparatus for providing decentralized load distribution
CN111131470B (en) Terminal device, data processing method thereof and data processing system
CN108574615A (en) A kind of content transmission method, equipment and system based on multipath MPTCP
JP6145833B2 (en) Flow control method and apparatus
CN103281395A (en) Data piece equipartition selecting system and method based on number of client-sides
CN107911477B (en) Data communication method, device and system
KR101582802B1 (en) Method for synchronizing data between dds nodes using real-time dbms based on in-memory
EP3274862B1 (en) Method for provisioning and registration of devices

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210209

RJ01 Rejection of invention patent application after publication