CN109726099A - A kind of application gray scale dissemination method, device and equipment - Google Patents

A kind of application gray scale dissemination method, device and equipment Download PDF

Info

Publication number
CN109726099A
CN109726099A CN201810330589.XA CN201810330589A CN109726099A CN 109726099 A CN109726099 A CN 109726099A CN 201810330589 A CN201810330589 A CN 201810330589A CN 109726099 A CN109726099 A CN 109726099A
Authority
CN
China
Prior art keywords
gray scale
environment
publication
server
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810330589.XA
Other languages
Chinese (zh)
Other versions
CN109726099B (en
Inventor
苏渊博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huishang Cloud Service Beijing Technology Co ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201810330589.XA priority Critical patent/CN109726099B/en
Publication of CN109726099A publication Critical patent/CN109726099A/en
Application granted granted Critical
Publication of CN109726099B publication Critical patent/CN109726099B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

This application discloses a kind of application gray scale dissemination method, device and equipment, are related to applied technical field, and wherein method includes: and obtains to issue to gray scale to apply;Application configuration will be issued to gray scale and carries out gray scale publication test in gray scale publication environment, and wherein gray scale publication environment is the environment created previously according to production environment on current line;During gray scale is issued and tested, it is recorded in gray scale publication environment to the switching adjustable strategies for being operating abnormally server;Gray scale publication is carried out production environment on line after gray scale is issued and passed through using test, will be sent to gray scale publication application, and executes corresponding server during gray scale is issued according to switching adjustable strategies and switches adjustment.The application is using pre- publication testing process, switch adjustment using the server in the formal gray scale issuing process of production environment on the switching adjustable strategies guide line in gray scale publication environment, it is not necessary to modify configure and restart server application system, be not in application system delay machine.

Description

A kind of application gray scale dissemination method, device and equipment
Technical field
This application involves applied technical fields, more particularly to a kind of application gray scale dissemination method, device and equipment.
Background technique
Gray scale, which is issued, to be referred in software version issuing process, a kind of published method that can be seamlessly transitted.Assuming that current Software version is A, and new software version is B, when software supplier carries out edition upgrading publication to some software, server It controls a part of user and continues to use version A, another part user begins to use version B;If user is in the mistake using version B It is abnormal without occurring in journey, then all users are gradually moved into version B.The mode of this gradually transition publication can guarantee The stabilization of total system.
Currently, software supplier issues software product using gray scale published method, carry out every time it is new and old When application version switches, in order to server used in guaranteeing can normal operation, do not occur server application system failure, place Reason responded the abnormal conditions such as slow, needed manually to restart server again previously according to the operating status modification configuration of each server Then application system practices the process of new version gray scale publication again.
However, server application system reboot can generate downtime, visitor can not be handled in this downtime server The application request that family end is sent, and then just will appear the case where application request cannot respond to, affect the normal of client application It uses.
Summary of the invention
In view of this, this application provides a kind of application gray scale dissemination method, device and equipment, main purposes to be to solve When application carries out gray scale publication at present, needs to carry out application system to the server used to restart, downtime can be generated, herein Downtime server can not handle the application request of client transmission, just will appear the problem of application request cannot respond to.
According to the application's in a first aspect, providing a kind of application gray scale dissemination method, which comprises
It obtains to issue to gray scale and apply;
Described gray scale publication test will be carried out in gray scale publication environment to gray scale publication application configuration, wherein the gray scale Issuing environment is the environment created previously according to production environment on current line;
During the gray scale is issued and tested, it is recorded in the gray scale publication environment to operation exception server Switch adjustable strategies;
Described after gray scale is issued and passed through using test, described be sent on the line to gray scale publication application is produced Environment carries out gray scale publication, and corresponding server is executed during the gray scale is issued according to the switching adjustable strategies Switching adjustment.
According to the second aspect of the application, a kind of application gray scale distributing device is provided, described device includes:
Acquiring unit is applied for obtaining to issue to gray scale;
Detection unit is surveyed for that described will carry out gray scale publication in gray scale publication environment to gray scale publication application configuration Examination, wherein gray scale publication environment is the environment created previously according to production environment on current line;
Recording unit, for being recorded in the gray scale publication environment to fortune during the gray scale is issued and tested The switching adjustable strategies of row abnormal server;
Release unit, for that after gray scale is issued and passed through using test, described will issue application described to gray scale and send Production environment carries out gray scale publication on to the line, and executes in the gray scale issuing process according to the switching adjustable strategies Corresponding server switching adjustment.
According to the third aspect of the application, a kind of storage medium is provided, computer program, described program are stored thereon with Application gray scale dissemination method described in first aspect is realized when being executed by processor
According to the fourth aspect of the application, a kind of application gray scale distribution apparatus is provided, the equipment includes storage medium And processor,
The storage medium, for storing computer program;
The processor, for executing the computer program to realize application gray scale publisher described in first aspect Method.
By above-mentioned technical proposal, a kind of application gray scale dissemination method, device and equipment provided by the present application and need at present Manually to restart server application system again previously according to the operating status modification configuration of each server to compare, the application uses Pre- publication testing process first carries out in the gray scale publication environment being pre-created every time before application new version publication production Gray scale publication test can automatically record the switching adjustable strategies for being operating abnormally server in gray scale publication test process, due to Gray scale publication environment is the environment created according to production environment on current line, therefore can obtain being suitable for accurate simulation current Automatic switchover on line in production environment adjusts situation, after gray scale publication test passes through, will be sent on line using new version Gray scale publication is carried out in production environment, and server is switched over referring to the switching adjustable strategies, and it is not necessary to modify configurations in this way The case where with restarting server application system, being not in application system delay machine, when user end to server sending application is requested When, server can be handled in time, even if also can effectively ensure that server is corresponding in the gray scale publication applied With the processing quality of request and the stability of whole system.
Above description is only the general introduction of technical scheme, in order to better understand the technological means of the application, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects, features and advantages of the application can It is clearer and more comprehensible, below the special specific embodiment for lifting the application.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the application Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is the flow chart of one embodiment provided by the present application using gray scale dissemination method;
Fig. 2 is the structural block diagram of one embodiment provided by the present application using gray scale distributing device;
Fig. 3 is the structural schematic diagram provided by the present application using gray scale distribution apparatus.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
The embodiment of the present application provides a kind of application gray scale dissemination method, carries out gray scale hair in gray scale publication environment in advance Cloth test, and recorded to the switching adjustable strategies that server is formed are operating abnormally in gray scale publication environment, and then according to The switching adjustable strategies carry out in production environment issuing using gray scale on line, and such server application system, which would not generate, delays The machine time can guarantee the application request for timely and effectively handling client.It is answered as shown in Figure 1, the embodiment of the present application provides Include: with the step of gray scale dissemination method
Step 101, it obtains to issue to gray scale and apply.
It in the present embodiment, can be the more new edition such as application newly developed or some application to gray scale publication application This grade needs application that gray scale is issued on line, to guarantee the stabilization of total system by the way of this gradually transition publication Property.It can be the device or equipment issued using gray scale for the executing subject of the present embodiment, for laying equal stress on not modifying configuration Under the premise of opening server application system, realize that gray scale publication application is treated in production environment on line carries out gray scale publication, tool Body executes step 102 to process shown in 104.
Step 102, application configuration being issued to gray scale, gray scale publication test is carried out in gray scale publication environment.
Wherein, gray scale publication environment is the environment created previously according to production environment on current line.For example, according to Current actual conditions of production environment on line (including the number that server currently operates normally, each server processing requests Ability (such as request response time, processing number of requests), announced application version of production environment etc. on line), creation and line The identical gray scale of upper production environment issues environment, and wherein gray scale publication environment can be understood as the backup ring of production environment on line Border includes more application servers.
Production environment can be understood as the environment directly facing user on line, and gray scale is in intranet environment and line One layer of service layer among environment, gray scale publication environment belong to the test environment on line in production environment, can update for application Service provided by code carries out more added with the test of safety;Gray scale issues environment in addition to code, and produces ring on line Border is completely the same, and under a possibility that very big, exclusion impacts user service on line.
In the present embodiment, this being waited for, gray scale publication application is tested in gray scale publication environment in advance, if It goes wrong in test process, can also remedy in time.And the gray scale publication environment of the application is previously according to current line What the configuration parameter of upper production environment was established, be with production environment on current line it is identical, can guarantee to send out in gray scale in this way When being tested in cloth environment, actual conditions can be more in line with, keep the result of test more accurate.
In addition, establishing in gray scale publication environment with identical clothes of quantity and configuration in production environment on current line Business device can will be issued to gray scale in carrying out gray scale publication test process and apply the test run in each server, once it sends out There is misoperation during the test in some existing server, will be transferred in another server and test.
Step 103, it during gray scale is issued and tested, is recorded in gray scale publication environment to operation exception server Switch adjustable strategies.
For the present embodiment, in gray scale publication test process, when abnormal transport occurs during the test in some server Row (such as server delay machine, request response time are greater than certain threshold value), will issue application switching to another operation to gray scale When normal server, just will record the abnormal server identifier (for example, network protocol (Internet Protocol, IP) address or device numbering), the information such as time of the identifier of the normal operation server and switching.It transports every time The abnormal generation server switching of row can all carry out respective record, then according to the time of server switching, switching target in record Switch adjustable strategies accordingly with information, generations such as transfer sequences.In addition, being operating abnormally in each appearance causes server to switch When adjustment, the corresponding error code information of abnormal server can also be recorded, for it is subsequent according to the error code to line Corresponding server is adjusted in upper production environment.
For example, can be all in detection gray scale publication environment to answer by way of sending examination request to application server Whether can normally be accessed with server, think that application server is operating abnormally if request is unsuccessful;As present gray scale is sent out There are 8 application servers in cloth environment, if wherein an application server collapses, can be examined by the test mode Measure that specifically which platform application server collapses, the application server of this collapse will not all receive before normal operation To application request.In this gray scale publication test process, record which server is operating abnormally, and is then switching to which just It is handled in normal server, and the specific time of record switching, generates corresponding switching according to these information of record and adjust Whole strategy.For that can be cut according to the switching adjustable strategies to server when production environment carries out gray scale publication on line It changes.
It should be noted that gray scale is issued environment and can be issued simultaneously to multiple to gray scale according to the needs of practical business Using being tested, in test process, each switches adjustable strategies with it to gray scale publication application and corresponded.
Step 104, after gray scale is issued and passed through using test, application will be issued to gray scale and be sent to production environment on line Gray scale publication is carried out, and executes corresponding server switching adjustment during gray scale is issued according to switching adjustable strategies.
It, can will if applying in gray scale publication environment test there is no abnormal to gray scale publication for the present embodiment Production environment on line is sent to gray scale publication application and carries out gray scale publication, and is cut every time according to what is recorded in switching adjustable strategies Time and the sequence of server are changed, the server executed in gray scale issuing process switches adjustment, guarantees used server all It can normal operation.
For example, setting applies sending time to gray scale publication, it is sometime sent to production environment on line on the day of and carries out The switching adjustable strategies execute server switching adjustment recorded in the pre- publication test of environment is issued in gray scale publication according to gray scale, If server a is operating abnormally when testing in gray scale publication environment, the application request that script is needed to be handled by server a turns It is handled to the server b of normal operation, then according to this strategy, and will be produced on line on line in production environment The server b that server a application request to be treated is given to normal operation in environment is handled, and can be with subsequent to service Device a makes requests test, is handled until test is normally given to server a again.
Through the above technical solutions, corresponding switching adjustable strategies can be generated in gray scale publication environment in advance, in this way It carries out directly switching over server according to the switching adjustable strategies when gray scale publication in production environment on line, it is not necessary to modify The case where configuring and restart server application system, being not in server application system failure, when user end to server is sent out When sending application request, server can be handled in time, in this way, even if can also have in the gray scale publication applied Effect guarantees server to the processing quality of application request and the stability of whole system.
Further, it as the refinement of above-described embodiment and extension, is executed to illustrate according to switching adjustable strategies The embodiment of server switching adjustment in gray scale issuing process, a kind of optional way are that may include: from switching adjustable strategies In, it determines and is operating abnormally server present in the gray scale publication test executed in gray scale publication environment, and correspondence is switched to Normal operation server, and determine corresponding switching adjustment opportunity range;Then production environment is carried out to gray scale on line In the gray scale issuing process for issuing application, referring to switching adjustment opportunity range, selection target switches adjustment opportunity, according to the target Switching adjustment opportunity will be operating abnormally server and switch to normal operation server, and then realize and distinguish phase on line in production environment Switching adjustment between corresponding server.
Wherein, switching adjustment opportunity range can be depending on the actual conditions of server switching time.For example, in gray scale 1 hour after the publication of beginning gray scale is tested in environment time is issued, exception occurs in server A operation, and script needs will be given to clothes The request of business device A processing is given to server B and is handled, then this time corresponding switching adjustment opportunity range of switching adjustment event It can be set to start the opportunity range of 1 hour or so (floating up and down no more than 5 minutes) after gray scale is issued.
In this optional way, when being recorded to switching adjustable strategies, it will record and be operating abnormally server and be switched to Normal operation server identifier and switching time, then according to record information extraction each server identifier Transfer sequence.Correspondingly, according to the transfer sequence of switching adjustable strategies record, when being switched between each server, from Most suitable target switching adjustment opportunity is selected to carry out server switching in corresponding switching adjustment opportunity range.For example, selection is cut The earliest time point changed in adjustment opportunity range switches in adjustment opportunity, or selection switching adjustment opportunity range as target Middle time point switches adjustment opportunity as target, or selects the latest time point in switching adjustment opportunity range as target Switch adjustment opportunity, specifically can occur the time being operating abnormally according to server and the error code of operation exception is selected It selects, to guarantee to complete switching before server delay machine.
Through the above scheme, switching when can be switched according to each server adjusts opportunity range, selects most suitable Target switches adjustment opportunity, guarantees to complete switching task before server delay machine, prevents the reason of server is because of delay machine appearance The case where application request of client transmission can not be handled.
The specific implementation of corresponding server switching adjustment is executed during gray scale is issued according to switching adjustable strategies Mode, another optional way are to be operating abnormally clothes according to present in the gray scale publication test executed in gray scale publication environment Business device does operation exception label to corresponding server in production environment on line;Then on line in production environment using not The gray scale publication that application is issued to gray scale is carried out with the server for being operating abnormally label.
When treating gray scale publication application progress gray scale publication test, each operation exception can be recorded in switching adjustable strategies The identifier (for example, IP address or device numbering etc.) of server.On carrying out line before the gray scale publication of production environment, meeting These identifiers for being operating abnormally server are obtained, and by corresponding server carries out operation exception mark in production environment on line Note.Labeled server on line in production environment is selected out, the server for being used without label carries out gray scale publication.
Through the above scheme, when being tested in gray scale publication environment, each identification for being operating abnormally server is recorded Number, when gray scale being facilitated on subsequent progress line to issue, can by corresponding server rejecting in production environment on line, and then guarantee into The case where server that gray scale publication uses on line can be not in operation exception in entire issuing process.
In addition, on the opportunity of above-mentioned operation exception label, can be and be marked in gray scale publication environment, so on line In production environment, it need to will only be eliminated in production environment with the corresponding server of label server on line, recycle operation just Normal server carries out gray scale publication.The server of normal operation can also be marked, so on line production environment into Before the publication of row gray scale, the server of normal operation is extracted, the server of normal operation is recycled to carry out gray scale publication.
In order to illustrate the specific implementation process of gray scale publication test, in the alternative embodiment of the application, step 102 It can specifically include: application configuration will be issued to gray scale and carry out gray scale publication test in gray scale publication environment, and according to preset Production authentication policy treats the corresponding what's new of release application program and carries out production verifying, if what's new production verifying at Function, it is determined that issue to gray scale and pass through using test, if what's new produces authentication failed, it is determined that issue application to gray scale and survey Examination does not pass through, and will issue application to gray scale and carry out rollback processing.
In this alternative embodiment, gray scale publication test and production in gray scale publication environment is applied to test to gray scale publication Card process can carry out simultaneously.For this alternative embodiment, if being application program newly developed to gray scale publication application, need Production verifying is carried out to each function of application program newly developed;If to gray scale publication application being the update of some application Using, need to new version apply in what's new carry out production verifying.Wherein, preset production authentication policy can preparatory root Factually border business demand is configured, and production authentication policy can specifically include: whether authentication function operation normal, authentication function In whether have virus or trojan horse program, authentication function execute the time whether normally execute time range in etc..In above-mentioned verifying Any one in appearance goes wrong, and all indicates production authentication failed, and application will be issued to gray scale by, which needing, retracts, when retracting The details for producing authentication failed can be retracted together.In this way, developer will lose according to the production verifying recorded when retracting The details lost treat gray scale publication application and the operation such as modify, debugs, then place into the progress of gray scale publication environment again Secondary gray scale publication test passes through using test until production just determines to issue to gray scale after being proved to be successful, and produces ring on line Gray scale publication is carried out in border.By this mechanism, where can finding the loophole of application before formal publication on line, and can To solve the problems, such as corresponding loophole, application what's new in time, and then the formal ash of production environment on line can be improved Spend the success rate of issuing process.
Further, in order to illustrate the specific embodiment of production verification process, illustratively, if application program to be released Corresponding what's new is credit process automation, then it is corresponding new to treat release application program according to preset production authentication policy Increasing the step of function carries out production verifying can specifically include: detection entire credit stream of automated execution in gray scale publication environment Whether journey there is abnormal (whether such as entire credit process is complete, determines to occur if imperfect abnormal), if automated execution is whole There is not exception in a credit process, it is determined that what's new production is proved to be successful, if the entire credit process of automated execution is not It is complete or process step occur and executes error, it is determined that what's new production authentication failed.
For example, increasing credit stream in credit management application if being credit management application to gray scale publication application The function of process automation.It is carried out in production verification process in gray scale publication environment in this way, it is automatic to need to verify the credit process Whether the execution sequence of change meets predetermined order, for example, first obtaining the information of local creditor, then calculates the loan limit of local creditor, Then the interest of this month of loan is calculated again.Or verify whether have virus, wood in the feature card of the credit process automation Horse etc..If producing authentication failed, it is necessary to application will be issued to gray scale and retracted, developer is allowed to modify and adjust.
In another example the corresponding what's new of application program to be released is recommended automatically suitably according to the essential information of user Insurance service, will input the essential information of each user in gray scale publication environment, and gray scale publication environment will be modeled as respectively A user recommends the process of corresponding insurance service.If occurring operating mistake in simulation process, can not recommend for user corresponding Insurance service, or it is undesirable for the insurance service that user recommends, turn out authentication failed.
For another example the corresponding what's new of application program to be released is to formulate financing plan automatically for user, then can be The essential information of each user is inputted in gray scale publication environment, gray scale issues environmental simulation and formulates one according to the essential information of user The verification process of a or multiple financing plans, in the verification process, including being believed according to the fund state of user, personality, hobby etc. The information such as type, the amount of money, time limit of breath selection finance product, if losing a link in verification process or each holding The financing plan that the essential information of mistake perhaps user is compromised or can not obtain occurs for row procedural order, can all make whole The procedure failure of a production verifying.
The publication environment of gray scale in this present embodiment can be created to obtain in several ways according to actual needs, into one Step, in order to illustrate the specific implementation process of creation gray scale publication environment, in the alternative embodiment of the application, gray scale hair Process is pre-created in cloth environment, specifically comprises the following steps:
Step A installs Lua (scripting language used in embeddable other scripting languages) interpreter.Wherein, the interpreter Be edit immediately script interpreter (Just-In-Time Compiler of Lua programming language, LuaJIT), which is substantially to adopt the code of the Lua interpreter shown a C language;
Step B, configuration load equalization server environmental variance required when installing.For subsequent compilation installation load equilibrium clothes Business device (such as Nginx server, for high performance HTTP and Reverse Proxy) is prepared;
Step C obtains the test installation kit of load-balanced server, and compiles installation load equilibrium clothes according to environmental variance Business device;
Step D is obtained and is installed Lua script using database and Lua script local terminal database;
Step E is parsed in load-balanced server referring to the configuration information of production environment on current line and is executed foot Script is associated by the script logic of this interpreter using script logic using database and script local terminal database, Complete the creation of gray scale publication environment.
For example, doing load balancing and reverse proxy using Nginx server, Nginx server embeds Lua script interpretation Device can parse and execute the script logic that Lua language is write, since Lua script has some pass through using storage in database User accesses the strategy that the associated gray scale of Cookie value subsidiary when domain name shunts, therefore can pass through Lua script interpreter solution It analyses the Cookie value and obtains the data being stored on user local terminal and access Lua script local terminal database, come real The building process of existing gray scale publication environment.
By above-mentioned creation process, capable of being created that one, identical gray scale issues environment with production environment on line, for Some newly developed issue to gray scale are verified using progress gray scale publication test, and production using gray scale publication environment. This avoid directly will occur run-time error when gray scale issues application and is put into production environment on line, and influence the normal of user The problem of use.
In the actual operation process, in order to facilitate user's use, gray scale issues the domain name phase of environment and production environment on line Together, correspondingly, step 102 specific implementation process may include: by issuing to gray scale using corresponding HTTP request (HTTP Request) is parsed, and Cookie label subsidiary when access domain name is obtained;The Cookie is detected again to mark whether It is marked comprising preconfigured gray scale, if Cookie label is marked comprising preconfigured gray scale, will issue and answer to gray scale Gray scale publication test is carried out in gray scale publication environment with configuration, if Cookie label does not include preconfigured gray scale Note will then issue application to gray scale and be sent directly to production environment progress gray scale publication on line.
For example, by taking Nginx Reverse Proxy as an example, for the access process of this domain name of m.ph.com.cn, according to Correlated condition is forwarded HTTP request, can prepare two parts of codes in advance here, and production environment on the corresponding line of portion is another Part corresponding grey scale issues environment;Cookie label is detected, if there is the gray scale being beforehand with marks, so that it may be considered to need to answer It is entered in gray scale publication environment with new version and carries out publication test, whereas if the gray scale label not being beforehand with, so that it may It is considered to need that production environment on line will be directly entered using new version to issue.
Through the above technical solutions, user, which can select to enter according to actual needs on gray scale publication environment or line, produces ring Border, and then can satisfy the different business demand of user.Enter gray scale publication environment progress gray scale test when user wants selection When, it can be in the Cookie label subsidiary with the corresponding HTTP request of application is issued to gray scale, addition gray scale label;Work as user When wanting directly to carry out the gray scale publication of production environment on line without gray scale test, so that it may in HTTP request, by gray scale Label removal.It can thus be marked according to gray scale whether is carried in HTTP request;To determine whether issuing environment into gray scale Carry out gray scale test.
Technical solution in by applying this embodiment, using pre- publication testing process, using in gray scale publication environment Switch the server on adjustable strategies guide line in the formal gray scale issuing process of production environment and switch adjustment, it is not necessary to modify configuration and The case where restarting server application system, being not in application system delay machine, when the request of user end to server sending application, Server can be handled in time, even if also can effectively ensure that server to application in the gray scale publication applied The processing quality of request and the stability of whole system.
Further, the specific implementation as Fig. 1 method, the embodiment of the present application provide a kind of application gray scale publication dress It sets, as shown in Fig. 2, the device includes: acquiring unit 21, detection unit 22, recording unit 23 and release unit 24.
Acquiring unit 21 is applied for obtaining to issue to gray scale;
Detection unit 22 carries out gray scale publication test for that will issue application configuration to gray scale in gray scale publication environment, Wherein gray scale publication environment is the environment created previously according to production environment on current line;
Recording unit 23, for being recorded in gray scale publication environment to operation exception during gray scale is issued and tested The switching adjustable strategies of server;
Release unit 24, for that will issue application to gray scale and be sent on line after gray scale is issued and passed through using test Production environment carries out gray scale publication, and executes corresponding server switching in gray scale issuing process according to switching adjustable strategies and adjust It is whole.
In a particular embodiment, release unit 24 specifically includes: determining module and switching module;
Determining module, for from switching adjustable strategies, determining the gray scale publication test executed in gray scale publication environment Present in be operating abnormally server, and the corresponding normal operation server being switched to, and when determining corresponding switching adjustment Machine range;
Switching module carries out issuing to gray scale in the gray scale issuing process of application for production environment on line, and reference is cut Adjustment opportunity range selection target switching adjustment opportunity is changed, cuts the operation exception server according to target switching adjustment opportunity Shift to the normal operation server.
In a particular embodiment, release unit 24 specifically includes: mark module and release module;
Mark module is operating abnormally service according to present in the gray scale publication test executed in gray scale publication environment Device does operation exception label to corresponding server in production environment on line;
Release module issue to gray scale using without the server for being operating abnormally label in production environment on line The gray scale of application is issued.
In a particular embodiment, detection unit 22 specifically includes: authentication module, exists for that will issue application configuration to gray scale Gray scale issue environment in carry out gray scale publication test, and according to preset production authentication policy treat release application program it is corresponding newly Increase function and carries out production verifying;If what's new production is proved to be successful, it is determined that issue to gray scale and pass through using test;If newly-increased Function produces authentication failed, it is determined that issues to gray scale and does not pass through using test, and will issue application to gray scale and carry out at rollback Reason.
In a particular embodiment, authentication module, if being also used to what's new is credit process automation, detection is sent out in gray scale Whether the entire credit process of automated execution there is exception in cloth environment;If the entire credit process of automated execution does not occur different Often, it is determined that what's new production is proved to be successful;If the entire credit process of automated execution is imperfect or process step occurs Execute error, it is determined that what's new produces authentication failed.
In a particular embodiment, device further include: installation unit, configuration unit, compilation unit and creating unit;
Installation unit is used for installation script interpreter;
Configuration unit, required environmental variance when for the installation of configuration load equalization server;
Compilation unit, for obtaining the test installation kit of load-balanced server, and it is negative according to environmental variance compiling installation Carry equalization server;
Acquiring unit 21, is also used to obtain and installation script uses database and script local terminal database;
Creating unit parses in load-balanced server for the configuration information referring to production environment on current line And the script logic of perform script interpreter, using script logic by script using database and script local terminal database into The creation of gray scale publication environment is completed in row association.
In a particular embodiment, gray scale publication environment is identical as the domain name of production environment on line, then detection unit 22 is specific Further include: parsing module and detection module;
Parsing module, for obtaining access domain by parsing to gray scale publication using corresponding HTTP request Subsidiary Cookie label when name;
Detection module marks whether to mark comprising preconfigured gray scale for detecting Cookie;If Cookie label packet It is marked containing preconfigured gray scale, then will issue application configuration to gray scale and carry out gray scale publication test in gray scale publication environment; It is marked if Cookie label does not include preconfigured gray scale, application will be issued to gray scale and be sent directly to production environment on line Carry out gray scale publication.
It should be noted that provided by the embodiments of the present application a kind of using each functional unit involved by gray scale distributing device Other are accordingly described, can be with reference to the corresponding description in Fig. 1, and details are not described herein.
Based on above-mentioned method as shown in Figure 1, correspondingly, being deposited thereon the embodiment of the present application also provides a kind of storage medium Computer program is contained, which realizes above-mentioned application gray scale dissemination method as shown in Figure 1 when being executed by processor.
Based on this understanding, the technical solution of the application can be embodied in the form of software products, which produces Product can store in a non-volatile memory medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions With so that computer equipment (can be personal computer, server or the network equipment an etc.) execution the application is each Method described in implement scene.
Embodiment based on method shown in above-mentioned Fig. 1 and Fig. 2 shown device, to achieve the goals above, the application are implemented Example additionally provides a kind of application gray scale distribution apparatus, is specifically as follows the intelligent terminals such as PC, the network equipment, router, As shown in figure 3, including storage medium 32 and processor 31, wherein storage medium 32 and processor 31 are arranged in bus 33. Storage medium 32, for storing computer program;Processor 31 is realized above-mentioned such as Fig. 1 institute for executing the computer program The application gray scale dissemination method shown.
Optionally, this can also include user interface, network interface, camera, radio frequency using gray scale distribution apparatus (Radio Frequency, RF) circuit, sensor, voicefrequency circuit, WI-FI module etc..User interface may include display screen (Display), input unit such as keyboard (Keyboard) etc., optional user interface can also connect including USB interface, card reader Mouthful etc..Network interface optionally may include standard wireline interface and wireless interface (such as blue tooth interface, WI-FI interface).
It will be understood by those skilled in the art that a kind of application gray scale distribution apparatus structure provided in this embodiment is not constituted Restriction to the entity device may include more or fewer components, perhaps combine certain components or different component cloth It sets.
It can also include operating system, network communication module in storage medium.Operating system is that management and application gray scale are sent out The program of cloth equipment hardware and software resource supports the operation of message handling program and other softwares and/or program.Network is logical Believe module for realizing the communication between each component in storage medium inside, and with application gray scale distribution apparatus in other hardware and It is communicated between software.
Through the above description of the embodiments, those skilled in the art can be understood that the application can borrow It helps software that the mode of necessary general hardware platform is added to realize, hardware realization can also be passed through.Pass through the skill of application the application Art scheme can generate corresponding switching adjustable strategies in gray scale publication environment in advance, so on line in production environment into Row gray scale directly switches over server according to the switching adjustable strategies when issuing, and it is not necessary to modify the configuration of server and restarts The case where server is not in server delay machine, when the request of user end to server sending application, server can be timely It is handled, in this way, even if also can effectively ensure that processing of the server to application request in the gray scale publication applied The stability of quality and whole system.
It will be appreciated by those skilled in the art that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, module in attached drawing or Process is not necessarily implemented necessary to the application.It will be appreciated by those skilled in the art that the mould in device in implement scene Block can according to implement scene describe be distributed in the device of implement scene, can also carry out corresponding change be located at be different from In one or more devices of this implement scene.The module of above-mentioned implement scene can be merged into a module, can also be into one Step splits into multiple submodule.
Above-mentioned the application serial number is for illustration only, does not represent the superiority and inferiority of implement scene.Disclosed above is only the application Several specific implementation scenes, still, the application is not limited to this, and the changes that any person skilled in the art can think of is all The protection scope of the application should be fallen into.

Claims (10)

1. a kind of application gray scale dissemination method, which is characterized in that the described method includes:
It obtains to issue to gray scale and apply;
Described gray scale publication test will be carried out in gray scale publication environment to gray scale publication application configuration, wherein the gray scale is issued Environment is the environment created previously according to production environment on current line;
During the gray scale is issued and tested, it is recorded in the switching in the gray scale publication environment to server is operating abnormally Adjustable strategies;
Described after gray scale is issued and passed through using test, production environment on the line is sent to gray scale publication application by described Gray scale publication is carried out, and executes corresponding server during the gray scale is issued according to the switching adjustable strategies and switches Adjustment.
2. the method according to claim 1, wherein switching what adjustable strategies were issued in the gray scale according to described Corresponding server switching adjustment is executed in the process, is specifically included:
From the switching adjustable strategies, fortune present in the gray scale publication test executed in gray scale publication environment is determined Row abnormal server, and the corresponding normal operation server being switched to, and determine corresponding switching adjustment opportunity range;
Production environment adjust in the gray scale issuing process to gray scale publication application referring to the switching on the line Opportunity range selection target switches adjustment opportunity, switches the operation exception server according to target switching adjustment opportunity To the normal operation server.
3. the method according to claim 1, wherein switching what adjustable strategies were issued in the gray scale according to described Corresponding server switching adjustment is executed in the process, is specifically included:
It is operating abnormally server according to present in the gray scale publication test executed in gray scale publication environment, to the line Corresponding server does operation exception label in upper production environment;
It is applied in production environment using without described issued to gray scale of server progress for being operating abnormally label on the line Gray scale publication.
4. the method according to claim 1, wherein described ring will be issued in gray scale to gray scale publication application configuration Gray scale publication test is carried out in border, is specifically included:
Described gray scale publication test will be carried out in gray scale publication environment to gray scale publication application configuration, and tested according to preset production Card strategy carries out production verifying to the corresponding what's new of the application program to be released;
If the what's new production is proved to be successful, it is determined that described issue to gray scale passes through using test;
If the what's new produces authentication failed, it is determined that described issue to gray scale does not pass through using test, and will it is described to Gray scale publication application carries out rollback processing.
5. according to the method described in claim 4, it is characterized in that, if the what's new is credit process automation, root Production verifying is carried out to the corresponding what's new of the application program to be released according to preset production authentication policy, is specifically included:
Whether detection entire credit process of automated execution in gray scale publication environment there is exception;
If there is not exception in entire credit process described in automated execution, it is determined that the what's new production is proved to be successful;
If entire credit process described in automated execution is imperfect or process step occurs and executes error, it is determined that described newly-increased Function produces authentication failed.
6. specifically being wrapped the method according to claim 1, wherein process is pre-created in gray scale publication environment It includes:
Installation script interpreter;
Configuration load equalization server environmental variance required when installing;
The test installation kit of load-balanced server is obtained, and the load balancing service is installed according to environmental variance compiling Device;
It obtains and installation script uses database and script local terminal database;
Referring to the configuration information of production environment on current line, is parsed in the load-balanced server and execute the script The script is used database and script local terminal database using the script logic by the script logic of interpreter It is associated, completes the creation of the gray scale publication environment.
7. method according to any one of claims 1 to 6, which is characterized in that produced on the gray scale publication environment and line The domain name of environment is identical, described gray scale publication test will be carried out in gray scale publication environment to gray scale publication application configuration, specifically Include:
By being parsed to described issued to gray scale using corresponding HTTP request, obtain subsidiary when access domain name Cookie label;
The Cookie is detected to mark whether to mark comprising preconfigured gray scale;
If the Cookie label is marked comprising the gray scale, described environment will be issued in gray scale to gray scale publication application configuration Middle progress gray scale publication test;
If the Cookie label does not include the gray scale and marks, application will be issued to gray scale and be sent directly to produce ring on line Border carries out gray scale publication.
8. a kind of application gray scale distributing device, which is characterized in that described device includes:
Acquiring unit is applied for obtaining to issue to gray scale;
Detection unit, for described gray scale publication test will to be carried out in gray scale publication environment to gray scale publication application configuration, Described in gray scale publication environment be the environment created previously according to production environment on current line;
Recording unit, it is different to running in the gray scale publication environment for being recorded in during the gray scale is issued and tested The switching adjustable strategies of normal server;
Release unit, for after gray scale is issued and passed through using test, being sent to institute to gray scale publication application for described described It states production environment on line and carries out gray scale publication, and executed in the gray scale issuing process accordingly according to the switching adjustable strategies Server switch adjustment.
9. a kind of storage medium, is stored thereon with computer program, which is characterized in that realization when described program is executed by processor The described in any item application gray scale dissemination methods of claim 1 to 7.
10. a kind of application gray scale distribution apparatus, which is characterized in that the equipment includes storage medium and processor,
The storage medium, for storing computer program;
The processor, for executing the computer program to realize the described in any item application gray scale hairs of claim 1 to 7 Cloth method.
CN201810330589.XA 2018-04-12 2018-04-12 Application gray level publishing method, device and equipment Active CN109726099B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810330589.XA CN109726099B (en) 2018-04-12 2018-04-12 Application gray level publishing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810330589.XA CN109726099B (en) 2018-04-12 2018-04-12 Application gray level publishing method, device and equipment

Publications (2)

Publication Number Publication Date
CN109726099A true CN109726099A (en) 2019-05-07
CN109726099B CN109726099B (en) 2024-03-19

Family

ID=66293818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810330589.XA Active CN109726099B (en) 2018-04-12 2018-04-12 Application gray level publishing method, device and equipment

Country Status (1)

Country Link
CN (1) CN109726099B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377498A (en) * 2019-05-27 2019-10-25 平安银行股份有限公司 Credit card automatic test approach, device, electronic equipment and storage medium
CN110647335A (en) * 2019-07-26 2020-01-03 平安科技(深圳)有限公司 Software gray level release method and device, electronic equipment and storage medium
CN110784409A (en) * 2019-10-31 2020-02-11 湖南御家科技有限公司 Spring Cloud-based micro-service gray level publishing method
CN111324377A (en) * 2020-03-11 2020-06-23 上海东普信息科技有限公司 Application gray level release method, system, device and storage medium
CN111580855A (en) * 2020-04-09 2020-08-25 上海淇毓信息科技有限公司 Strategy issuing method and system based on full-flow gray level issuing and electronic equipment
CN112346777A (en) * 2020-11-20 2021-02-09 浙江百应科技有限公司 Smooth application program publishing method and device
CN112446714A (en) * 2020-12-11 2021-03-05 上海中通吉网络技术有限公司 Server upgrading method, device and equipment for express after-sale work order processing system
CN112948278A (en) * 2021-05-14 2021-06-11 太平金融科技服务(上海)有限公司深圳分公司 Product gray level publishing method, device, equipment and medium based on gray level database
CN113612686A (en) * 2021-06-29 2021-11-05 中国人民财产保险股份有限公司 Traffic scheduling method and device and electronic equipment
CN113765960A (en) * 2020-07-01 2021-12-07 北京京东尚科信息技术有限公司 Operation and maintenance flow cutting method and system
CN113923081A (en) * 2021-10-15 2022-01-11 北京同城必应科技有限公司 Business gateway solution for gray scale release in distributed environment
CN114385515A (en) * 2022-03-24 2022-04-22 凯泰铭科技(北京)有限公司 Gray scale publishing method, system and device for insurance operation platform
CN114884915A (en) * 2022-04-19 2022-08-09 阿里巴巴(中国)有限公司 Information processing method, device and equipment based on gray release

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030018926A1 (en) * 2001-07-17 2003-01-23 International Business Machines Corporation Transition to switch node adapter diagnostics using adapter device driver
CN103095743A (en) * 2011-10-28 2013-05-08 阿里巴巴集团控股有限公司 Handling method and system of grey release
CN103176790A (en) * 2011-12-26 2013-06-26 阿里巴巴集团控股有限公司 Application releasing method and application releasing system
US20170118110A1 (en) * 2015-10-23 2017-04-27 Netflix, Inc. Techniques for determining client-side effects of server-side behavior using canary analysis
CN107360010A (en) * 2016-05-09 2017-11-17 阿里巴巴集团控股有限公司 A kind of website gray scale dissemination method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030018926A1 (en) * 2001-07-17 2003-01-23 International Business Machines Corporation Transition to switch node adapter diagnostics using adapter device driver
CN103095743A (en) * 2011-10-28 2013-05-08 阿里巴巴集团控股有限公司 Handling method and system of grey release
CN103176790A (en) * 2011-12-26 2013-06-26 阿里巴巴集团控股有限公司 Application releasing method and application releasing system
US20170118110A1 (en) * 2015-10-23 2017-04-27 Netflix, Inc. Techniques for determining client-side effects of server-side behavior using canary analysis
CN107360010A (en) * 2016-05-09 2017-11-17 阿里巴巴集团控股有限公司 A kind of website gray scale dissemination method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李晓毅: "电子银行系统灰度发布的研究与实现", 《金融电子化》, no. 01, pages 91 - 93 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377498A (en) * 2019-05-27 2019-10-25 平安银行股份有限公司 Credit card automatic test approach, device, electronic equipment and storage medium
CN110377498B (en) * 2019-05-27 2023-11-03 平安银行股份有限公司 Automatic credit card account testing method and device, electronic equipment and storage medium
CN110647335A (en) * 2019-07-26 2020-01-03 平安科技(深圳)有限公司 Software gray level release method and device, electronic equipment and storage medium
CN110647335B (en) * 2019-07-26 2024-06-25 平安科技(深圳)有限公司 Software gray level release method and device, electronic equipment and storage medium
CN110784409A (en) * 2019-10-31 2020-02-11 湖南御家科技有限公司 Spring Cloud-based micro-service gray level publishing method
CN110784409B (en) * 2019-10-31 2022-08-09 长沙水羊网络科技有限公司 Spring Cloud-based micro-service gray level publishing method
CN111324377A (en) * 2020-03-11 2020-06-23 上海东普信息科技有限公司 Application gray level release method, system, device and storage medium
CN111324377B (en) * 2020-03-11 2023-03-24 上海东普信息科技有限公司 Application gray level release method, system, device and storage medium
CN111580855A (en) * 2020-04-09 2020-08-25 上海淇毓信息科技有限公司 Strategy issuing method and system based on full-flow gray level issuing and electronic equipment
CN111580855B (en) * 2020-04-09 2023-11-14 上海淇毓信息科技有限公司 Policy issuing method and system based on full-flow gray level issuing and electronic equipment
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
CN112346777A (en) * 2020-11-20 2021-02-09 浙江百应科技有限公司 Smooth application program publishing method and device
CN112446714A (en) * 2020-12-11 2021-03-05 上海中通吉网络技术有限公司 Server upgrading method, device and equipment for express after-sale work order processing system
CN112948278B (en) * 2021-05-14 2021-07-13 太平金融科技服务(上海)有限公司深圳分公司 Product gray level publishing method, device, equipment and medium based on gray level database
CN112948278A (en) * 2021-05-14 2021-06-11 太平金融科技服务(上海)有限公司深圳分公司 Product gray level publishing method, device, equipment and medium based on gray level database
CN113612686A (en) * 2021-06-29 2021-11-05 中国人民财产保险股份有限公司 Traffic scheduling method and device and electronic equipment
CN113923081A (en) * 2021-10-15 2022-01-11 北京同城必应科技有限公司 Business gateway solution for gray scale release in distributed environment
CN114385515A (en) * 2022-03-24 2022-04-22 凯泰铭科技(北京)有限公司 Gray scale publishing method, system and device for insurance operation platform
CN114884915A (en) * 2022-04-19 2022-08-09 阿里巴巴(中国)有限公司 Information processing method, device and equipment based on gray release
CN114884915B (en) * 2022-04-19 2024-03-26 阿里巴巴(中国)有限公司 Message processing method, device and equipment based on gray release

Also Published As

Publication number Publication date
CN109726099B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN109726099A (en) A kind of application gray scale dissemination method, device and equipment
CN112840326B (en) Test engine for automated operation management
US11132192B2 (en) Bi-directional communication between change management tool and implementation tools
US20200334025A1 (en) Providing different upgrade paths for upgrading a server
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN109960653A (en) Regression testing method, device, equipment and storage medium
US10802815B1 (en) Managing upgrades of clients having different installed versions of a software product
US10055215B2 (en) Enabling corrections during upgrade procedure
US9003494B2 (en) Automatic authorization of users and configuration of software development environment
US10379894B1 (en) Lineage-based trust for virtual machine images
US11544050B1 (en) Software patch automation
CN113672269B (en) Data processing method, system, electronic device and program product
EP4327205A1 (en) Transition manager system
US9389991B1 (en) Methods, systems, and computer readable mediums for generating instruction data to update components in a converged infrastructure system
CN116755719A (en) Data processing method, device and data processing system of application component
CN113515452B (en) Automatic test method, system, electronic equipment and storage medium for application
CN110874219A (en) Task authority control method and device
US20230244782A1 (en) Methods and systems for controlling access to at least one computer program
US11736525B1 (en) Generating access control policies using static analysis
JP6382705B2 (en) Virtual device test apparatus, virtual device test method, and virtual device test program
CN113672521A (en) Program testing method and device and electronic equipment
CN112765041A (en) Game automatic testing method and device and electronic equipment
CN115469844A (en) Code processing method, system, computer cluster, medium, and program product
MVP et al. Microsoft System Center 2012 R2 Operations Manager Cookbook
Barboni et al. CATANA: Replay Testing for the Ethereum Blockchain

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
TA01 Transfer of patent application right

Effective date of registration: 20240220

Address after: No. 245, 8th Floor, Building 7, No. 30 Shixing Street, Shijingshan District, Beijing, 100000 (Cluster Registration)

Applicant after: Huishang Cloud Service (Beijing) Technology Co.,Ltd.

Country or region after: China

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

Country or region before: China

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant