CN109600384B - Flow switching method, system, equipment and storage medium in RPC interface upgrading - Google Patents

Flow switching method, system, equipment and storage medium in RPC interface upgrading Download PDF

Info

Publication number
CN109600384B
CN109600384B CN201811625027.4A CN201811625027A CN109600384B CN 109600384 B CN109600384 B CN 109600384B CN 201811625027 A CN201811625027 A CN 201811625027A CN 109600384 B CN109600384 B CN 109600384B
Authority
CN
China
Prior art keywords
rpc interface
interface
flow
rpc
calling
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.)
Active
Application number
CN201811625027.4A
Other languages
Chinese (zh)
Other versions
CN109600384A (en
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.)
Jiangsu Manyun Software Technology Co Ltd
Original Assignee
Jiangsu Manyun Software 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 Jiangsu Manyun Software Technology Co Ltd filed Critical Jiangsu Manyun Software Technology Co Ltd
Priority to CN201811625027.4A priority Critical patent/CN109600384B/en
Publication of CN109600384A publication Critical patent/CN109600384A/en
Application granted granted Critical
Publication of CN109600384B publication Critical patent/CN109600384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a method, a system, equipment and a storage medium for switching flow in RPC interface upgrading, wherein the method is used for switching the flow between a first RPC interface before upgrading and a second RPC interface after upgrading, and comprises the following steps: setting the second RPC interface as an external service interface; when the second RPC interface receives a calling request of a calling party, a preset flow distribution strategy is obtained; and according to a preset flow distribution strategy, distributing the call request of the calling party to the first RPC interface to realize or distributing the call request to the second RPC interface to realize. By adopting the scheme of the invention, when the RPC interface is upgraded, a new RPC interface is provided for a service party to call, the flow is distributed to the new RPC interface and the old RPC interface by adopting a pre-configured distribution strategy, and the flow access of the new RPC interface and the old RPC interface is switched smoothly; when the new RPC interface is abnormal, the new RPC interface can be directly and completely switched to the old RPC interface, and the stable service of remote calling is provided.

Description

Flow switching method, system, equipment and storage medium in RPC interface upgrading
Technical Field
The invention relates to the technical field of remote call control, in particular to a method, a system, equipment and a storage medium for switching flow in RPC interface upgrading.
Background
The RPC interface refers to a Remote Method Invocation interface, namely a Remote Method Invocation interface. Remote Procedure Calls (RPCs) are a protocol that a program can use to request a service from a program on another computer in the network. The RPC protocol improves program interoperability since programs using the RPC protocol do not have to know what the network protocol supporting the communication is. In the RPC interface, the requesting program is the client program and the serving program is the server.
In the business development of companies providing RPC interfaces, the data volume and the traffic volume are increased all the time, and the existing service capability may be lack, so that the service capability is limited. In order to improve the service capacity, the service interface is upgraded and modified, and the service capacity and stability of the service are improved. When the existing RPC interface is upgraded, a calling party generally directly adopts a new RPC interface to replace an old RPC interface, directly carries out online service, and then uses the new interface. The service capabilities for the new interface are too trusted. When the new interface has service abnormality, the old interface cannot be degraded to provide service, and the service of the new interface is in chain abnormality, so that the online service abnormality occurs.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a method, a system, equipment and a storage medium for switching flow in RPC interface upgrading, wherein when the RPC interface is upgraded, a new RPC interface is provided for a service party to call, and flow is allocated to the new RPC interface and an old RPC interface by adopting a pre-configured allocation strategy, so that the calling party is ensured to normally use new interface service.
The embodiment of the invention provides a flow switching method in RPC interface upgrading, which is used for switching flow between a first RPC interface before upgrading and a second RPC interface after upgrading, and comprises the following steps:
setting the second RPC interface as an external service interface;
when the second RPC interface receives a calling request of a calling party, a preset flow distribution strategy is obtained;
and according to a preset flow distribution strategy, distributing the call request of the calling party to the first RPC interface to realize or distributing the call request to the second RPC interface to realize.
Optionally, the setting the second RPC interface as an outbound service interface includes:
and issuing the comparison document of the first RPC interface and the second RPC interface outwards, and issuing the interface access document of the second RPC interface outwards.
Optionally, when the second RPC interface receives a call request of a caller, the method further includes the following steps:
acquiring the flow calling requirement and calling party identification of the calling party;
and monitoring the embedded point of the calling party according to the calling party identification.
Optionally, the method further comprises the steps of:
acquiring flow calling information of the calling party monitored by the buried point at intervals of preset intervals, and judging whether the flow calling of the calling party meets the flow calling requirement of the calling party or not;
and if the first RPC interface is not satisfied, adjusting the flow distribution strategy, and increasing or improving the flow proportion distributed to the first RPC interface within a preset time range.
Optionally, the type of the traffic allocation policy includes a polling policy, and when the preset traffic allocation policy is the polling policy, the call request of the caller is alternately allocated to the first RPC interface and the second RPC interface.
Optionally, the type of the flow allocation policy includes a percentage flow policy, and when the preset flow allocation policy is the percentage flow policy, the call request of the caller is allocated to the first RPC interface or the second RPC interface, so that in a specified time range, a ratio of the request flow realized by the first RPC interface to the request flow realized by the second RPC interface satisfies a preset flow percentage value.
Optionally, the type of the flow allocation policy includes a weighted polling policy, when the preset flow allocation policy is the weighted polling policy, the call request of the caller is allocated to the first RPC interface or the second RPC interface is realized, so that in the specified time range, the ratio of the request flow realized by the first RPC interface to the request flow realized by the second RPC interface is equal to the preset ratio of the weight of the first RPC interface to the weight of the second RPC interface.
Optionally, the method further comprises the steps of:
and when the call service of the second RPC interface is abnormal, all the call requests of all the calling parties are distributed to the first RPC interface.
Optionally, when the call service of the second RPC interface is abnormal, all the call requests of all the calling parties are allocated to the first RPC interface, including the following steps:
and if the number of times of abnormity of the call service of the second RPC interface in a preset time range is greater than a preset threshold value, the flow allocation strategy is invalid, and when the second RPC interface receives the call request of a calling party, all the call requests are allocated to the first RPC interface to be realized.
The embodiment of the invention also provides a flow switching system in the RPC interface upgrading, the system is used for switching the flow between the first RPC interface before the upgrading and the second RPC interface after the upgrading, and the system comprises:
the external service setting module is used for setting the second RPC interface as an external service interface;
the flow distribution strategy acquisition module is used for acquiring a preset flow distribution strategy when the second RPC interface receives a calling request of a calling party;
and the flow distribution strategy execution module is used for distributing the calling request of the calling party to the first RPC interface or the second RPC interface according to a preset flow distribution strategy.
The embodiment of the present invention further provides a flow switching device in an RPC interface upgrade, including:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the flow switching method in the RPC interface upgrade via execution of the executable instructions.
The embodiment of the invention also provides a computer-readable storage medium for storing a program, and the program realizes the steps of the flow switching method in the RPC interface upgrading when being executed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
The method, the system, the equipment and the storage medium for switching the flow in the RPC interface upgrading have the following advantages that:
the invention solves the problems in the prior art, provides a new RPC interface for a service party to call when the RPC interface is upgraded, and adopts a pre-configured allocation strategy to allocate the flow to the new RPC interface and the old RPC interface, and smoothly switches the flow access of the new and old RPC interfaces, thereby ensuring that the calling party normally uses new interface service; when the new RPC interface is abnormal, the new RPC interface can be directly and completely switched to the old RPC interface, and the stable service of remote calling is provided.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings.
FIG. 1 is a flow chart of a flow switching method in an RPC interface upgrade of the present invention;
FIG. 2 is a flow chart of a flow switching method in an RPC interface upgrade according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a flow switching system in an RPC interface upgrade according to an embodiment of the present invention;
FIG. 4 is a diagram of a flow switching device in an RPC interface upgrade according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In order to solve the technical problem, the invention provides a flow switching method in RPC interface upgrading, which is used for switching flow between a first RPC interface before upgrading and a second RPC interface after upgrading. Here, the first RPC interface before the upgrade is an old interface before the upgrade, and the second RPC interface after the upgrade is a new interface after the upgrade. Therefore, the invention realizes the flow switching between the new RPC interface and the old RPC interface.
As shown in fig. 1, the method for switching traffic in RPC interface upgrade includes the following steps:
s100: setting the second RPC interface as an external service interface;
s200: when the second RPC interface receives a calling request of a calling party, a preset flow distribution strategy is obtained;
s300: and according to a preset flow distribution strategy, distributing the call request of the calling party to the first RPC interface to realize or distributing the call request to the second RPC interface to realize.
Therefore, in the method for switching the flow in the RPC interface upgrading, when the RPC interface is upgraded, the upgraded second RPC interface is provided for the service party to call, the flow is distributed to the first RPC interface before upgrading or the upgraded second RPC interface by adopting a pre-configured distribution strategy, the flow access of the new interface and the old interface of the RPC is switched smoothly, the calling party is ensured to use the new interface service normally, and the service abnormity caused by the abnormity of the new interface or the limited bearing capacity after all the services are transferred to the new RPC interface when the RPC interface is upgraded is avoided.
In this embodiment, the setting the second RPC interface as an outbound service interface includes the following steps:
and issuing the comparison document of the first RPC interface and the second RPC interface outwards, and issuing the interface access document of the second RPC interface outwards.
For a calling party, when a comparison document of the first RPC interface and the second RPC interface is taken and an interface of the second RPC interface is accessed to the document, the interface can be upgraded, and when calling is requested, the second RPC interface is requested. For a caller, the flow switching between the first RPC interface and the second RPC interface is opaque in gray scale, namely the caller requests to call the second RPC interface, but the call request of the caller can be distributed to the first RPC interface or the second RPC interface according to a preset flow distribution strategy in the aspect of interface function realization.
In this embodiment, when the second RPC interface receives a call request of a caller, the method further includes the following steps:
acquiring a flow calling requirement and a calling party identifier of the calling party, wherein the calling party identifier can be APP NAME and the like and is used for identifying different calling parties, and the flow calling requirement of the calling party can be a QPS (query rate per second) requirement, a delay requirement and the like;
and according to the caller identification, carrying out embedded point monitoring on the caller, realizing the monitoring of the service calling process of the caller and ensuring the normal realization of the calling service.
Further, the method for switching the flow in the RPC interface upgrading also comprises the following steps:
acquiring flow calling information of the calling party monitored by the buried point at intervals of preset intervals, and judging whether the flow calling of the calling party meets the flow calling requirement of the calling party or not;
and if not, adjusting the flow distribution strategy. Because the first RPC interface is normally used before being upgraded, the pressure resistance and the service stability of the first RPC interface can be ensured, and therefore, when the flow distribution strategy is adjusted, the flow proportion distributed to the first RPC interface within a preset time range is increased or the flow distribution weight of the first RPC interface is improved.
In this embodiment, the categories of the traffic allocation policy may include a polling policy, a percentage traffic policy, and a weighted polling policy. The flow distribution strategy can pre-select the strategy type, set the parameters of each strategy, and adjust the strategy parameters or the strategy type according to the service condition after the second RPC interface is on line.
And when the preset flow distribution strategy is a polling strategy, the call requests of the calling party are alternately distributed to the first RPC interface and the second RPC interface for realization.
The type of the flow distribution strategy comprises a percentage flow strategy, when the preset flow distribution strategy is the percentage flow strategy, the calling request of the calling party is distributed to the first RPC interface or the second RPC interface to be realized, so that in a specified time range, the ratio of the request flow realized by the first RPC interface to the request flow realized by the second RPC interface meets the preset flow percentage value. The flow percentage value can be preset and can be adjusted according to actual needs in application. For example, when the service quality is reduced and the flow calling requirement of the calling party cannot be met, the requested flow ratio realized by the first RPC interface may be increased, and when the service quality tends to be stable, the requested flow ratio realized by the second RPC interface may be increased and gradually tends to 1, and the flow is gradually switched to a new stable interface.
When the preset flow distribution strategy is a weighted polling strategy, the calling request of the calling party is distributed to the first RPC interface or the second RPC interface to be realized, so that in a specified time range, the ratio of the request flow realized by the first RPC interface to the request flow realized by the second RPC interface is equal to the preset ratio of the weight of the first RPC interface to the weight of the second RPC interface. The weight value can be preset, and in application, can be adjusted according to actual needs. For example, when the service quality is reduced and the flow calling requirement of the calling party cannot be met, the weight of the first RPC interface can be adjusted to be high, or the weight of the second RPC interface can be adjusted to be low. When the service quality tends to be stable, the weight of the second RPC interface can be adjusted to be high, and the flow tends to be switched to a stable new interface implementation step by step.
In this embodiment, the flow switching method in the RPC interface upgrade also provides a breaker function, when a new interface is abnormal, the flow is automatically switched back to an old interface, so that the new interface and the old interface can be used for switching the service flow once, and when the service is abnormal, the flow can be requested to be switched to the old interface completely. The method comprises the following steps:
and when the call service of the second RPC interface is abnormal, all the call requests of all the calling parties are distributed to the first RPC interface.
As shown in fig. 2, in order to add a circuit breaker function, a flow chart of a flow switching method in an RPC interface upgrade according to an embodiment of the present invention is shown. The method specifically comprises the following steps:
each calling party sends a service calling request to the second RPC interface;
a second RPC interface receives a service calling request;
acquiring calling party APP NAME and flow calling requirements of each calling party;
judging whether the service of the second RPC interface is abnormal or not, specifically, if the number of times of abnormality of the call service of the second RPC interface in a preset time range is greater than a preset threshold value, indicating that the service of the second RPC interface is abnormal, wherein a preset flow allocation strategy fails at the moment, and when the second RPC interface receives a call request of a calling party, allocating all the call requests to the first RPC interface for realization;
and if the service of the second RPC interface is normal, acquiring a preset flow configuration strategy, and selecting whether the current call request is handed to the first RPC interface or the second RPC interface to be realized according to the flow configuration strategy.
In the process of switching request flow according to a preset flow configuration strategy, monitoring the embedded points of all calling parties according to calling party APP NAME, obtaining flow calling information of the calling parties, carrying out pressure test on a second RPC interface according to the flow calling information such as current response delay time, a per second query rate value and the like, and judging whether the pressure test result of the second RPC interface meets requirements or not and whether the flow calling information of the calling parties meets the flow calling requirements of the calling parties or not. If the service cannot meet the requirements, the traffic configuration policy may be adjusted. For example, a polling policy was originally used, which may be adjusted to a percentage traffic policy and increase the percentage of the first RPC interface, or to a weighted round robin and increase the weight of the second RPC interface. When the second RPC interface can meet the requirement of a calling party and the pressure test result meets the requirement, the percentage or the weight of the second RPC interface can be properly increased, and after the proportion of the second RPC interface bearing the requested flow is increased, if the service quality can still be ensured, the percentage or the weight of the second RPC interface can be further increased, so that the flow is gradually and completely transited to the second RPC interface to realize all the requested flow, and the complete connection of an old interface and a new interface is realized.
As shown in fig. 3, an embodiment of the present invention further provides a system for switching traffic in an RPC interface upgrade, where the system is configured to switch traffic between a first RPC interface before upgrade and a second RPC interface after upgrade, and the system includes:
an external service setting module S100, configured to set the second RPC interface as an external service interface;
a flow distribution policy acquisition module S200, configured to acquire a preset flow distribution policy when the second RPC interface receives a call request of a caller;
and the flow distribution strategy execution module S300 is used for distributing the call request of the calling party to the first RPC interface or the second RPC interface according to a preset flow distribution strategy.
Therefore, the flow switching system in the RPC interface upgrading of the invention provides the second RPC interface after upgrading for the service party to call when the RPC interface is upgraded, and distributes the flow to the first RPC interface before upgrading or the second RPC interface after upgrading by adopting the pre-configured distribution strategy, and smoothly switches the flow access of the new interface and the old interface of the RPC, thereby ensuring that the calling party normally uses the new interface service, and avoiding the service abnormity possibly caused by the abnormity of the new interface or the limited bearing capacity after all the services are transferred to the new RPC interface when the RPC interface is upgraded.
The embodiment of the invention also provides flow switching equipment in the RPC interface upgrading, which comprises a processor; a memory having stored therein executable instructions of the processor; wherein the processor is configured to perform the steps of the flow switching method in the RPC interface upgrade via execution of the executable instructions.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" platform.
Therefore, when the RPC interface is upgraded, the flow switching equipment in the RPC interface upgrading of the invention provides the second RPC interface after upgrading for the calling party, and distributes the flow to the first RPC interface before upgrading or the second RPC interface after upgrading by adopting a pre-configured distribution strategy, and smoothly switches the flow access of the new interface and the old interface of the RPC, thereby ensuring that the calling party normally uses new interface service.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 4. The electronic device 600 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 4, the electronic device 600 is embodied in the form of a general purpose computing device. The combination of the electronic device 600 may include, but is not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 connecting different platform combinations (including memory unit 620 and processing unit 610), a display unit 640, etc.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
The embodiment of the invention also provides a computer-readable storage medium for storing a program, and the program realizes the steps of the flow switching method in the RPC interface upgrading when being executed. In some possible embodiments, aspects of the present invention may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription flow processing method section of this specification, when the program product is run on the terminal device.
Referring to fig. 5, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, compared with the prior art, the method, the system, the device and the storage medium for switching the flow in the RPC interface upgrade provided by the present invention have the following advantages:
the invention solves the problems in the prior art, provides a new RPC interface for a service party to call when the RPC interface is upgraded, and adopts a pre-configured allocation strategy to allocate the flow to the new RPC interface and the old RPC interface, and smoothly switches the flow access of the new and old RPC interfaces, thereby ensuring that the calling party normally uses new interface service; when the new RPC interface is abnormal, the new RPC interface can be directly and completely switched to the old RPC interface, and the stable service of remote calling is provided.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A flow switching method in RPC interface upgrading is used for switching flow between a first RPC interface before upgrading and a second RPC interface after upgrading, and the method comprises the following steps:
setting the second RPC interface as an external service interface;
when the second RPC interface receives a calling request of a calling party, a preset flow distribution strategy is obtained;
according to a preset flow distribution strategy, distributing the call request of the caller to the first RPC interface to realize or distributing the call request of the caller to the second RPC interface to realize;
when the second RPC interface receives the call request of the caller, the method further comprises the following steps:
acquiring the flow calling requirement and calling party identification of the calling party;
according to the calling party identification, carrying out embedded point monitoring on the calling party;
the method further comprises the steps of:
acquiring flow calling information of the calling party monitored by the buried point at intervals of preset intervals, and judging whether the flow calling of the calling party meets the flow calling requirement of the calling party or not;
and if the first RPC interface is not satisfied, adjusting the flow distribution strategy, and increasing or improving the flow proportion distributed to the first RPC interface within a preset time range.
2. The method for switching traffic in RPC interface upgrade of claim 1, wherein said setting the second RPC interface as an outbound service interface comprises the following steps:
and issuing the comparison document of the first RPC interface and the second RPC interface outwards, and issuing the interface access document of the second RPC interface outwards.
3. The method for switching traffic in RPC interface upgrade of claim 1, wherein the type of the traffic allocation policy includes a polling policy, and when the preset traffic allocation policy is the polling policy, the call request of the caller is alternately allocated to the first RPC interface and the second RPC interface for realization.
4. The method of claim 1, wherein the type of the traffic distribution policy includes a percentage traffic policy, and when the predetermined traffic distribution policy is the percentage traffic policy, the call request of the caller is distributed to the first RPC interface or the second RPC interface, so that a ratio of the request traffic realized by the first RPC interface to the request traffic realized by the second RPC interface satisfies a predetermined traffic percentage value within a specified time range.
5. The method of claim 1, wherein the type of the flow allocation policy includes a weighted polling policy, and when the preset flow allocation policy is the weighted polling policy, the call request of the caller is allocated to the first RPC interface or the second RPC interface, so that in a specified time range, the ratio of the request flow realized by the first RPC interface to the request flow realized by the second RPC interface is equal to the ratio of the preset weight of the first RPC interface to the weight of the second RPC interface.
6. The method of claim 1, further comprising the steps of:
and when the call service of the second RPC interface is abnormal, all the call requests of all the calling parties are distributed to the first RPC interface.
7. The method of claim 6, wherein when the call service of the second RPC interface is abnormal, the method allocates all the call requests of all the calling parties to the first RPC interface, and comprises the following steps:
and if the number of times of abnormity of the call service of the second RPC interface in a preset time range is greater than a preset threshold value, the flow allocation strategy is invalid, and when the second RPC interface receives the call request of a calling party, all the call requests are allocated to the first RPC interface to be realized.
8. A flow switching system in RPC interface upgrade, which is applied to the flow switching method in RPC interface upgrade of any claim 1 to 7, the system is used for switching flow between a first RPC interface before upgrade and a second RPC interface after upgrade, the system includes:
the external service setting module is used for setting the second RPC interface as an external service interface;
the flow distribution strategy acquisition module is used for acquiring a preset flow distribution strategy when the second RPC interface receives a calling request of a calling party;
and the flow distribution strategy execution module is used for distributing the calling request of the calling party to the first RPC interface or the second RPC interface according to a preset flow distribution strategy.
9. The utility model provides a flow switching equipment in RPC interface upgrading which characterized in that includes:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the flow switching method in RPC interface upgrade of any of claims 1 to 7 via execution of the executable instructions.
10. A computer readable storage medium storing a program which when executed performs the steps of the method of flow switching in an RPC interface upgrade of any of claims 1 to 7.
CN201811625027.4A 2018-12-28 2018-12-28 Flow switching method, system, equipment and storage medium in RPC interface upgrading Active CN109600384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811625027.4A CN109600384B (en) 2018-12-28 2018-12-28 Flow switching method, system, equipment and storage medium in RPC interface upgrading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811625027.4A CN109600384B (en) 2018-12-28 2018-12-28 Flow switching method, system, equipment and storage medium in RPC interface upgrading

