CN114615135A - Front-end gray level publishing method, system and storage medium - Google Patents
Front-end gray level publishing method, system and storage medium Download PDFInfo
- Publication number
- CN114615135A CN114615135A CN202210149835.8A CN202210149835A CN114615135A CN 114615135 A CN114615135 A CN 114615135A CN 202210149835 A CN202210149835 A CN 202210149835A CN 114615135 A CN114615135 A CN 114615135A
- Authority
- CN
- China
- Prior art keywords
- gray
- rule
- gray scale
- version
- lua
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000003860 storage Methods 0.000 title claims abstract description 15
- 238000012545 processing Methods 0.000 claims abstract description 41
- 238000012856 packing Methods 0.000 claims abstract description 14
- 230000004044 response Effects 0.000 claims abstract description 9
- 230000003068 static effect Effects 0.000 claims description 14
- 238000010276 construction Methods 0.000 claims description 7
- 235000014510 cooky Nutrition 0.000 claims description 6
- 238000009826 distribution Methods 0.000 claims description 6
- 238000004806 packaging method and process Methods 0.000 claims description 6
- 230000002085 persistent effect Effects 0.000 claims description 4
- 238000000605 extraction Methods 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000002441 reversible effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005316 response function Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
-
- 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
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a front-end gray scale publishing method, a system and a storage medium, wherein the method comprises the following steps: after the code coding is completed, packing the gray level versions, and deploying and releasing the gray level codes to the gray level directory, wherein the gray level directory name adopts a form of a normal directory name plus a gray level version number; when a client request is received, according to the request resource type, forwarding the client request to a lua gray level processing module through openness nginx; acquiring a gray rule from a preset gray rule list through the lua gray processing module, and executing to obtain a gray resource path; and informing the nginx grayscale resource path and continuing to execute the response. Compared with the prior art, the invention realizes the extraction of the gray processing logic, the uniform configuration and deployment of the gray processing logic, the one-key gray switch of the gray and the flexible definition of the gray rule by utilizing the existing machine resources on the premise of not changing the URL path identifier.
Description
Technical Field
The invention relates to the technical field of information, in particular to a front-end gray level publishing method, a front-end gray level publishing system and a storage medium.
Background
Under the large background of the separation of the current front-end and back-end technologies, the traditional form of distinguishing and judging versions and dynamically responding to web pages depending on the back-end application is not feasible, and the current front-end gray level schemes mainly comprise the following steps:
1. in the front-end project code, dynamically judging and displaying different contents according to information of a current login user, a role, a user agent, other equipment and the like, determining that the code is difficult to maintain, multiplying the code maintenance amount when a plurality of versions coexist, and deleting related gray logic when the gray is finished to cause repeated work;
2. different versions are marked through different URLs, different gray level links are issued for users needing to use gray level versions, but the links are used as application identifiers and can be widely spread, misunderstanding of the users can be caused to a certain extent, and when the gray level is finished, the links are compatible to point to stable versions, and later-stage workload is increased;
3. the gray level project is deployed on a single machine, and the flow is directed to the gray level machine by distinguishing the identification such as IP (Internet protocol), proxy and the like, but the method causes additional resource waste and cannot be distinguished according to the identity of a user, and meanwhile, the use of cdn also needs special treatment.
Disclosure of Invention
The invention mainly aims to provide a front-end gray scale publishing method, a front-end gray scale publishing system and a storage medium, aiming at solving the problems that on the premise of not changing URL path identification, the existing machine resources are utilized to extract gray scale processing logic, the gray scale processing logic is configured and deployed uniformly, one-key gray scale switch of gray scale is realized, and gray scale rules are defined flexibly.
In order to achieve the above object, the present invention provides a front-end gray scale publishing method, including the following steps:
step S10, after the code coding is finished, packing the gray version devops and deploying and releasing the gray code to the gray directory, wherein the name of the gray directory adopts the form of normal directory name + gray version number;
step S20, when receiving the client request, according to the request resource type, the client request is transferred to the lua gray processing module through openrestynginx;
step S30, obtaining a gray rule from a preset gray rule list through the lua gray processing module, and executing to obtain a gray resource path;
in step S40, the nginx grayscale resource path is notified, and the response is continued.
The further technical solution of the present invention is that, in step S10, after the code encoding is completed, the step of packing and deploying the grayscale version demops to the grayscale directory includes:
pre-drafting a gray version number;
in the step S10, when the code encoding is completed, the step of packing the grayscale version devops and deploying and issuing the grayscale code to the grayscale directory includes:
after the code coding is completed, a gray scale version number is automatically added in front of a static resource path in a page through a webpack construction system, and then the gray scale version number is automatically packed and deployed to a gray scale catalog by using a release system in an independent packing mode.
A further technical solution of the present invention is that, in step S20, when receiving a client request, the step of forwarding the client request to the lua gray processing module through openness nginx according to a request resource type includes:
when a client request is received, distinguishing request resource types;
determining a processing mode according to the type of the request resource, uniformly forwarding the request of the html file to the lua gray level module for processing, setting a bottom-pocket strategy, and responding to a normal version by using the bottom-pocket strategy when the gray level module is unavailable and causes an error or is not matched with a gray level version; when cdn return source processing is required for the static resource part, a gray resource path is determined according to whether a gray version identification exists in the matched static resource url.
A further technical solution of the present invention is that, in step S30, the lua gray processing module obtains the gray rule from the preset gray rule list and executes the gray rule, and the step of obtaining the gray resource path includes:
and after the lua gray processing module receives the forwarded client request, extracting information carried by the client request, pulling a preset gray rule list, executing according to the rule sequence, determining a gray resource path according to a gray version number corresponding to any one rule once the rule is matched, and returning to nginx for continuous execution.
The further technical scheme of the invention is that the information carried by the client request at least comprises one or more of user agent, IP, cookie, header and request body information of the user.
The further technical solution of the present invention is that, in the step S40, the step of notifying the nginx grayscale resource path and continuing to execute the response includes:
and finding a target file according to the gray resource path and responding.
A further technical solution of the present invention is that, in step S30, the step of obtaining the gray rule from the preset gray rule list through the lua gray processing module and executing the gray rule, the step of obtaining the gray resource path includes:
dynamically managing and setting gray rule and gray version, and establishing a gray rule table of the incidence relation of the gray rule and the gray version.
The invention further adopts the technical scheme that in the step of dynamically managing and setting the gray rule and the gray version and establishing the gray rule list of the incidence relation between the gray rule and the gray version, each gray rule supports the entry of a self-defined lua script, the priority of gray matching is realized through rule sequencing, a key switch is carried out on the rule under each version number, and the finally effective rule list can be synchronously written into the cache service while the persistent storage is carried out in each operation.
To achieve the above object, the present invention further provides a front-end gray scale publishing system, which includes a memory, a processor, and a front-end gray scale publishing program stored on the processor, wherein the front-end gray scale publishing program executes the steps of the method when executed by the processor.
To achieve the above object, the present invention further provides a computer readable storage medium, which stores a front-end gray scale distribution program, and when the front-end gray scale distribution program is executed by a processor, the front-end gray scale distribution program performs the steps of the method as described above.
The method, the system and the storage medium for releasing the front-end gray level have the advantages that: according to the technical scheme, after code coding is completed, gray level versions are packed and deployed to release gray level codes to a gray level directory, wherein the gray level directory name adopts a form of a normal directory name plus a gray level version number; when a client request is received, according to the request resource type, forwarding the client request to a lua gray level processing module through openness nginx; acquiring a gray rule from a preset gray rule list through the lua gray processing module, and executing to obtain a gray resource path; and informing the nginx gray scale resource path and continuously executing response, so that on the premise of not changing the URL path identifier, the gray scale processing logic is extracted, unified configuration and deployment are realized by using the existing machine resource, the gray scale one-key gray scale switch is realized, and the gray scale rule is flexibly defined.
Drawings
FIG. 1 is a schematic overall flow chart diagram of a preferred embodiment of a front-end gray scale publishing method according to the invention;
FIG. 2 is a system architecture diagram of a front-end gray scale distribution system;
FIG. 3 is a flow chart of a gray code packaging and publishing system;
FIG. 4 is a gray level association rule system flow diagram;
fig. 5 is a flowchart of a gradation matching execution system.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Referring to fig. 1 to 5, in order to solve the problem that the gray processing logic is extracted, uniformly configured and deployed, a one-key gray switch for gray is implemented, and a gray rule is flexibly defined by using the existing machine resources without changing the URL path identifier, the present invention provides a front-end gray release method, where a preferred embodiment of the front-end gray release method includes the following steps:
step S10, after the code coding is finished, packing the gray version devops and deploying and releasing the gray code to the gray directory, wherein the name of the gray directory adopts the form of normal directory name + gray version number.
In the normal packing and deploying process, the gray scale process is introduced, the construction server automatically processes the gray scale compatible path according to the gray scale version number, and the compatibility process cdn returns to the source access.
Step S20, when receiving the client request, according to the request resource type, the client request is forwarded to the lua gray processing module through openrestynginx.
And step S30, acquiring the gray rule from the preset gray rule list through the lua gray processing module, and executing to obtain a gray resource path.
In step S40, the nginx grayscale resource path is notified, and the response is continued.
Specifically, in this embodiment, in the step S10, after the code encoding is completed, the step of packing and deploying the release grayscale code to the grayscale directory by the grayscale version revops includes:
and pre-drafting the version number of the gray scale.
In the step S10, when the code encoding is completed, the step of packing the grayscale version devops and deploying and issuing the grayscale code to the grayscale directory includes:
after the code coding is completed, a gray scale version number is automatically added in front of a static resource path in a page through a webpack construction system, and then the gray scale version number is automatically packed and deployed to a gray scale catalog by using a release system in an independent packing mode.
In this embodiment, the step S20, when receiving the client request, forwarding the client request to the lua gray processing module through openness nginx according to the request resource type, includes:
when a client request is received, distinguishing request resource types;
determining a processing mode according to the type of a request resource, uniformly forwarding a request for the html file to a lua gray level module for processing, setting a bottom-pocket strategy, and responding to a normal version by using the bottom-pocket strategy when the gray level module is unavailable and an error occurs or a gray level version is not matched; when cdn return source processing is required for the static resource part, a gray resource path is determined according to whether a gray version identification exists in the matched static resource url.
In this embodiment, the obtaining of the gray rule from the preset gray rule list by the lua gray processing module and the executing of the gray rule obtain the gray resource path includes:
and after the lua gray processing module receives the forwarded client request, extracting information carried by the client request, pulling a preset gray rule list, executing according to the rule sequence, determining a gray resource path according to a gray version number corresponding to any one rule once the rule is matched, and returning to nginx for continuous execution.
The information carried by the client request at least comprises one or more of user agent, IP, cookie, header, request body and the like of the user.
In this embodiment, the step S40, the step of notifying the nginx grayscale resource path and continuing to execute the response includes:
and finding a target file according to the gray resource path and responding.
In this embodiment, in step S30, the obtaining, by the lua gray scale processing module, a gray scale rule from a preset gray scale rule list and executing the gray scale rule, where the obtaining the gray scale resource path includes:
dynamically managing and setting gray rule and gray version, and establishing a gray rule table of the incidence relation of the gray rule and the gray version.
Specifically, in the step of dynamically managing and setting gray rules and gray versions, and establishing a gray rule table of an incidence relation between the gray rules and the gray versions, each gray rule supports entry of a custom lua script, priority of gray matching is realized through rule sorting, a one-key switch is performed on the rule under each version number, and a finally effective rule list is synchronously written into cache services such as redis and the like while persistent storage is performed in each operation.
The front end gray scale distribution method of the present invention is further described in detail below.
The front-end gray scale release method can be applied to a front-end gray scale release system, wherein the front-end gray scale release system provides a gray scale code automatic packaging deployment system, a gray scale rule management system and a gray scale matching execution system.
Automatic gray code packaging and deploying system
In the normal packing deployment process, a gray scale process is introduced, the construction server automatically processes a gray scale resource path according to the gray scale version number, and the compatibility processing cdn returns to the source access.
And (3) automatic deployment of the project, wherein the construction server is connected with the production server in scp and other modes, and the construction server is deployed into a gray scale catalog of the production server according to the gray scale version number.
Second, gray rule management system
The system comprises an employee identity authority management function, login is achieved through employee identity authentication, and project configuration authority is determined according to employee roles.
The system comprises a rule configuration function, a user is allowed to input a rule script in the form of lua grammar through online editing capacity, the rule script is subjected to logic writing according to rule variables provided by the gray matching execution system strictly, and the script grammar is verified during rule storage so as to avoid error rules.
The system comprises the function of associating the rule with the gray version number, and firstly, the relation between the gray rule and the gray version number is determined. The AB test mode is extended, the number of versions is not limited theoretically, that is, multiple sets of versions such as 1, 2, 3 and 4 exist at the same time, each version has a unique version number identifier, and the identifier of each version number corresponds to multiple rules. For example, if we want to use our grayscale version for users in shenzhen city range or customers whose users belong to VIP level first, two rules can be configured, the first rule locates customer geographic location according to customer IP, the second rule determines user identity according to user login status, and whether the user is our VIP customer, and any one of the two rules is satisfied. Therefore, rules are subdivided to facilitate understanding, reuse of the rules by subsequent different gray scale versions is facilitated, and theoretically, most gray scale configuration scenes can be met only by making a small number of common rules.
The system comprises a function of enabling a disabling strategy by one key for each gray scale version and rule, persistent storage is carried out in each operation, and in order to obtain the rule as efficiently as possible, the finally enabled rule is synchronized into a redis cache middleware in each storage.
Three, grey matching execution system
The system comprises a matching forwarding function of client requests, when a client initiates a request, the client requests are forwarded to a final ecs server after SLB load balancing, each ecs server is deployed with openness, the request is forwarded to a gray module by using the location capability provided by the nginx module, and after a gray version number is obtained, a background service IP of a corresponding version number can be requested according to the reverse proxy capability provided by the nginx.
The system comprises a gray rule execution matching function, and rule variables including but not limited to user agent, network, os, osVersion, IP, header, cookie and the like are analyzed by using information carried by the request. And after the rule list is obtained from the rule management system, sequentially executing, and once a certain rule is successfully matched, obtaining the gray version number corresponding to the rule and forwarding a request to the nginx module.
The system comprises a resource response function, the nginx splices the static resource path of the project and the background gateway path of the proxy _ pass reverse proxy after receiving the gray version number returned by the gray module, finally responds the corresponding resource to the client, and executes the bottom-holding strategy and returns the normal resource when the gray module fails to execute or the gray version is not found.
The flow involved in the front-end gray scale publishing method of the invention is as follows.
The method comprises the following steps: automatic packaging and issuing of gray codes
As shown in fig. 3, the grey release needs to make the version number of the grey release in advance, and the main reason for doing so is that when the grey version and the normal version are run on one server at the same time, in order to distinguish between them, the catalog they deploy needs to be marked down by the version number, and meanwhile, since when the source is returned at cdn, the grey version and the normal version can only be distinguished by the URL, the version number needs to be marked to cdn link in advance during code packaging.
The normal version is released based on a gitflow model, the releasing process needs to be branched to a develop and master branch process through feature, but the gray version is separated from the model, the feature branch is adopted for the gray version all the time, when the release system is released, only the branch and the version number need to be appointed, the system can automatically deploy codes to a production server according to certain rules, and meanwhile, the resource backup can be carried out every time the release is carried out, and the one-key rollback is convenient to carry out when the version goes wrong.
Step two: gray scale rule configuration
The gray scale rule configuration module is used as a gray scale control center, the operation is simple and reusable as much as possible, and accidents caused by the fact that the rule is unavailable due to negligence of manual entry of the rule are reduced. As shown in fig. 4:
1. and (3) creating a configuration record in the gray rule configuration system according to the version number drawn up in the step one, wherein one or more rules can be created in the configuration record according to actual requirements.
2. The entry of the rule is in the form of lua code, and preset variables which can be used in the lua code comprise cookie, userId, header, ip, userAgent and the like.
The preset variables refer to variables stated in advance in the memory before the gray code is executed in the gray matching module, and generally include all available information currently requested by the client.
3. When the gray scale rule configuration is completed, the real-time effect is realized through the enabling/disabling operation of the system configuration. In order to meet the performance problem of the acquisition of the gray rule in the high concurrency scene.
Here, data is cached through distributed redis at each critical operation, such as enabling/disabling.
Step three: gray scale rule matching
The core of the gray rule matching is that the information carried in the client request is matched with the gray rule, the corresponding version is responded according to the matching result, and the normal version is returned under the default condition. openness is a high-performance platform based on nginx and lua, assuming that the application servers are all installed with openness, as shown in fig. 5:
1. when the nginx module receives the client request, whether the gray level item is enabled is matched through location, if yes, the request is forwarded to the lua gray level module, and meanwhile, the nginx can store the request information band of the URL, the header and the like requested by the client in the global variable. The header generally refers to a header part of an http protocol, and some information of the client and the browser can be marked through a user agent in the header, and the cookie identifies the session state of the client.
2. After the lua gray level module receives the request, request information such as URL is analyzed, necessary information is prepared, the gray level rule is pulled from the gray level configuration system, because redis caching is performed on the rule list in the step two, the rule list can be directly obtained through connection of redis, each rule is sequentially executed after the rule list is taken, and when the rule is successfully executed, the gray level version is matched, and the version number corresponding to the gray level rule is obtained. And when all the rules fail to be executed or information such as system abnormity appears, the gray-scale version is considered to be absent. And splicing to obtain a static path according to the obtained version number and returning the static path to nginx.
3. And after the nginx acquires the static resource path, searching a corresponding resource file and responding to the 200http state code.
4. In addition, if the request received by nginx is a source returning request of cdn, the gray version number of the cdn link upper band set in the step one is matched to the corresponding nginx location through regular matching, a path of the static resource is spliced according to the matched version number, the corresponding resource file is searched, and the 200http state code is responded.
The front-end gray level publishing method has the beneficial effects that: according to the technical scheme, after code coding is completed, gray level versions are packed and deployed to release gray level codes to a gray level directory, wherein the gray level directory name adopts a form of a normal directory name plus a gray level version number; when a client request is received, according to the request resource type, forwarding the client request to a lua gray level processing module through openness nginx; acquiring a gray rule from a preset gray rule list through the lua gray processing module, and executing to obtain a gray resource path; informing the nginx gray scale resource path and continuously executing response, realizing the extraction and uniform configuration and deployment of gray scale processing logic by using the existing machine resources on the premise of not changing the URL path identifier, realizing the one-key gray scale switch of gray scale, and flexibly defining the gray scale rule.
In order to achieve the above object, the present invention further provides a front-end gray scale publishing system, where the system includes a memory, a processor, and a front-end gray scale publishing program stored on the processor, and when the front-end gray scale publishing program is executed by the processor, the steps of the method according to the above embodiment are performed, which are not described herein again.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, on which a front-end gray scale publishing program is stored, where the front-end gray scale publishing program is executed by a processor to perform the steps of the method described above, and details are not described herein again.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A front-end gray scale publishing method is characterized by comprising the following steps:
step S10, after the code coding is finished, packing the gray version devops and deploying and releasing the gray code to the gray directory, wherein the name of the gray directory adopts the form of normal directory name + gray version number;
step S20, when receiving the client request, according to the request resource type, the client request is forwarded to the lua gray processing module through openness nginx;
step S30, obtaining a gray rule from a preset gray rule list through the lua gray processing module, and executing to obtain a gray resource path;
in step S40, the nginx grayscale resource path is notified, and the response is continued.
2. The front-end gray scale publishing method according to claim 1, wherein in step S10, after the code encoding is completed, the step of packing and deploying the release gray scale code to the gray scale directory by the gray scale version revops comprises:
pre-drafting a gray version number;
in the step S10, when the code encoding is completed, the step of packing the grayscale version devops and deploying and issuing the grayscale code to the grayscale directory includes:
after the code encoding is finished, a gray version number is automatically added in front of a static resource path in a page through a webpack construction system, and then the gray code is automatically packaged and deployed to a gray directory by a release system in an independent packaging mode.
3. The front-end gray-scale distribution method of claim 2, wherein the step S20, when receiving the client request, forwarding the client request to the lua gray-scale processing module through openness nginx according to the request resource type, comprises:
when a client request is received, distinguishing request resource types;
determining a processing mode according to the type of the request resource, uniformly forwarding the request of the html file to the lua gray level module for processing, setting a bottom-pocket strategy, and responding to a normal version by using the bottom-pocket strategy when the gray level module is unavailable and causes an error or is not matched with a gray level version; when cdn return source processing is required for the static resource part, a gray resource path is determined according to whether a gray version identification exists in the matched static resource url.
4. The front-end gray scale distribution method according to claim 3, wherein the step S30, obtaining the gray scale rule from the preset gray scale rule list through the lua gray scale processing module, and executing, the step of obtaining the gray scale resource path includes:
and after the lua gray processing module receives the forwarded client request, extracting information carried by the client request, pulling a preset gray rule list, executing according to the rule sequence, determining a gray resource path according to a gray version number corresponding to any one rule once the rule is matched, and returning to nginx for continuous execution.
5. The front-end gray scale publishing method according to claim 4, wherein the information carried by the client request at least comprises one or more of user agent, IP, cookie, header, and request body information of the user.
6. The front-end gray scale distribution method according to claim 1, wherein the step S40 of notifying nginx gray scale resource path and continuing to execute response comprises:
and finding a target file according to the gray resource path and responding.
7. The front-end gray scale distribution method according to any one of claims 1 to 6, wherein the step S30 is executed by the lua gray scale processing module obtaining a gray scale rule from a preset gray scale rule list, and the step of obtaining a gray scale resource path includes:
dynamically managing and setting gray rule and gray version, and establishing a gray rule table of the incidence relation of the gray rule and the gray version.
8. The front-end gray scale issuing method according to claim 7, wherein in the step of dynamically managing and setting gray scale rules and gray scale versions, and establishing a gray scale rule table of an association relationship between the gray scale rules and the gray scale versions, each gray scale rule supports entry of a custom lua script, and priority of gray scale matching is realized through rule sorting, a key switch is performed for rules under each version number, and a rule list which finally becomes effective is synchronously written into a cache service while persistent storage is performed for each operation.
9. A front-end gray scale publishing system, characterized in that the system comprises a memory, a processor, and a front-end gray scale publishing program stored on the processor, which when executed by the processor performs the steps of the method according to any of claims 1 to 8.
10. A computer-readable storage medium, having stored thereon a front-end gray-scale distribution program which, when executed by a processor, performs the steps of the method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210149835.8A CN114615135B (en) | 2022-02-18 | 2022-02-18 | Front-end gray level publishing method, system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210149835.8A CN114615135B (en) | 2022-02-18 | 2022-02-18 | Front-end gray level publishing method, system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114615135A true CN114615135A (en) | 2022-06-10 |
CN114615135B CN114615135B (en) | 2024-03-22 |
Family
ID=81859743
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210149835.8A Active CN114615135B (en) | 2022-02-18 | 2022-02-18 | Front-end gray level publishing method, system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114615135B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114968274A (en) * | 2022-07-29 | 2022-08-30 | 之江实验室 | Method and system for automatically and rapidly deploying front-end processor based on gray release |
CN115250233A (en) * | 2022-09-22 | 2022-10-28 | 中邮消费金融有限公司 | Gray scale routing control method, gray scale routing assembly and computer equipment |
CN116755764A (en) * | 2023-08-22 | 2023-09-15 | 山东浪潮数字商业科技有限公司 | Automatic telescopic non-invasive gray level release system |
CN117032991A (en) * | 2023-10-08 | 2023-11-10 | 宁波银行股份有限公司 | Gray scale publishing method, device and system |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160170712A1 (en) * | 2014-12-15 | 2016-06-16 | Beijing Jinher Software Co., Ltd | Method for integrally implementing development and release of APP |
CN108319468A (en) * | 2017-01-16 | 2018-07-24 | 北京京东尚科信息技术有限公司 | Gray scale dissemination method, device, system and electronic equipment |
CN108874409A (en) * | 2017-05-09 | 2018-11-23 | 腾讯科技(深圳)有限公司 | A kind of information updating method, device, server and system |
CN109376322A (en) * | 2018-09-07 | 2019-02-22 | 平安科技(深圳)有限公司 | A kind of grayscale version page access method, apparatus, computer equipment and computer storage medium |
CN109787830A (en) * | 2019-01-21 | 2019-05-21 | 北京京东尚科信息技术有限公司 | Gray scale distribution control method, device, system, electronic equipment and storage medium |
CN110704777A (en) * | 2019-09-20 | 2020-01-17 | 阿里巴巴集团控股有限公司 | Method and system for implementing gray scale publishing |
CN110912734A (en) * | 2019-10-31 | 2020-03-24 | 北京浪潮数据技术有限公司 | Method and device for realizing multi-dimensional gray scale release of container application by cloud management platform |
US20200112487A1 (en) * | 2018-10-05 | 2020-04-09 | Cisco Technology, Inc. | Canary release validation mechanisms for a containerized application or service mesh |
CN112363751A (en) * | 2020-11-10 | 2021-02-12 | 平安普惠企业管理有限公司 | Software product gray level release method, device, equipment and medium |
CN112486550A (en) * | 2020-11-25 | 2021-03-12 | 上海中通吉网络技术有限公司 | Method, device and system for publishing gray scale of WEB terminal |
CN113010405A (en) * | 2019-12-20 | 2021-06-22 | 北京沃东天骏信息技术有限公司 | Application program testing method and device |
CN113422732A (en) * | 2021-06-22 | 2021-09-21 | 康键信息技术(深圳)有限公司 | Version updating method, device, equipment and storage medium based on total station gray scale |
WO2022001209A1 (en) * | 2020-06-30 | 2022-01-06 | 深圳前海微众银行股份有限公司 | Job execution method, apparatus and system, and computer-readable storage medium |
-
2022
- 2022-02-18 CN CN202210149835.8A patent/CN114615135B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160170712A1 (en) * | 2014-12-15 | 2016-06-16 | Beijing Jinher Software Co., Ltd | Method for integrally implementing development and release of APP |
CN108319468A (en) * | 2017-01-16 | 2018-07-24 | 北京京东尚科信息技术有限公司 | Gray scale dissemination method, device, system and electronic equipment |
CN108874409A (en) * | 2017-05-09 | 2018-11-23 | 腾讯科技(深圳)有限公司 | A kind of information updating method, device, server and system |
CN109376322A (en) * | 2018-09-07 | 2019-02-22 | 平安科技(深圳)有限公司 | A kind of grayscale version page access method, apparatus, computer equipment and computer storage medium |
US20200112487A1 (en) * | 2018-10-05 | 2020-04-09 | Cisco Technology, Inc. | Canary release validation mechanisms for a containerized application or service mesh |
CN109787830A (en) * | 2019-01-21 | 2019-05-21 | 北京京东尚科信息技术有限公司 | Gray scale distribution control method, device, system, electronic equipment and storage medium |
CN110704777A (en) * | 2019-09-20 | 2020-01-17 | 阿里巴巴集团控股有限公司 | Method and system for implementing gray scale publishing |
CN110912734A (en) * | 2019-10-31 | 2020-03-24 | 北京浪潮数据技术有限公司 | Method and device for realizing multi-dimensional gray scale release of container application by cloud management platform |
CN113010405A (en) * | 2019-12-20 | 2021-06-22 | 北京沃东天骏信息技术有限公司 | Application program testing method and device |
WO2022001209A1 (en) * | 2020-06-30 | 2022-01-06 | 深圳前海微众银行股份有限公司 | Job execution method, apparatus and system, and computer-readable storage medium |
CN112363751A (en) * | 2020-11-10 | 2021-02-12 | 平安普惠企业管理有限公司 | Software product gray level release method, device, equipment and medium |
CN112486550A (en) * | 2020-11-25 | 2021-03-12 | 上海中通吉网络技术有限公司 | Method, device and system for publishing gray scale of WEB terminal |
CN113422732A (en) * | 2021-06-22 | 2021-09-21 | 康键信息技术(深圳)有限公司 | Version updating method, device, equipment and storage medium based on total station gray scale |
Non-Patent Citations (4)
Title |
---|
HUI CHEN等: "Design and Implementation of Gray Publishing System under Distributed Application Microservice", 2021 11TH INTERNATIONAL CONFERENCE ON POWER AND ENERGY SYSTEMS (ICPES), 26 January 2022 (2022-01-26) * |
腾讯云: ""要进大厂?前端灰度发布必须要知道"", pages 1 - 5, Retrieved from the Internet <URL:https://cloud.tencent.com/developer/article/1513247> * |
郭慧敏: "基于携程旅行APP特卖汇项目的前端优化设计与实现", 万方, 3 June 2019 (2019-06-03) * |
黄老师: ""分布式系统灰度发布实践"", pages 2 - 16, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_43318367/article/details/113053445> * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114968274A (en) * | 2022-07-29 | 2022-08-30 | 之江实验室 | Method and system for automatically and rapidly deploying front-end processor based on gray release |
CN115250233A (en) * | 2022-09-22 | 2022-10-28 | 中邮消费金融有限公司 | Gray scale routing control method, gray scale routing assembly and computer equipment |
CN116755764A (en) * | 2023-08-22 | 2023-09-15 | 山东浪潮数字商业科技有限公司 | Automatic telescopic non-invasive gray level release system |
CN116755764B (en) * | 2023-08-22 | 2023-11-17 | 山东浪潮数字商业科技有限公司 | Automatic telescopic non-invasive gray level release system |
CN117032991A (en) * | 2023-10-08 | 2023-11-10 | 宁波银行股份有限公司 | Gray scale publishing method, device and system |
CN117032991B (en) * | 2023-10-08 | 2024-01-26 | 宁波银行股份有限公司 | Gray scale publishing method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN114615135B (en) | 2024-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114615135B (en) | Front-end gray level publishing method, system and storage medium | |
CN112118565B (en) | Multi-tenant service gray level publishing method, device, computer equipment and storage medium | |
US12038976B2 (en) | Model pushing method and device, model requesting method and device, storage medium and electronic device | |
CN112035228B (en) | Resource scheduling method and device | |
CN111858083B (en) | Remote service calling method and device, electronic equipment and storage medium | |
CN106713391B (en) | Session information sharing method and sharing system | |
CN112131504B (en) | Webpage editing and displaying method, device, equipment and storage medium | |
CN108540505B (en) | Content updating method and device | |
CN106487863A (en) | A kind of based on the gray scale dissemination method of distributed system, client and platform | |
CN111338893A (en) | Process log processing method and device, computer equipment and storage medium | |
CN101447891A (en) | Service model self-adapting system and method thereof | |
US20170300129A1 (en) | Keypress processing method and apparatus for terminal | |
CN111130900A (en) | Data acquisition method and device based on distributed interconnection of coordination services | |
CN113315754A (en) | Intelligent linkage method, device, equipment and medium for firewall of container visit | |
CN114900449B (en) | Resource information management method, system and device | |
CN114422331B (en) | Disaster recovery switching method, device and system | |
CN112000437A (en) | Disaster recovery method and device, electronic equipment and storage medium | |
CN114938396A (en) | Routing method of service call request, method and device for creating service | |
CN111459492A (en) | Method, device, storage medium and equipment for detecting compatibility of Dubbo service interface | |
CN113746676B (en) | Network card management method, device, equipment, medium and product based on container cluster | |
CN106357549B (en) | Method, apparatus, system and the load balancer that high concurrent shunts in clustered deploy(ment) | |
CN115220992A (en) | Interface change monitoring method and device, computer equipment and storage medium | |
CN112231093A (en) | Data acquisition method and system based on code template and coroutine pool and electronic equipment | |
CN115277573B (en) | Load balancing processing method and device for issuing application task | |
CN115914395B (en) | Micro-service development method, device, equipment and medium |
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 |