CN110750278A - Gray scale distribution method and device, routing equipment and storage medium - Google Patents
Gray scale distribution method and device, routing equipment and storage medium Download PDFInfo
- Publication number
- CN110750278A CN110750278A CN201910905769.0A CN201910905769A CN110750278A CN 110750278 A CN110750278 A CN 110750278A CN 201910905769 A CN201910905769 A CN 201910905769A CN 110750278 A CN110750278 A CN 110750278A
- Authority
- CN
- China
- Prior art keywords
- server
- user request
- routing
- information
- state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/22—Alternate routing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application relates to a gray scale publishing method, a gray scale publishing device, routing equipment and a storage medium. The method comprises the following steps: when a user request is acquired, acquiring the state information of a selector switch, wherein the user request comprises routing field information; when the switch is in a switching state, performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request; when the calculation result is not in the preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server is deployed with an old version product; and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product. By adopting the method, the system stability of the new version product on line can be improved and the system risk can be reduced.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for issuing a grayscale, a routing device, and a storage medium.
Background
With the rapid development of the internet technology, the update iteration of the internet product is faster and faster, and each iteration update needs to be switched from the old version product to the new version product. The traditional new and old version switching method is controlled by a switch, for example, when the switch is closed, the user flow is switched to the old version product, and when the switch is opened, the user flow is switched to the new version product. This approach is straightforward and efficient, but risks high and, once a problem occurs, has a wide range of impact.
In order to enable an old version product to be smoothly transited to a new version product, a gray release method is generally adopted, a traditional gray release method generally adopts a mode of releasing and verifying the new version product in batches, if the new version product is verified to have problems, rolling back is carried out, and if the new version product is not verified to have problems, releasing of the next batch is continued. However, the mode of releasing the gray scale in batches needs to be released for multiple times, the release period is long, and the new version product cannot cover all scenes in a short time, so that the problems of poor system stability, high system error risk and the like may occur when the new version product is on line.
Disclosure of Invention
Therefore, it is necessary to provide a gray release method, an apparatus, a routing device, and a storage medium for smoothly switching from an old version product to a new version product according to a flow ratio, so as to improve system stability and reduce system risk when the new version product is online.
A method of gray scale publishing, the method comprising:
when a user request is acquired, acquiring state information of a selector switch, wherein the user request comprises routing field information;
when the switch is in a switching state, performing a modulus operation on the routing field information to obtain a calculation result corresponding to the user request;
when the calculation result is not in a preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server deploys an old version product;
and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
In one embodiment, the performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request includes:
calculating to obtain a hash value of the routing field information, wherein the routing field information is user identification information corresponding to the user request;
and performing modular calculation on the hash value to set parameters to obtain the calculation result, wherein the set parameters are the product of the number of preset databases and preset positive integers.
In one embodiment, the method further comprises:
when the switch is in a switching state and the user identification information is in a preset white list, allocating a request corresponding to the user identification information to a second server for processing, wherein the white list comprises at least one piece of user identification information;
and when the selector switch is in a switching state and the user identification information is not in the white list, entering the operation of performing modulo operation on the routing field information.
In one embodiment, the switch includes an off state, a switching state, and an on state, and the method further includes:
when the switch is in an off state, distributing the user request to the first server for processing;
when the switch is in an open state, the user request is distributed to the second server for processing.
In one embodiment, the first server and the second server are respectively connected with the same database server, and both the first server and the second server are server clusters; preferably, the server cluster of the first server and the second server comprises the same number of servers.
In one embodiment, the method further comprises:
setting routing switching rule information, and storing the routing switching rule information in a distributed cache, wherein the routing switching rule information comprises state information of the selector switch, the white list and the flow configuration data set;
and acquiring the routing switching rule information from the distributed cache.
In one embodiment, the method further comprises:
and if the routing switching rule information is modified, synchronizing the modified routing switching rule information into the distributed cache.
A gradation issuance apparatus, comprising:
the system comprises an acquisition module, a switching module and a control module, wherein the acquisition module is used for acquiring the state information of a selector switch when acquiring a user request, and the user request comprises routing field information;
the calculation module is used for performing module taking operation on the routing field information when the selector switch is in a switching state to obtain a calculation result corresponding to the user request;
the distribution module is used for distributing the user request to a first server for processing when the calculation result is not in a preset flow configuration data set, and the first server is deployed with an old version product; and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
A routing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
when a user request is acquired, acquiring state information of a selector switch, wherein the user request comprises routing field information;
when the switch is in a switching state, performing a modulus operation on the routing field information to obtain a calculation result corresponding to the user request;
when the calculation result is not in a preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server deploys an old version product;
and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
when a user request is acquired, acquiring state information of a selector switch, wherein the user request comprises routing field information;
when the switch is in a switching state, performing a modulus operation on the routing field information to obtain a calculation result corresponding to the user request;
when the calculation result is not in a preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server deploys an old version product;
and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
According to the gray scale release method, the gray scale release device, the routing equipment and the storage medium, when a user request is obtained, state information of the change-over switch is obtained, wherein the user request comprises routing field information; when the change-over switch is in a change-over state, a module-taking operation is carried out on the routing field information to obtain a calculation result corresponding to the user request, the received user request is distributed to the first server or the second server to be processed according to whether the calculation result is in a preset flow configuration data set or not, namely, smooth switching from an old version product to a new version product according to the flow proportion is realized through the routing field information of the user request, a small data range can cover a comprehensive scene in the switching process, the problem influence range is found to be small, and therefore the system stability when the new version product is released is improved and the system risk is reduced.
Drawings
FIG. 1 is a diagram of an exemplary embodiment of a gray scale publishing process;
FIG. 2 is a flow chart illustrating a gray scale publishing process in one embodiment;
FIG. 3 is a flow diagram illustrating the modulo operation in one embodiment;
FIG. 4 is a flowchart illustrating a gray scale publishing method according to another embodiment;
fig. 5 is a block diagram showing the configuration of a gradation issuance apparatus in one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The gray scale issuing method provided by the application can be applied to the application environment shown in fig. 1. The terminal 102 communicates with the routing server 104 through a network, the routing server 104 communicates with the first server 106 and the second server 108 through the network, and the first server 106 and the second server 108 are connected to the same database server 110. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, the routing server 104 may be implemented by an independent server, an independent routing device, or a server cluster server composed of a plurality of servers, and the first server 106, the second server 108, and the database server 110 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a gray-scale distribution method is provided, which is described by taking the method as an example applied to the routing server 104 in fig. 1, and includes the following steps:
in step 202, the routing server 104 obtains the state information of the switch when obtaining a user request, where the user request includes routing field information.
The routing server 104 may receive a plurality of user requests, where a user request refers to a service request submitted by a terminal, and the routing field information may be encoded by an identifier of a user, such as a string of digital codes; the state information for the diverter switch may indicate the state the diverter switch was in when the routing server 104 obtained the user request.
Specifically, the routing server 104 receives and analyzes the user request, screens routing field information from the user request, and obtains state information of the switch at the same time, where the switch includes three states, and the three states may respectively correspond to different setting values of the switch, for example, when the setting value of the switch is 0, the switch is in a closed state, and all the received user requests are sent to the first server for processing; when the set value of the change-over switch is 2, the change-over switch is in an open state, and all received user requests are sent to the second server for processing; when the set value of the change-over switch is 1, the change-over switch is in a switching state.
And step 204, when the switch is in a switching state, performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request.
Specifically, when the switch is in the switching state, the routing server 104 performs a modulo operation on the routing field information to obtain a calculation result corresponding to the user request, and the calculation result obtained in the modulo operation step may be any integer within a range of 0 to 9.
The flow configuration data set can be preset and modified, and comprises at least one integer in a range of 0-9; the routing server 104 distributes the user request according to the calculation result.
And step 208, when the calculation result is not in the preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server deploys the old version product, namely the first server can provide the old version product service.
And step 210, when the calculation result is in the flow configuration data set, allocating the user request to a second server for processing, wherein the second server is deployed with a new version product, that is, the second server can provide a new version product service.
In the gray scale issuing method, the state information of the change-over switch can be acquired when a plurality of user requests are acquired, each user request comprises routing field information, and the routing field information is the identification code of each user; when the switch is in a switching state, performing a modulus operation on each routing field information respectively to obtain a calculation result corresponding to each user request; according to whether each calculation result is in a preset flow configuration data set or not, a plurality of received user requests are distributed to a first server or a second server for processing, the flow configuration data set can be adjusted to adjust the flow proportion of the user requests distributed to the second server, namely, smooth switching from an old version product to a new version product according to the flow proportion is achieved through routing field information of the user requests, a small data range can cover a comprehensive scene in the switching process, the problem influence range is small, and therefore system stability when the new version product is released is improved and system risks are reduced.
In one embodiment, as shown in fig. 3, the step 204, i.e. the modulus-taking operation, includes:
And 304, performing modulo calculation on the hash value to obtain a calculation result, wherein the setting parameter is the product of the preset database number and a preset positive integer.
The preset database number can be defaulted to the database number of the server, and can also be set by an operator.
In the embodiment, a gray scale publishing method is provided, which can shorten the length of a field and reduce the subsequent processing data amount by taking a hash value from a user code; and then performing modular calculation on the set parameters by the hash value, and distributing the received user request flow by the routing server according to the obtained calculation result, namely, adjusting the flow proportion distributed to the first server and the second server by the routing server by configuring the set parameters, so as to realize smooth switching from the old version product to the new version product according to the flow proportion.
In one embodiment, as shown in FIG. 4, the method includes:
specifically, the user request corresponding to the user in the white list is distributed to a second server deployed with a new version product for processing.
And step 408, if the user identification information is not in the white list, performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request.
And step 412, when the calculation result is not in the preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server is deployed with an old version product.
And step 414, when the calculation result is in the flow configuration data set, allocating the user request to a second server for processing, wherein the second server is deployed with a new version product.
In the embodiment, the method can select a small number of users through the white list to request to be distributed to the new version product for testing, and the new version product is used as a test point test before the new version is released, so that the risk of releasing the new version is reduced.
In one embodiment, the switch includes an off state, a switching state, and an on state, the method further comprising:
when the switch is in a closed state, distributing the user request to a first server for processing;
when the switch is in the on state, the user request is distributed to the second server process.
The off state, the switching state and the on state of the switch may correspond to different setting values of the switch, for example, when the setting value of the switch is 0, the switch is in the off state, and all received user requests are sent to the first server for processing; when the set value of the change-over switch is 1, the change-over switch is in a switching state; and when the set value of the change-over switch is 2, the change-over switch is in an open state, and all the received user requests are sent to the second server for processing.
Specifically, when a new version product is online, the set value of the change-over switch can default to 0, and the routing server sends the acquired 100% of the flow requested by the user to the stable old version product.
In the process of switching the old version to the new version, when a technician finds that the new version product is wrong or abnormal, the set value of the change-over switch can be set to 0 immediately, the routing server distributes all the received user request flows to the first server for processing, namely, all the user request flows are switched back to the old version product, and the switching to the new version product is stopped.
In the switching process, if a technician considers that the flow proportion requested by the current user is verified to cover all application scenes of the new version product and the data processing is normal, the set value of the change-over switch can be set to be 2, and the routing server distributes all the received user request flows to the second server for processing, namely all the user request flows are switched back to the new version product.
In the embodiment, through the arrangement of the change-over switch, the new version and the old version can be easily switched in the gray release process, once the new version finds a problem, a user request can be timely switched to the old version product, the switching is convenient, and the safety is higher.
In one embodiment, the first server and the second server are respectively connected with the same database server, and the first server and the second server are both server clusters.
The first server and the second server receive the user request from the routing server respectively for processing, and the processed data is stored in a common database server, which may be a database server cluster.
Preferably, the server cluster of the first server and the second server comprises the same number of servers. Specifically, the first server and the second server adopt a dual-cluster redundancy deployment architecture, that is, the new version product and the old version product adopt the same number of application servers, and share a database server for deployment, except that the data processing logics of the internal products of the first server and the second server are different.
In one embodiment, the method further comprises:
setting routing switching rule information, and storing the routing switching rule information in a distributed cache, wherein the routing switching rule information comprises state information of a selector switch, a white list and a flow configuration data set;
and acquiring the routing switching rule information from the distributed cache.
And if the route switching rule information is modified, synchronizing the modified route switching rule information into the distributed cache.
In particular, the modification operation of the routing switching rule information can be performed in a visual interface, so that the gray scale release process is modified and controlled conveniently.
The routing switching rule information is stored in the distributed cache, the information interaction reading speed is high, and the performance loss of a user request link is small.
In one embodiment, the set value of the switch is set to 1, the switch is in a switching state, the routing server starts switching operation, and the routing field information adopts a user code corresponding to the user request. First, a white list may be configured for a test point user test, such as: setting a white list userCode 0001, 0002, hash (userCode)% (dbNum × N) — the back value is null, where dbNum is a database number that can be set in advance, N can be a preset positive integer, and userCode is a user code corresponding to a user request, and then the user request including the user codes 0001 and 0002 is sent to the new version product for data processing, and the rest user requests are sent to the old version product for data processing.
If there is no problem in testing the user request with user codes 0001 and 0002 in the new version product, the routing server may start to distribute the user request according to the traffic proportion, for example, when dbNum is 8, N is 1, and hash (usercode)% (8 x 10) is set to 0, the user request with the remainder of 0 obtained by modulo 80 by the hash value of the user code is distributed to the new version product for data processing, that is, the user request traffic equivalent to 1/80 is distributed to the new version product for data processing, the user request traffic of 79/80 is distributed to the old version product for data processing, and the traffic proportion of gray release and the switching progress can be freely controlled by setting the values of dbNum and N.
For example, when dbNum is 8 and N is 100, hash (usercode)% (8 x 100) is set to 0, 1. User request traffic representing about 2/800 would be allocated to the new version product for data processing and user request traffic of 798/800 would be allocated to the old version product for data processing.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a gray scale issuing apparatus including: the device comprises an acquisition module, a calculation module and a distribution module, wherein:
an obtaining module 502, configured to obtain state information of a switch when a user request is obtained, where the user request includes routing field information;
the calculation module 503 is configured to perform a modulo operation on the routing field information when the switch is in the switching state, and obtain a calculation result corresponding to the user request;
the distribution module 504 is configured to distribute the user request to a first server for processing when the calculation result is not in the preset flow configuration data set, where the first server deploys an old version product; and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
In one embodiment, the calculation module comprises:
the hash value calculation unit is used for calculating the hash value of the routing field information, and the routing field information is user identification information corresponding to the user request;
and the modulus calculation unit is used for performing modulus calculation on the hash value to obtain a calculation result, wherein the setting parameter is the product of the preset database number and a preset positive integer.
In one embodiment, the apparatus further includes a white list module, configured to allocate, when the switch is in the switching state and the user identification information is in a preset white list, a request corresponding to the user identification information to a second server for processing; and when the selector switch is in the switching state and the user identification information is not in the white list, performing modulo operation on the routing field information.
In one embodiment, the switch includes an off state, a toggle state, and an on state, the apparatus further includes a toggle module to assign the user request to the first server process when the switch is in the off state; when the switch is in the on state, the user request is distributed to the second server process.
In one embodiment, a first server and a second server are respectively connected with the same database server, and both the first server and the second server are server clusters; preferably, the server cluster of the first server and the second server comprises the same number of servers.
In one embodiment, the apparatus further comprises:
the routing rule setting module is used for setting routing switching rule information and storing the routing switching rule information in a distributed cache, wherein the routing switching rule information comprises state information of a selector switch, a white list and a flow configuration data set;
and the routing rule obtaining module is used for obtaining the routing switching rule information from the distributed cache.
And the routing rule modification module is used for synchronizing the modified routing switching rule information into the distributed cache when the routing switching rule information is modified.
For the specific definition of the gray scale issuing device, reference may be made to the above definition of the gray scale issuing method, and details are not described here. The respective modules in the above-mentioned gray scale distribution apparatus can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a routing device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The routing device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the routing device is configured to provide computational and control capabilities. The memory of the routing device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the routing device is used for storing routing switching rule information data. The network interface of the routing device is used for communicating with an external terminal through network connection. The computer program is executed by a processor to implement a gray scale publishing method.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the routing device to which the present application is applied, and that a particular routing device may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a routing device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: when a user request is obtained, state information of a selector switch is obtained, wherein the user request comprises routing field information; when the switch is in a switching state, performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request; when the calculation result is not in the preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server deploys an old version product; and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
In one embodiment, the processor, when executing the computer program, further performs the steps of: performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request, including: calculating to obtain a hash value of routing field information, wherein the routing field information is user identification information corresponding to a user request; and performing modular calculation on the hash value to set parameters to obtain a calculation result, wherein the set parameters are the product of the number of the preset databases and the preset positive integer.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the selector switch is in a switching state and the user identification information is in a preset white list, distributing a request corresponding to the user identification information to a second server for processing, wherein the white list comprises at least one piece of user identification information; and when the selector switch is in the switching state and the user identification information is not in the white list, performing modulo operation on the routing field information.
In one embodiment, the switch includes an off state, a switching state, and an on state, and the processor when executing the computer program further performs the steps of: when the switch is in a closed state, distributing the user request to a first server for processing; when the switch is in the on state, the user request is distributed to the second server process.
In one embodiment, a first server and a second server are respectively connected with the same database server, and both the first server and the second server are server clusters; preferably, the server cluster of the first server and the second server comprises the same number of servers.
In one embodiment, the processor, when executing the computer program, further performs the steps of: setting routing switching rule information, and storing the routing switching rule information in a distributed cache, wherein the routing switching rule information comprises state information of a selector switch, a white list and a flow configuration data set; and acquiring the routing switching rule information from the distributed cache. And if the route switching rule information is modified, synchronizing the modified route switching rule information into the distributed cache.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: when a user request is obtained, state information of a selector switch is obtained, wherein the user request comprises routing field information; when the switch is in a switching state, performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request; when the calculation result is not in the preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server deploys an old version product; and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
In one embodiment, the computer program when executed by the processor further performs the steps of: performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request, including: calculating to obtain a hash value of routing field information, wherein the routing field information is user identification information corresponding to a user request; and performing modular calculation on the hash value to set parameters to obtain a calculation result, wherein the set parameters are the product of the number of the preset databases and the preset positive integer.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the selector switch is in a switching state and the user identification information is in a preset white list, distributing a request corresponding to the user identification information to a second server for processing, wherein the white list comprises at least one piece of user identification information; and when the selector switch is in the switching state and the user identification information is not in the white list, performing modulo operation on the routing field information.
In one embodiment, the diverter switch comprises an off state, a switching state and an on state, the computer program when executed by the processor further implementing the steps of: when the switch is in a closed state, distributing the user request to a first server for processing; when the switch is in the on state, the user request is distributed to the second server process.
In one embodiment, a first server and a second server are respectively connected with the same database server, and both the first server and the second server are server clusters; preferably, the server cluster of the first server and the second server comprises the same number of servers.
In one embodiment, the computer program when executed by the processor further performs the steps of: setting routing switching rule information, and storing the routing switching rule information in a distributed cache, wherein the routing switching rule information comprises state information of a selector switch, a white list and a flow configuration data set; and acquiring the routing switching rule information from the distributed cache. And if the route switching rule information is modified, synchronizing the modified route switching rule information into the distributed cache.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method of gray scale publishing, the method comprising:
when a user request is acquired, acquiring state information of a selector switch, wherein the user request comprises routing field information;
when the switch is in a switching state, performing a modulus operation on the routing field information to obtain a calculation result corresponding to the user request;
when the calculation result is not in a preset flow configuration data set, distributing the user request to a first server for processing, wherein the first server deploys an old version product;
and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
2. The method according to claim 1, wherein the performing a modulo operation on the routing field information to obtain a calculation result corresponding to the user request includes:
calculating to obtain a hash value of the routing field information, wherein the routing field information is user identification information corresponding to the user request;
and performing modular calculation on the hash value to set parameters to obtain the calculation result, wherein the set parameters are the product of the number of preset databases and preset positive integers.
3. The method of claim 2, further comprising:
when the change-over switch is in a change-over state and the user identification information is in a preset white list, distributing a request corresponding to the user identification information to a second server for processing;
and when the selector switch is in a switching state and the user identification information is not in the white list, entering the operation of performing modulo operation on the routing field information.
4. The method of claim 1, wherein the toggle switch comprises an off state, a toggle state, and an on state, the method further comprising:
when the switch is in an off state, distributing the user request to the first server for processing;
when the switch is in an open state, the user request is distributed to the second server for processing.
5. The method according to any one of claims 1 to 4, wherein the first server and the second server are respectively connected to the same database server, and both the first server and the second server are a server cluster; preferably, the server cluster of the first server and the second server comprises the same number of servers.
6. The method of any one of claims 1 to 4, further comprising:
setting routing switching rule information, and storing the routing switching rule information in a distributed cache, wherein the routing switching rule information comprises state information of the selector switch, the white list and the flow configuration data set;
and acquiring the routing switching rule information from the distributed cache.
7. The method of claim 6, further comprising:
and if the routing switching rule information is modified, synchronizing the modified routing switching rule information into the distributed cache.
8. A gradation issuance apparatus, characterized by comprising:
the system comprises an acquisition module, a switching module and a control module, wherein the acquisition module is used for acquiring the state information of a selector switch when acquiring a user request, and the user request comprises routing field information;
the calculation module is used for performing module taking operation on the routing field information when the selector switch is in a switching state to obtain a calculation result corresponding to the user request;
the distribution module is used for distributing the user request to a first server for processing when the calculation result is not in a preset flow configuration data set, and the first server is deployed with an old version product; and when the calculation result is in the flow configuration data set, distributing the user request to a second server for processing, wherein the second server is deployed with a new version product.
9. A routing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910905769.0A CN110750278A (en) | 2019-09-24 | 2019-09-24 | Gray scale distribution method and device, routing equipment and storage medium |
PCT/CN2020/105958 WO2021057251A1 (en) | 2019-09-24 | 2020-07-30 | Grayscale release method and apparatus, routing device and storage medium |
CA3155718A CA3155718A1 (en) | 2019-09-24 | 2020-07-30 | Grayscale publishing method and device, routing equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910905769.0A CN110750278A (en) | 2019-09-24 | 2019-09-24 | Gray scale distribution method and device, routing equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110750278A true CN110750278A (en) | 2020-02-04 |
Family
ID=69276989
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910905769.0A Pending CN110750278A (en) | 2019-09-24 | 2019-09-24 | Gray scale distribution method and device, routing equipment and storage medium |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN110750278A (en) |
CA (1) | CA3155718A1 (en) |
WO (1) | WO2021057251A1 (en) |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111538529A (en) * | 2020-04-27 | 2020-08-14 | 中国银行股份有限公司 | Gray scale publishing method and device |
CN111708787A (en) * | 2020-05-07 | 2020-09-25 | 中国人民财产保险股份有限公司 | Multi-center service data management system |
CN111736872A (en) * | 2020-06-22 | 2020-10-02 | 平安健康保险股份有限公司 | Gray scale release upgrading method and device, computer system and readable storage medium |
CN112114869A (en) * | 2020-09-18 | 2020-12-22 | 聚好看科技股份有限公司 | Server, gray level publishing method, device and medium |
CN112187662A (en) * | 2020-09-16 | 2021-01-05 | 银盛支付服务股份有限公司 | Apollo-based traffic distribution method |
CN112235651A (en) * | 2020-10-12 | 2021-01-15 | 北京金山云网络技术有限公司 | Configuration parameter selection method, device, equipment and storage medium |
CN112231395A (en) * | 2020-09-14 | 2021-01-15 | 苏宁金融科技(南京)有限公司 | Transaction data synchronization method and server |
CN112433751A (en) * | 2020-12-18 | 2021-03-02 | 江苏满运物流信息有限公司 | Gray scale distribution method and device, electronic equipment and storage medium |
WO2021057251A1 (en) * | 2019-09-24 | 2021-04-01 | 苏宁云计算有限公司 | Grayscale release method and apparatus, routing device and storage medium |
CN112835617A (en) * | 2021-03-02 | 2021-05-25 | 北京字节跳动网络技术有限公司 | Gray scale publishing method, device, server and readable medium |
CN113162858A (en) * | 2021-04-23 | 2021-07-23 | 中科云谷科技有限公司 | Flow forwarding system, equipment and method and Internet of things system |
CN113344704A (en) * | 2021-05-31 | 2021-09-03 | 中国工商银行股份有限公司 | Gray scale release control method and device based on real-time transaction processing |
CN113434188A (en) * | 2021-06-24 | 2021-09-24 | 未鲲(上海)科技服务有限公司 | Gray scale playback method, apparatus, computer device and storage medium |
CN113448755A (en) * | 2021-07-09 | 2021-09-28 | 中国银行股份有限公司 | Transaction routing method and device for switching between new system and old system |
CN113610637A (en) * | 2021-08-12 | 2021-11-05 | 上海通联金融服务有限公司 | Intelligent route publishing method supported by gray algorithm |
CN113656303A (en) * | 2021-08-16 | 2021-11-16 | 网易(杭州)网络有限公司 | Method, apparatus, storage medium, and program product for testing new functions of game |
CN113765960A (en) * | 2020-07-01 | 2021-12-07 | 北京京东尚科信息技术有限公司 | Operation and maintenance flow cutting method and system |
CN113918237A (en) * | 2021-09-23 | 2022-01-11 | 广州品唯软件有限公司 | Gray scale publishing method, device, equipment and computer readable medium |
CN114124819A (en) * | 2021-10-22 | 2022-03-01 | 北京乐我无限科技有限责任公司 | Flow distribution control method and device, storage medium and computer equipment |
CN114389948A (en) * | 2022-01-12 | 2022-04-22 | 平安普惠企业管理有限公司 | Function upgrading and verifying method, device, equipment and medium based on white list |
CN114816790A (en) * | 2022-04-11 | 2022-07-29 | 深圳乐信软件技术有限公司 | Data processing method, device, equipment and medium for tangential measurement process |
CN114840249A (en) * | 2022-05-18 | 2022-08-02 | 吉林银行股份有限公司 | Gray level publishing method, device and equipment for centralized business system |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113656100B (en) * | 2021-08-17 | 2023-07-07 | 城云科技(中国)有限公司 | Interface switching method, device, electronic device and computer program product |
CN114358921A (en) * | 2022-01-07 | 2022-04-15 | 中国工商银行股份有限公司 | System switching method, apparatus, device, medium, and program product |
CN114390105B (en) * | 2022-03-01 | 2024-06-18 | 杭州阿里巴巴海外互联网产业有限公司 | Enterprise user distribution method and equipment based on test |
CN116033015B (en) * | 2022-12-29 | 2024-03-12 | 联通智网科技股份有限公司 | Flow segmentation method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105099988A (en) * | 2014-04-24 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Method used for supporting gray releasing, access method, devices and system |
CN105955761A (en) * | 2016-06-30 | 2016-09-21 | 乐视控股(北京)有限公司 | Docker-based gray level issuing device and docker-based gray level issuing method |
WO2017071425A1 (en) * | 2015-10-29 | 2017-05-04 | 腾讯科技(深圳)有限公司 | Method and device for updating version |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109445811B (en) * | 2018-09-07 | 2024-05-28 | 平安科技(深圳)有限公司 | Gray release method, device, computer equipment and computer storage medium |
CN109992273B (en) * | 2019-01-03 | 2022-12-20 | 蔚来(安徽)控股有限公司 | Gray scale publishing method and gray scale publishing system |
CN110750278A (en) * | 2019-09-24 | 2020-02-04 | 苏宁云计算有限公司 | Gray scale distribution method and device, routing equipment and storage medium |
-
2019
- 2019-09-24 CN CN201910905769.0A patent/CN110750278A/en active Pending
-
2020
- 2020-07-30 CA CA3155718A patent/CA3155718A1/en active Pending
- 2020-07-30 WO PCT/CN2020/105958 patent/WO2021057251A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105099988A (en) * | 2014-04-24 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Method used for supporting gray releasing, access method, devices and system |
WO2017071425A1 (en) * | 2015-10-29 | 2017-05-04 | 腾讯科技(深圳)有限公司 | Method and device for updating version |
CN105955761A (en) * | 2016-06-30 | 2016-09-21 | 乐视控股(北京)有限公司 | Docker-based gray level issuing device and docker-based gray level issuing method |
Non-Patent Citations (1)
Title |
---|
陈燕妮: "企业ERP系统灰度发布", 《电脑知识与技术》 * |
Cited By (34)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021057251A1 (en) * | 2019-09-24 | 2021-04-01 | 苏宁云计算有限公司 | Grayscale release method and apparatus, routing device and storage medium |
CN111538529A (en) * | 2020-04-27 | 2020-08-14 | 中国银行股份有限公司 | Gray scale publishing method and device |
CN111708787A (en) * | 2020-05-07 | 2020-09-25 | 中国人民财产保险股份有限公司 | Multi-center service data management system |
CN111736872A (en) * | 2020-06-22 | 2020-10-02 | 平安健康保险股份有限公司 | Gray scale release upgrading method and device, computer system and readable storage medium |
CN111736872B (en) * | 2020-06-22 | 2023-07-14 | 平安健康保险股份有限公司 | Gray scale release upgrading method, device, computer system and readable storage medium |
CN113765960A (en) * | 2020-07-01 | 2021-12-07 | 北京京东尚科信息技术有限公司 | Operation and maintenance flow cutting method and system |
CN113765960B (en) * | 2020-07-01 | 2023-12-05 | 北京京东尚科信息技术有限公司 | Operation and maintenance tangential flow method, system and computer readable medium |
CN112231395A (en) * | 2020-09-14 | 2021-01-15 | 苏宁金融科技(南京)有限公司 | Transaction data synchronization method and server |
CN112187662B (en) * | 2020-09-16 | 2023-03-28 | 银盛支付服务股份有限公司 | Apollo-based traffic distribution method |
CN112187662A (en) * | 2020-09-16 | 2021-01-05 | 银盛支付服务股份有限公司 | Apollo-based traffic distribution method |
CN112114869A (en) * | 2020-09-18 | 2020-12-22 | 聚好看科技股份有限公司 | Server, gray level publishing method, device and medium |
CN112235651A (en) * | 2020-10-12 | 2021-01-15 | 北京金山云网络技术有限公司 | Configuration parameter selection method, device, equipment and storage medium |
CN112235651B (en) * | 2020-10-12 | 2022-08-12 | 北京金山云网络技术有限公司 | Configuration parameter selection method, device, equipment and storage medium |
CN112433751A (en) * | 2020-12-18 | 2021-03-02 | 江苏满运物流信息有限公司 | Gray scale distribution method and device, electronic equipment and storage medium |
CN112433751B (en) * | 2020-12-18 | 2022-07-08 | 江苏满运物流信息有限公司 | Gray scale distribution method and device, electronic equipment and storage medium |
CN112835617A (en) * | 2021-03-02 | 2021-05-25 | 北京字节跳动网络技术有限公司 | Gray scale publishing method, device, server and readable medium |
CN112835617B (en) * | 2021-03-02 | 2024-04-02 | 北京字节跳动网络技术有限公司 | Gray release method, device, server and readable medium |
CN113162858A (en) * | 2021-04-23 | 2021-07-23 | 中科云谷科技有限公司 | Flow forwarding system, equipment and method and Internet of things system |
CN113344704A (en) * | 2021-05-31 | 2021-09-03 | 中国工商银行股份有限公司 | Gray scale release control method and device based on real-time transaction processing |
CN113434188A (en) * | 2021-06-24 | 2021-09-24 | 未鲲(上海)科技服务有限公司 | Gray scale playback method, apparatus, computer device and storage medium |
CN113448755A (en) * | 2021-07-09 | 2021-09-28 | 中国银行股份有限公司 | Transaction routing method and device for switching between new system and old system |
CN113448755B (en) * | 2021-07-09 | 2024-02-23 | 中国银行股份有限公司 | Transaction routing method and device for switching between new and old systems |
CN113610637A (en) * | 2021-08-12 | 2021-11-05 | 上海通联金融服务有限公司 | Intelligent route publishing method supported by gray algorithm |
CN113610637B (en) * | 2021-08-12 | 2023-07-04 | 上海通联金融服务有限公司 | Intelligent route publishing method under support of gray level algorithm |
CN113656303A (en) * | 2021-08-16 | 2021-11-16 | 网易(杭州)网络有限公司 | Method, apparatus, storage medium, and program product for testing new functions of game |
CN113918237B (en) * | 2021-09-23 | 2024-10-01 | 广州品唯软件有限公司 | Gray release method, device, equipment and computer readable medium |
CN113918237A (en) * | 2021-09-23 | 2022-01-11 | 广州品唯软件有限公司 | Gray scale publishing method, device, equipment and computer readable medium |
CN114124819A (en) * | 2021-10-22 | 2022-03-01 | 北京乐我无限科技有限责任公司 | Flow distribution control method and device, storage medium and computer equipment |
CN114124819B (en) * | 2021-10-22 | 2024-02-09 | 北京乐我无限科技有限责任公司 | Flow distribution control method and device, storage medium and computer equipment |
CN114389948A (en) * | 2022-01-12 | 2022-04-22 | 平安普惠企业管理有限公司 | Function upgrading and verifying method, device, equipment and medium based on white list |
CN114389948B (en) * | 2022-01-12 | 2024-05-24 | 北京神州数码云科信息技术有限公司 | Function upgrading and verifying method, device, equipment and medium based on white list |
CN114816790A (en) * | 2022-04-11 | 2022-07-29 | 深圳乐信软件技术有限公司 | Data processing method, device, equipment and medium for tangential measurement process |
CN114840249B (en) * | 2022-05-18 | 2023-08-08 | 吉林银行股份有限公司 | Gray scale release method, device and equipment of centralized service system |
CN114840249A (en) * | 2022-05-18 | 2022-08-02 | 吉林银行股份有限公司 | Gray level publishing method, device and equipment for centralized business system |
Also Published As
Publication number | Publication date |
---|---|
CA3155718A1 (en) | 2021-04-01 |
WO2021057251A1 (en) | 2021-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110750278A (en) | Gray scale distribution method and device, routing equipment and storage medium | |
CN111736872B (en) | Gray scale release upgrading method, device, computer system and readable storage medium | |
CN109039751B (en) | Method, device, computer equipment and storage medium for configuring route | |
CN110351357A (en) | Server current-limiting method, device, computer equipment and storage medium | |
CN111666576A (en) | Data processing model generation method and device and data processing method and device | |
CN111371603A (en) | Service instance deployment method and device applied to edge computing | |
CN111352670B (en) | Virtual reality scene loading method and device, virtual reality system and equipment | |
CN111651285A (en) | Batch business data processing method and device, computer equipment and storage medium | |
CN110955448A (en) | Intelligent contract separation method, contract processing method, apparatus, device and medium | |
CN108280761A (en) | Increase letter side's distribution method, device, computer equipment and storage medium | |
CN108564345B (en) | Insurance platform data processing method, electronic device and computer readable storage medium | |
CN110704177A (en) | Computing task processing method and device, computer equipment and storage medium | |
CN111143023A (en) | Resource changing method and device, equipment and storage medium | |
CN111338779A (en) | Resource allocation method, device, computer equipment and storage medium | |
US20170104683A1 (en) | Dynamically segmenting traffic for a/b testing in a distributed computing environment | |
WO2016028534A1 (en) | Method and apparatus for localized management of feature licenses | |
CN113656163A (en) | Service resource scheduling method, device, computer equipment and storage medium | |
CN114115967A (en) | Service data processing method and device, computer equipment and storage medium | |
CN113610558A (en) | Resource distribution method and device, electronic equipment and storage medium | |
CN112989147A (en) | Data information pushing method and device, computer equipment and storage medium | |
CN111510771B (en) | Selection method, system, device and medium of definition switching algorithm | |
CN110647336A (en) | Gray scale distribution method and device, computer equipment and storage medium | |
CN113742681B (en) | Account management method and device, computer equipment and storage medium | |
CN115460324A (en) | Outbound processing method, device, computer equipment and storage medium | |
CN107294724B (en) | Short message uplink verification method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200204 |