Publications (2)

Publication Number Publication Date
CN109600384A CN109600384A (en) 2019-04-09
CN109600384B true CN109600384B (en) 2021-08-03

Family

ID=65964620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811625027.4A Active CN109600384B (en) 2018-12-28 2018-12-28 Flow switching method, system, equipment and storage medium in RPC interface upgrading

Country Status (1)

Country Link
CN (1) CN109600384B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324411B (en) * 2019-06-18 2022-11-18 平安普惠企业管理有限公司 Service distribution method and device
CN110290210B (en) * 2019-06-27 2022-05-10 南京冰鉴信息科技有限公司 Method and device for automatically allocating different interface flow proportions in interface calling system
CN112860271B (en) * 2021-03-30 2024-03-29 中国工商银行股份有限公司 New and old system switching method, device, equipment and storage medium
CN114816790A (en) * 2022-04-11 2022-07-29 深圳乐信软件技术有限公司 Data processing method, device, equipment and medium for tangential measurement process
CN115174495B (en) * 2022-06-20 2023-06-16 平安银行股份有限公司 Resource allocation method based on parallel routing and related equipment
CN115567455B (en) * 2022-09-23 2024-05-07 平安科技(深圳)有限公司 Access flow switching method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533361A (en) * 2009-04-16 2009-09-16 腾讯科技(深圳)有限公司 Method, system and equipment for transferring and generating service interface information in remote course
CN103905551A (en) * 2014-04-02 2014-07-02 北京中交兴路车联网科技有限公司 Method and device for calling service
CN108667938A (en) * 2018-05-18 2018-10-16 阿里巴巴集团控股有限公司 Switch the method, apparatus and server of flow
CN108874413A (en) * 2017-10-30 2018-11-23 北京旷视科技有限公司 Service upgrade method, apparatus, system and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533361A (en) * 2009-04-16 2009-09-16 腾讯科技(深圳)有限公司 Method, system and equipment for transferring and generating service interface information in remote course
CN103905551A (en) * 2014-04-02 2014-07-02 北京中交兴路车联网科技有限公司 Method and device for calling service
CN108874413A (en) * 2017-10-30 2018-11-23 北京旷视科技有限公司 Service upgrade method, apparatus, system and storage medium
CN108667938A (en) * 2018-05-18 2018-10-16 阿里巴巴集团控股有限公司 Switch the method, apparatus and server of flow

Also Published As

Publication number Publication date
CN109600384A (en) 2019-04-09

Similar Documents

Publication Publication Date Title
CN109600384B (en) Flow switching method, system, equipment and storage medium in RPC interface upgrading
CN109787830B (en) Gray scale distribution control method, device, system, electronic device and storage medium
CN108257590B (en) Voice interaction method and device, electronic equipment and storage medium
CN109474522B (en) Service routing method, device and storage medium
CN110753131A (en) Microservice distributed current limiting method and device, storage medium and electronic equipment
US10771533B2 (en) Adaptive communication control device
CN111913818A (en) Method for determining dependency relationship between services and related device
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
CN110991903A (en) Service personnel allocation method, device, equipment and storage medium
CN105791381A (en) Access control method and apparatus
CN112751761A (en) Transaction routing switching method, intermediate system and service processing system
CN109428926B (en) Method and device for scheduling task nodes
US20120005051A1 (en) Semi-Automated Customer Model-Based Service Deployment Into Data Centers
WO2022090847A1 (en) Handling deferrable network requests
CN111190719A (en) Method, device, medium and electronic equipment for optimizing cluster resource allocation
CN110275701B (en) Data processing method, device, medium and computing equipment
US11582049B2 (en) Virtual network function management
CN114697450A (en) Method, device and medium for determining outbound line
CN115794396A (en) Resource allocation method, system and electronic equipment
CN115480877A (en) External exposure method and device of application service in multi-cluster environment
CN113076175B (en) Memory sharing method and device for virtual machine
CN116861397A (en) Request processing method, device, electronic equipment and computer readable medium
CN113760974A (en) Dynamic caching method, device and system
CN111091899B (en) Authority allocation method and device, electronic equipment and computer readable storage medium
US20210144217A1 (en) Service communication proxy apparatus and method

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
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190409

Assignee: Nanjing Manyun Cold Chain Technology Co.,Ltd.

Assignor: JIANGSU MANYUN SOFTWARE TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980038397

Denomination of invention: Method, system, device, and storage medium for traffic switching in RPC interface upgrade

Granted publication date: 20210803

License type: Common License

Record date: 20230724

EE01 Entry into force of recordation of patent licensing contract