CN109600384A - Flow switching method, system, equipment and storage medium in RPC interface upgrade - Google Patents

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

Info

Publication number
CN109600384A
CN109600384A CN201811625027.4A CN201811625027A CN109600384A CN 109600384 A CN109600384 A CN 109600384A CN 201811625027 A CN201811625027 A CN 201811625027A CN 109600384 A CN109600384 A CN 109600384A
Authority
CN
China
Prior art keywords
rpc interface
interface
rpc
flow
called side
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.)
Granted
Application number
CN201811625027.4A
Other languages
Chinese (zh)
Other versions
CN109600384B (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

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 present invention provides flow switching method, system, equipment and storage mediums in a kind of RPC interface upgrade, this method is used to carry out flow switching between the first RPC interface before upgrading and the 2nd RPC interface after upgrading, comprising: sets external service interface for the 2nd RPC interface;2nd RPC interface to called side call request when, obtain preset traffic distribution strategy;According to preset traffic distribution strategy, the call request of called side is distributed to the first RPC interface and realizes or distributes to the realization of the 2nd RPC interface.By using the solution of the present invention, in RPC interface upgrade, new RPC interface is provided and is called to business side, and use preconfigured allocation strategy by assignment of traffic into new RPC interface and old RPC interface, smoothly switches the flow access of the new and old interface of RPC;When new RPC interface occurs abnormal, old RPC interface directly can be all switched to, provide far call stablizes service.

Description

Flow switching method, system, equipment and storage medium in RPC interface upgrade
Technical field
The present invention relates to flow switching method in far call control technology field more particularly to a kind of RPC interface upgrade, System, equipment and storage medium.
Background technique
RPC interface refers to Remote Method Invocation interface, i.e. remote method call interface.Remote process Calling (RPC) is a kind of agreement, and PROGRAMMED REQUESTS service of this agreement on another computer into network can be used in program. Program due to using RPC agreement need not understand the case where network protocol for supporting communication, and RPC agreement improves program Interoperability.In RPC interface, the program for issuing request is CLIENT PROGRAM, and the program for providing service is server.
In the business development of company for providing RPC interface, the data scale of construction and the flow scale of construction can all rise always, existing Service ability, which may have shortcoming, causes service ability limited.In order to promote service ability, service interface can be upgraded Transformation, promotes the service ability and stability of service.When existing RPC interface upgrade, typically called side is directlyed adopt newly RPC interface replace old RPC interface, then direct placed into service uses new interface.For the service ability mistake of new interface In trust.When new interface has service exception, it can not degrade using old interface and service is provided, the service of itself is caused to go out Existing chain exception, so that there is online service exception.
Summary of the invention
For the problems of the prior art, the purpose of the present invention is to provide flow switching sides in a kind of RPC interface upgrade Method, system, equipment and storage medium provide new RPC interface and call to business side, and using preparatory in RPC interface upgrade The allocation strategy of configuration is by assignment of traffic into new RPC interface and old RPC interface, it is ensured that called side normal use is new to be connect Oral business.
The embodiment of the present invention provides flow switching method in a kind of RPC interface upgrade, and the method is used for before upgrading Flow switching is carried out between the 2nd RPC interface after first RPC interface and upgrading, described method includes following steps:
External service interface is set by the 2nd RPC interface;
The 2nd RPC interface to called side call request when, obtain preset traffic distribution strategy;
According to preset traffic distribution strategy, the call request of the called side is distributed real to the first RPC interface Existing or distribution to the 2nd RPC interface is realized.
Optionally, described to set external service interface for the 2nd RPC interface, include the following steps:
The comparison document of the first RPC interface and the 2nd RPC interface is externally issued, and externally issues described second The interface of RPC interface accesses document.
Optionally, the 2nd RPC interface to called side call request when, further include following steps:
The flow for obtaining the called side, which calls, to be required and called side mark;
It is identified according to the called side, the called side is carried out to bury a monitoring.
Optionally, the method also includes following steps:
It is obtained every preset interval time and is buried a flow recalls information for the called side of monitoring, judge called side Flow calls the flow for whether meeting the called side to call and requires;
If conditions are not met, then adjusting the traffic distribution strategy, distribution in preset time range to the first RPC is connect The flow proportional of mouth increases or improves the assignment of traffic weight of the first RPC interface.
Optionally, the type of the traffic distribution strategy includes polling schemas, and the preset traffic distribution strategy is wheel When asking strategy, the first RPC interface is distributed into the call request of the called side in turn and the 2nd RPC interface is real It is existing.
Optionally, the type of the traffic distribution strategy includes percentage traffic policy, the preset assignment of traffic plan Slightly percentage traffic policy when, the first RPC interface or the 2nd RPC are distributed into the call request of the called side Interface is realized, so that the request flow and the 2nd RPC interface that the first RPC interface is realized are real within the scope of specified time The ratio of existing request flow meets preset flow percentage value.
Optionally, the type of the traffic distribution strategy includes weighted polling strategy, the preset traffic distribution strategy When for weighted polling strategy, the first RPC interface or the 2nd RPC interface are distributed into the call request of the called side It realizes, so that within the scope of specified time, what the request flow and the 2nd RPC interface that the first RPC interface is realized were realized The ratio of flow is requested to be equal to the ratio of the weight of the preset first RPC interface and the weight of the 2nd RPC interface.
Optionally, the method also includes following steps:
When the calling service of the 2nd RPC interface occurs abnormal, the call request of all called sides is divided equally and is assigned to institute State the first RPC interface.
Optionally, when the calling service of the 2nd RPC interface occurs abnormal, the call request of all called sides is divided equally It is assigned to the first RPC interface, is included the following steps:
If abnormal number occurs in preset time range in the calling service of the 2nd RPC interface is greater than default threshold Value, then traffic distribution strategy fails, and when the call request of the 2nd RPC interface to called side, all calling are asked It asks and is respectively assigned to the first RPC interface realization.
The embodiment of the present invention also provides flow switching system in a kind of RPC interface upgrade, and the system is used for before upgrading The first RPC interface and upgrading after the 2nd RPC interface between carry out flow switching, the system comprises:
Externally service setup module, for setting external service interface for the 2nd RPC interface;
Traffic distribution strategy obtains module, when call request for the 2nd RPC interface to called side, acquisition Preset traffic distribution strategy;
Traffic distribution strategy execution module, for according to preset traffic distribution strategy, the calling of the called side to be asked It asks distribution to realize or distribute to the 2nd RPC interface to the first RPC interface to realize.
The embodiment of the present invention also provides flow switching equipment in a kind of RPC interface upgrade, comprising:
Processor;
Memory, wherein being stored with the executable instruction of the processor;
Wherein, the processor is configured to execute in the RPC interface upgrade via the executable instruction is executed The step of flow switching method.
The embodiment of the present invention also provides a kind of computer readable storage medium, and for storing program, described program is performed In RPC interface upgrade described in Shi Shixian the step of flow switching method.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Flow switching method, system, equipment and storage medium have following excellent in RPC interface upgrade provided by the present invention Point:
The present invention solves the problems of the prior art, in RPC interface upgrade, provides new RPC interface to business side It calls, and preconfigured allocation strategy is used into new RPC interface and old RPC interface, smoothly to cut assignment of traffic Change the flow access of the new and old interface of RPC, it is ensured that the new interface service of called side normal use;Occur in new RPC interface abnormal When, old RPC interface directly can be all switched to, provide far call stablizes service.
Detailed description of the invention
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, other feature of the invention, Objects and advantages will become more apparent upon.
Fig. 1 is the flow chart of flow switching method in RPC interface upgrade of the invention;
Fig. 2 is the flow chart of flow switching method in the RPC interface upgrade of one embodiment of the invention;
Fig. 3 is the structural schematic diagram of flow switching system in the RPC interface upgrade of one embodiment of the invention;
Fig. 4 is the schematic diagram of flow switching equipment in the RPC interface upgrade of one embodiment of the invention;
Fig. 5 is the schematic diagram of the computer readable storage medium of one embodiment of the invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot Structure or characteristic can be incorporated in any suitable manner in one or more embodiments.
In addition, attached drawing is only the schematic illustrations of the disclosure, it is not necessarily drawn to scale.Identical attached drawing mark in figure Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in the drawings are function Energy entity, not necessarily must be corresponding with physically or logically independent entity.These function can be realized using software form Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place These functional entitys are realized in reason device device and/or microcontroller device.
In order to solve the above-mentioned technical problems, the present invention provides flow switching methods in a kind of RPC interface upgrade, are used for Flow switching is carried out between the 2nd RPC interface after the first RPC interface and upgrading before upgrading.Herein, the first RPC before upgrading Interface is the old interface before upgrading, and the 2nd RPC interface after upgrading is the new interface after upgrading.Therefore, the present invention realizes The switching of the flow of new RPC interface and old RPC interface.
As shown in Figure 1, flow switching method includes the following steps: in the RPC interface upgrade
S100: external service interface is set by the 2nd RPC interface;
S200: when the call request of the 2nd RPC interface to called side, preset traffic distribution strategy is obtained;
S300: according to preset traffic distribution strategy, the call request of the called side is distributed to the first RPC and is connect Cause for gossip is existing or distributes to the 2nd RPC interface realization.
Therefore, in RPC interface upgrade of the invention flow switching method in RPC interface upgrade, after upgrading is provided the Two RPC interface is called to business side, and first RPC using preconfigured allocation strategy by assignment of traffic to before upgrading In the 2nd RPC interface after interface or upgrading, smoothly switch the flow access of the new and old interface of RPC, it is ensured that called side normally makes It, may be because of newly connecing after avoiding in RPC interface upgrade whole business from being transferred to new RPC interface with new interface service Mouthful exception or bearing capacity are limited and cause service abnormal.
In this embodiment, described to set external service interface for the 2nd RPC interface, include the following steps:
The comparison document of the first RPC interface and the 2nd RPC interface is externally issued, and externally issues described second The interface of RPC interface accesses document.
For called side, connect in the comparison document and the 2nd RPC for taking the first RPC interface and the 2nd RPC interface When the interface of mouth accesses document, it can be upgraded with interface, in request call, request is the 2nd RPC interface.For calling For side, the flow switching between the first RPC interface and the 2nd RPC interface is that gray scale is opaque, i.e. called side request call Be all the 2nd RPC interface, but then can be according to preset traffic distribution strategy in interface function realization, will be described The call request of called side, which is distributed to the first RPC interface, realizes or distributes to the 2nd RPC interface realization.
In this embodiment, the 2nd RPC interface to called side call request when, further include following steps:
The flow for obtaining the called side, which calls, to be required to can be APP NAME etc. with called side mark, called side mark, For identifying different called sides, the flow of called side, which calls, requires can be QPS (query rate per second) requirement, retardance requirement Deng;
It is identified according to the called side, the called side is carried out to bury a monitoring, realizes the service call mistake to called side The monitoring of journey guarantees to call service is normal to realize.
Further, flow switching method further includes following steps in the RPC interface upgrade:
It is obtained every preset interval time and is buried a flow recalls information for the called side of monitoring, judge called side Flow calls the flow for whether meeting the called side to call and requires;
If conditions are not met, then adjusting the traffic distribution strategy.Since the first RPC interface is the preceding normal use always of upgrading , anti-pressure ability and the available guarantee of service stability, therefore, when adjusting traffic distribution strategy, by preset time model Enclose the assignment of traffic weight that interior distribution increases or improve the first RPC interface to the flow proportional of the first RPC interface.
In this embodiment, the type of the traffic distribution strategy may include polling schemas, percentage traffic policy and Weighted polling strategy.Traffic distribution strategy can pre-select tactful type, and set the parameter of each strategy, second It, can be according to service scenario adjustable strategies parameter or adjustable strategies type after RPC interface is online.
When the preset traffic distribution strategy is polling schemas, institute is distributed into the call request of the called side in turn It states the first RPC interface and the 2nd RPC interface is realized.
The type of the traffic distribution strategy includes percentage traffic policy, and the preset traffic distribution strategy is percentage When specific discharge strategy, the first RPC interface is distributed into the call request of the called side or the 2nd RPC interface is real It is existing, so that the request flow and the 2nd RPC interface that the first RPC interface is realized were realized asks within the scope of specified time The ratio of flow is asked to meet preset flow percentage value.Wherein, flow percentage value can be preset, and applied In, it can be adjusted according to actual needs.For example, the flow of called side, which calls, to be required to be unable to satisfy when service quality declines When, the request flow ratio that the first RPC interface can be realized improves, can be by second after service quality is intended to stablize The request flow ratio that RPC interface is realized improves, and is gradually intended to 1, be done step-by-step flow all switch to it is stable new Interface is realized.
When the preset traffic distribution strategy is weighted polling strategy, institute is distributed into the call request of the called side It states the first RPC interface or the 2nd RPC interface is realized, so that the first RPC interface was realized asks within the scope of specified time The ratio for the request flow for asking flow and the 2nd RPC interface to realize be equal to the weight of the preset first RPC interface with The ratio of the weight of the 2nd RPC interface.Wherein, weight can be preset, and in the application, can be according to practical need It is adjusted.For example, when the flow of called side calls requirement to be unable to satisfy, the first RPC can be connect when service quality declines The weight of mouth is turned up, or the weight of the 2nd RPC interface is turned down.After service quality is intended to stablize, the 2nd RPC can be connect The weight of mouth is turned up, and is gradually intended to flow and all switches to stable new interface realization.
In this embodiment, flow switching method also provides breaker function in the RPC interface upgrade, and new interface occurs When abnormal, flow all switches back in old interface automatically, realizes that new and old interface service flow is imposed uniformity without examining individual cases, and can occur in service different Chang Shi, request flow are all switched to old interface.Include the following steps:
When the calling service of the 2nd RPC interface occurs abnormal, the call request of all called sides is divided equally and is assigned to institute State the first RPC interface.
As shown in Fig. 2, after to increase breaker function, flow switching side in the RPC interface upgrade of one embodiment of the invention The flow chart of method.Specifically comprise the following steps:
Each called side sends calling service request to the 2nd RPC interface;
2nd RPC interface is requested to calling service;
The called side APP NAME and flow for obtaining each called side, which are called, to be required;
Judge whether the service of the 2nd RPC interface is abnormal, specifically, if the calling service of the 2nd RPC interface exists Occur abnormal number in preset time range and be greater than preset threshold, then illustrates that the service of the 2nd RPC interface is abnormal, preset at this time Traffic distribution strategy failure, it is when the call request of the 2nd RPC interface to called side, all call requests is equal Distribution to the first RPC interface is realized;
If the service of the 2nd RPC interface is normal, preset flow configuration strategy is obtained, according to flow configuration strategy, Select current call request that the first RPC interface or the 2nd RPC interface is transferred to realize.
According in preset flow configuration strategy switching request discharge process, according to called side APP NAME to each tune Bury a monitoring with side, obtains the flow recalls information of called side, for example current response time of flow recalls information, Query rate value per second etc., to the 2nd RPC interface carry out pressure test, judge the 2nd RPC interface pressure testing results whether It meets the requirements, the flow whether the flow recalls information of called side meets called side, which calls, to be required.It is wanted if service is unable to satisfy It asks, then flow configuration strategy can be adjusted.For example, using polling schemas originally, adjustable is percentage stream Amount strategy, and the percentage of the first RPC interface is turned up, or be adjusted to weighted polling method, and the 2nd RPC interface is turned up Weight.It can satisfy the needs of called side in the 2nd RPC interface, and when pressure testing results are met the requirements, can suitably adjust The percentage or weight of high 2nd RPC interface, after improving the 2nd RPC interface and undertaking the ratio for requesting flow, if service Quality still can guarantee, the percentage or weight of the 2nd RPC interface can further be turned up, thus gradually by flow whole mistake It crosses to the 2nd RPC interface and realizes all request flows, to realize the complete handover of old interface and new interface.
As shown in figure 3, the embodiment of the present invention also provides flow switching system in a kind of RPC interface upgrade, the system is used Flow switching is carried out between the 2nd RPC interface in the first RPC interface before upgrading and after upgrading, the system comprises:
Externally service setup module S100, for setting external service interface for the 2nd RPC interface;
Traffic distribution strategy obtains module S200, when call request for the 2nd RPC interface to called side, Obtain preset traffic distribution strategy;
Traffic distribution strategy execution module S300 is used for according to preset traffic distribution strategy, by the tune of the called side It is realized or is distributed to the 2nd RPC interface to the first RPC interface with request distribution and realized.
Therefore, in RPC interface upgrade of the invention flow switching system in RPC interface upgrade, after upgrading is provided the Two RPC interface is called to business side, and first RPC using preconfigured allocation strategy by assignment of traffic to before upgrading In the 2nd RPC interface after interface or upgrading, smoothly switch the flow access of the new and old interface of RPC, it is ensured that called side normally makes It, may be because of newly connecing after avoiding in RPC interface upgrade whole business from being transferred to new RPC interface with new interface service Mouthful exception or bearing capacity are limited and cause service abnormal.
The embodiment of the present invention also provides flow switching equipment in a kind of RPC interface upgrade, including processor;Memory, In be stored with the executable instruction of the processor;Wherein, the processor is configured to next via the executable instruction is executed The step of executing flow switching method in the RPC interface upgrade.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as " circuit ", " module " or " platform ".
Therefore, in RPC interface upgrade of the invention flow switching equipment in RPC interface upgrade, after upgrading is provided the Two RPC interface is called to business side, and first RPC using preconfigured allocation strategy by assignment of traffic to before upgrading In the 2nd RPC interface after interface or upgrading, smoothly switch the flow access of the new and old interface of RPC, it is ensured that called side normally makes With new interface service.
The electronic equipment 600 of this embodiment according to the present invention is described referring to Fig. 4.The electronics that Fig. 4 is shown Equipment 600 is only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 4, electronic equipment 600 is showed in the form of universal computing device.The combination of electronic equipment 600 can wrap Include but be not limited to: at least one processing unit 610, at least one storage unit 620, connection different platform combination (including storage Unit 620 and processing unit 610) bus 630, display unit 640 etc..
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 610 Row, so that the processing unit 610 executes described in this specification above-mentioned electronic prescription circulation processing method part according to this The step of inventing various illustrative embodiments.For example, the processing unit 610 can execute step as shown in fig. 1.
The storage unit 620 may include the readable medium of volatile memory cell form, such as random access memory Unit (RAM) 6201 and/or cache memory unit 6202 can further include read-only memory unit (ROM) 6203.
The storage unit 620 can also include program/practical work with one group of (at least one) program module 6205 Tool 6204, such program module 6205 includes but is not limited to: operating system, one or more application program, other programs It may include the realization of network environment in module and program data, each of these examples or certain combination.
Bus 630 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures Local bus.
Electronic equipment 600 can also be with one or more external equipments 700 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 600 communicate, and/or with make Any equipment (such as the router, modulation /demodulation that the electronic equipment 600 can be communicated with one or more of the other calculating equipment Device etc.) communication.This communication can be carried out by input/output (I/O) interface 650.Also, electronic equipment 600 can be with By network adapter 660 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, Such as internet) communication.Network adapter 660 can be communicated by bus 630 with other modules of electronic equipment 600.It should Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 600, including but unlimited In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage platform etc..
The embodiment of the present invention also provides a kind of computer readable storage medium, and for storing program, described program is performed In RPC interface upgrade described in Shi Shixian the step of flow switching method.In some possible embodiments, of the invention each A aspect is also implemented as a kind of form of program product comprising program code, when described program product is in terminal device When upper operation, said program code is for making the terminal device execute this specification above-mentioned electronic prescription circulation processing method portion Point described according to the present invention various illustrative embodiments the step of.
Refering to what is shown in Fig. 5, describing the program product for realizing the above method of embodiment according to the present invention 800, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device, Such as it is run on PC.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be with To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer readable storage medium may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing Readable medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network (WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
In conclusion compared with prior art, flow switching method in RPC interface upgrade provided by the present invention, system, Equipment and storage medium have the advantage that
The present invention solves the problems of the prior art, in RPC interface upgrade, provides new RPC interface to business side It calls, and preconfigured allocation strategy is used into new RPC interface and old RPC interface, smoothly to cut assignment of traffic Change the flow access of the new and old interface of RPC, it is ensured that the new interface service of called side normal use;Occur in new RPC interface abnormal When, old RPC interface directly can be all switched to, provide far call stablizes service.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be said that Specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs, exist Under the premise of not departing from present inventive concept, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to of the invention Protection scope.

Claims (12)

1. flow switching method in a kind of RPC interface upgrade, which is characterized in that for the first RPC interface and liter before upgrading Flow switching is carried out between the 2nd RPC interface after grade, described method includes following steps:
External service interface is set by the 2nd RPC interface;
The 2nd RPC interface to called side call request when, obtain preset traffic distribution strategy;
According to preset traffic distribution strategy, the call request of the called side is distributed to the first RPC interface realize or Distribution to the 2nd RPC interface is realized.
2. flow switching method in RPC interface upgrade according to claim 1, which is characterized in that described by described second RPC interface is set as external service interface, includes the following steps:
The comparison document of the first RPC interface and the 2nd RPC interface is externally issued, and externally issues the 2nd RPC The interface of interface accesses document.
3. flow switching method in RPC interface upgrade according to claim 1, which is characterized in that the 2nd RPC interface Further include following steps when receiving the call request of called side:
The flow for obtaining the called side, which calls, to be required and called side mark;
It is identified according to the called side, the called side is carried out to bury a monitoring.
4. flow switching method in RPC interface upgrade according to claim 3, which is characterized in that the method also includes Following steps:
It is obtained every preset interval time and is buried a flow recalls information for the called side of monitoring, judge the flow of called side It calls the flow for whether meeting the called side to call to require;
If conditions are not met, the traffic distribution strategy is then adjusted, by distribution in preset time range to the first RPC interface Flow proportional increases or improves the assignment of traffic weight of the first RPC interface.
5. flow switching method in RPC interface upgrade according to claim 1, which is characterized in that the assignment of traffic plan Type slightly includes polling schemas, and when the preset traffic distribution strategy is polling schemas, the calling of the called side is asked It asks and distributes to the first RPC interface and the 2nd RPC interface realization in turn.
6. flow switching method in RPC interface upgrade according to claim 1, which is characterized in that the assignment of traffic plan Type slightly includes percentage traffic policy, when the preset traffic distribution strategy is percentage traffic policy, by the tune The first RPC interface is distributed to the call request of side or the 2nd RPC interface is realized, so that within the scope of specified time, The ratio for the request flow that the request flow and the 2nd RPC interface that the first RPC interface is realized are realized meets preset Flow percentage value.
7. flow switching method in RPC interface upgrade according to claim 1, which is characterized in that the assignment of traffic plan Type slightly includes weighted polling strategy, when the preset traffic distribution strategy is weighted polling strategy, by the called side Call request distribute to the first RPC interface or the 2nd RPC interface and realize it is described so that within the scope of specified time The ratio for the request flow that the request flow and the 2nd RPC interface that first RPC interface is realized are realized is equal to preset described The ratio of the weight of the weight of first RPC interface and the 2nd RPC interface.
8. flow switching method in RPC interface upgrade according to claim 1, which is characterized in that the method also includes Following steps:
When the calling service of the 2nd RPC interface occurs abnormal, the call request of all called sides is divided equally and is assigned to described the One RPC interface.
9. flow switching method in RPC interface upgrade according to claim 8, which is characterized in that the 2nd RPC interface Calling service when occurring abnormal, the call request of all called sides is divided equally and is assigned to the first RPC interface, including is walked as follows It is rapid:
If the calling service of the 2nd RPC interface occurs abnormal number in preset time range and is greater than preset threshold, Then traffic distribution strategy fails, when the call request of the 2nd RPC interface to called side, all call requests is equal Distribution to the first RPC interface is realized.
10. flow switching system in a kind of RPC interface upgrade, which is characterized in that be applied to any one of claims 1 to 9 institute Flow switching method in the RPC interface upgrade stated, the system is for the first RPC interface before upgrading and second after upgrading Flow switching is carried out between RPC interface, the system comprises:
Externally service setup module, for setting external service interface for the 2nd RPC interface;
Traffic distribution strategy obtains module, when call request for the 2nd RPC interface to called side, obtains and presets Traffic distribution strategy;
Traffic distribution strategy execution module, for according to preset traffic distribution strategy, the call request of the called side to be divided The first RPC interface is assigned to realize or distribute to the 2nd RPC interface realization.
11. flow switching equipment in a kind of RPC interface upgrade characterized by comprising
Processor;
Memory, wherein being stored with the executable instruction of the processor;
Wherein, the processor is configured to come any one of perform claim requirement 1 to 10 institute via the execution executable instruction In the RPC interface upgrade stated the step of flow switching method.
12. a kind of computer readable storage medium, for storing program, which is characterized in that described program is performed realization power Benefit require any one of 1 to 10 described in RPC interface upgrade the step of flow switching method.
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 true CN109600384A (en) 2019-04-09
CN109600384B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290210A (en) * 2019-06-27 2019-09-27 南京冰鉴信息科技有限公司 Distinct interface flow proportional automatic governing method and device in interface calling system
CN110324411A (en) * 2019-06-18 2019-10-11 平安普惠企业管理有限公司 A kind of service shunting method and device
CN112860271A (en) * 2021-03-30 2021-05-28 中国工商银行股份有限公司 Method, device, equipment and storage medium for switching between new system and old system
CN114816790A (en) * 2022-04-11 2022-07-29 深圳乐信软件技术有限公司 Data processing method, device, equipment and medium for tangential measurement process
CN115174495A (en) * 2022-06-20 2022-10-11 平安银行股份有限公司 Resource allocation method based on parallel routing and related equipment
CN115567455A (en) * 2022-09-23 2023-01-03 平安科技(深圳)有限公司 Access flow switching method and device, computer equipment and storage medium

Family Cites Families (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
CN103905551B (en) * 2014-04-02 2018-07-24 北京中交兴路车联网科技有限公司 A kind of service calling method and device
CN108874413A (en) * 2017-10-30 2018-11-23 北京旷视科技有限公司 Service upgrade method, apparatus, system and storage medium
CN108667938B (en) * 2018-05-18 2020-12-29 阿里巴巴集团控股有限公司 Traffic switching method and device and server

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324411A (en) * 2019-06-18 2019-10-11 平安普惠企业管理有限公司 A kind of service shunting method and device
CN110324411B (en) * 2019-06-18 2022-11-18 平安普惠企业管理有限公司 Service distribution method and device
CN110290210A (en) * 2019-06-27 2019-09-27 南京冰鉴信息科技有限公司 Distinct interface flow proportional automatic governing method and device in interface calling system
CN110290210B (en) * 2019-06-27 2022-05-10 南京冰鉴信息科技有限公司 Method and device for automatically allocating different interface flow proportions in interface calling system
CN112860271A (en) * 2021-03-30 2021-05-28 中国工商银行股份有限公司 Method, device, equipment and storage medium for switching between new system and old 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
CN115174495A (en) * 2022-06-20 2022-10-11 平安银行股份有限公司 Resource allocation method based on parallel routing and related equipment
CN115567455A (en) * 2022-09-23 2023-01-03 平安科技(深圳)有限公司 Access flow switching method and device, computer equipment and storage medium
CN115567455B (en) * 2022-09-23 2024-05-07 平安科技(深圳)有限公司 Access flow switching method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109600384B (en) 2021-08-03

Similar Documents

Publication Publication Date Title
CN109600384A (en) Flow switching method, system, equipment and storage medium in RPC interface upgrade
EP2636186B1 (en) Orchestrating wireless network operations
US11405844B2 (en) Data routing method and terminal
CN108737424A (en) Authority sharing method, server, system and the readable storage medium storing program for executing of smart home
US8688839B2 (en) Intelligent connection manager
EP3968702A1 (en) Communication method and apparatus, entity and computer readable storage medium
CN107846313B (en) A kind of method and the network equipment of the generation of network service moulding plate
CN112449341B (en) IoT (Internet of things) equipment data management method, device and system
CN104834602A (en) Program issuing method, device and system
CN109558246A (en) A kind of load-balancing method, device, electronic equipment and storage medium
JP2019523605A (en) Network policy update trigger method, management function entity and core network device
CN108600344A (en) A kind of network access request dispatching method, device and storage medium
CN114924751A (en) Method and device for distributing service access request flow
CN109388655A (en) A kind of method and apparatus of dynamic control of data access
CN110557281B (en) Intelligent operation and maintenance method and device based on CMDB and alarm map
CN107666401A (en) A kind of configuration information obtaining method and terminal
CN114500288A (en) Bandwidth adjusting method and device and storage medium
CN114064091A (en) OTA (over the air) upgrade control method and device, electronic equipment and automatic driving vehicle
CN109828830A (en) Method and apparatus for managing container
CN109800020A (en) A kind of code automatic adjusting method, device, equipment and the medium of program development
US11575617B2 (en) Management of services in an Edge Computing system
WO2024016592A1 (en) Network access control method and device
CN109684059A (en) Method and device for monitoring data
CN105117278B (en) A kind of application management method and application management platform
CN110929269B (en) System authority management method, device, medium and electronic equipment

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