CN109408096A - A kind of method that Distributed Application heat updates - Google Patents
A kind of method that Distributed Application heat updates Download PDFInfo
- Publication number
- CN109408096A CN109408096A CN201811481159.4A CN201811481159A CN109408096A CN 109408096 A CN109408096 A CN 109408096A CN 201811481159 A CN201811481159 A CN 201811481159A CN 109408096 A CN109408096 A CN 109408096A
- Authority
- CN
- China
- Prior art keywords
- version
- application
- service
- new
- version number
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The present invention relates to a kind of methods that Distributed Application heat updates.The present invention first modifies registration center, makes have the function of version management in registration, with version number's Differentiated Services list;Registration center returns to different Service Instance lists according to different version numbers;The application example of new version is disposed using new version number;If inadequate resource closes the certain applications example of legacy version to dispose new version application;Switch the version number of gateway;And the request of legacy version is monitored, it waits all legacy version application requests to complete, stops old application;Observe whether new version application normally provides service, if it is, closing legacy version application, continuing to dispose remaining new opplication example;If it is not, then calling gateway interface, switching version number to old version number retracts, meanwhile, the request of observation new version application waits requests to complete, then closes the application example of new version.The present invention solves existing interruption service when upgrade application in distributed environment, retracts the problems such as difficult.
Description
Technical field
The present invention relates to distributed application technique field, especially a kind of method of Distributed Application heat update.
Background technique
In the method for distribution Web application upgrade it is general there are two types of;One is off Distributed Application, then updates application,
Restart etc. being served by after update using external offer service.Second is that not stopping answering one by one in the case where entire application cluster
It is updated with example, including entire application example updates;Or does not stop reference and update single file.But face application cluster
Greatly, in the case where business complexity, new and old edition function conflict, currently existing scheme has following problem:
First is that needing to stop service, during application updates, need to stop application cluster, application cluster can not at this time
Service is externally provided, and this time is often long.
Second is that not stopping application cluster if taken, example carries out stopping update one by one, and the application of legacy version is real at this time
Example can also provide service, but if new version is applied in the case where being logically present conflict with legacy version application, service can go out
Existing mistake;It is light then lead to user's request error, it is heavy then influence entire operation system logic, lead to error in data.At this time just need
Stop being served by and be updated.
Third is that if carrying out when loophole on line occur in upgrading failure, new version using rollback.Using rollback when
It waits, in order not to application error occur, then needs to stop applying retracting.The time of service disruption will be longer in this way.
In order to guarantee exception do not occur in Distributed Application renewal process, it is capable of providing normal service, while can rise
It retracts to immediate stability when grade failure, one kind is needed to provide Version Control, the hot update side of seamless switching in a distributed system
Method.
Summary of the invention
Present invention solves the technical problem that being to provide a kind of hot update method of Distributed Application, do not stopping using clothes
Upgrade application while business;After upgrading goes wrong, do not stop service ground rollback version rapidly.
The technical solution that the present invention solves above-mentioned technical problem is:
The method the following steps are included:
Registration center is modified, makes have the function of version management in registration, with version number's Differentiated Services list;
Registration center returns to different Service Instance lists according to different version numbers;
The application example of new version is disposed using new version number;If inadequate resource to dispose new version application,
Then close the certain applications example of legacy version;
Switch the version number of gateway;And the request of legacy version is monitored, it waits all legacy version application requests to complete, stops
Only old application;
Observation new version offer service using whether normally, if it is, closing legacy version application, continuing to dispose residue newly
Application example;If it is not, then calling gateway interface, switching version number to old version number retracts, meanwhile, observation is new
The request of version application, waits requests to complete, then closes the application example of new version.
In the method, when switching version number to old version number is retracted, if dispose new version application
Part legacy version application example is closed, then the deployment of these application examples is got up again.
In a distributed system, an application is made of multiple services, and a service has multiple examples.
Registration center records the address url of all Service Instances, title, monitor state;The information of the record is to take
Pragmatic example records when registration, when Service Instance disconnects, removes record;
Example is served by by calling registration center to obtain Service Instance list;Registration center is according to different versions
Number, return to the corresponding Service Instance list of version number.
The method, using new version number application deployment example, application example is obtained according to new version number to registration center
Take the service list of new version number;Gateway or old version number simultaneously, the Service Instance list that gateway is got
It is the Service Instance of legacy version;Before the version number of switching gateway, request will not call new service.
The address of service cached in gateway has all been changed to new version after switching version number by the method
Address of service;The service of new version is all called in all new requests.
The present invention needs to interrupt service when solving upgrade application in distributed environment, the difficult, conventional dynamic that retracts updates
The problem of class file possible application error, can while not stopping application service upgrade application;Occur in upgrading
After problem, do not stop service ground rollback version rapidly.
Detailed description of the invention
The following further describes the present invention with reference to the drawings:
Fig. 1 is flow chart of the present invention.
Specific embodiment
As shown in Figure 1, method flow of the invention is as follows:
Step 1: exploitation registration center's version management function allows application service example with version number, is registered to note
Volume center.
In distributed system, an application can be made of multiple services, and a service has multiple examples.
For example, a shopping web application, come in handy family service, order placement service etc..Order placement service has multiple examples
(running multiple identical programs) uses the processing capacity of service to improve.
In a distributed system, registration center records the address url of all Service Instances, title, monitor state.These letters
Breath is that record will remove record when Service Instance disconnects when Service Instance registration.
And application service example increases version number and is registered to registration center, then can make the same service in registration center
With the presence of the example of multiple versions.
Step 2: different Service Instance lists is returned according to different version numbers.
General registration center is all Service Instance lists of return, and after the processing for passing through step 1, further conversion registration
Center allows registration center according to different version numbers, returns to the corresponding Service Instance list of version number.So application is real
Example can only call the application example of identical version, and the application example between different editions has just accomplished isolation.
Then it is served by example, including gateway, is by calling registration center to obtain Service Instance list.Then
According to the service ID of service list, url is serviced to call different application examples.
Step 3: if inadequate resource can close the certain applications example of legacy version to dispose new version application.
Just as mentioning in step 1, a service has multiple examples while providing service, it is possible to it is real to close part
Example, and non-service affecting normal operation can only lower the processing capacity of application.
If without enough resources, such as without enough physical machines, no enough cpu, memory.It can close
Partial legacy version application example.These resources are discharged to dispose new version application example.
Step 4: the application example of new version is disposed using new version number.
After new version number application deployment example, this example is to obtain new version number to registration center according to new version number
Service list.Simultaneously because gateway or old version number, the Service Instance list that gateway is got, are old
The Service Instance of version.So request is will not to call new service before the version number of switching gateway.
At this point, new and old being served by for two versions is all running, but request the application that can only call legacy version.Guarantee
Normal operation of the entire service in handoff procedure.It should not lead to service error because of version is inconsistent between two services.
For example, the application file for updating either directly update Service Instance if it is traditional application service one by one reaches
To the effect for not stopping service.After having updated user service, order placement service or old, old at this time order placement service are called new
User service, due to enter and leave ginseng may it is inconsistent, cause order placement service to malfunction, influence the operation entirely applied.
Step 5: switching the version number of gateway.Service request is forwarded by gateway, so taking
It is engaged in front of the switching of gateway version number, gateway is still served by address from registration center's acquisition legacy version, so still
Call old service.After the version number of switching now, the address of service cached in gateway is all changed to the clothes of new version
Business address.So all new requests can all call the service of new version.
The process time of this switching can be ignored, and reach not interrupting for service.
Step 6: monitoring the request of legacy version, all legacy version application requests is waited to complete.Because in switching gateway
Before, request may is calling legacy version application.So request is monitored by the Request Log of application itself,
Until the request of these legacy versions application is completed.
Request Log is all to record the time when request is initiated and is terminated, enter and leave these records of ginseng, request results.
All these requests are waited to have the end time, exactly all requests are completed.
Step 7: whether the application request for observing new version can be correctly completed, and whether distributed task scheduling can correctly assist
Make.If so, thening follow the steps 8;It is no to then follow the steps 10.
Step 8: closing legacy version application, in step 3, the legacy version application example for having simply turned off part is either complete
It is not turned off legacy version application example entirely, so the application of all legacy versions is all closed, resource is discharged after version switching.
Step 9: continuing to dispose new version application example.In step 4, since legacy version application example has simply turned off one
Part, even without closing, new version application example only deploys a few examples.After currently all legacy version application is closed,
Deployment new edition application example is continued to, the processing capacity of application service is improved.
For example, 10 servers altogether.User service in 4 respectively every deploy 1 example.Order placement service is 6
In platform respectively every deploy 1 example.In step 3,1 user service example, 2 order placement service examples are closed.Step 4
In, deploy 1 new customer instance, 2 new order placement service examples.
Then remaining 3 old user service examples, 4 old order placement service examples have been shut off in step 8.
The customer instance of 3 new versions of deployment and the Order Instance of 4 new versions are continued to now.
Step 10: updating the version that unsuccessfully retracts.Gateway interface is called, version number is switched to the version of legacy version
Number.Because being that new and old edition application is all being run at this time.So new request can call legacy version to answer at once after switching version number
Service.
Quick version rollback thus may be implemented.
Step 11: the request of observation new version application, until request is completed.Because, may before being switched to legacy version application
There are component requests to have invoked new version application, so these requests to be waited to complete.In waiting process, request can call old
Version application, so will not influence service operation.
Step 12: waiting all requests to complete, be shut off the application example of new version.
Step 13: if closing part legacy version application example in step 3, just these application examples being disposed again
Come.
Claims (6)
1. a kind of method that Distributed Application heat updates, it is characterised in that: the method the following steps are included:
Registration center is modified, makes have the function of version management in registration, with version number's Differentiated Services list;
Registration center returns to different Service Instance lists according to different version numbers;
The application example of new version is disposed using new version number;If inadequate resource is closed with disposing new version application
Close the certain applications example of legacy version;
Switch the version number of gateway;And the request of legacy version is monitored, it waits all legacy version application requests to complete, stops old
Using;
Observe whether new version application normally provides service, if it is, closing legacy version application, continuing to dispose remaining new opplication
Example;If it is not, then calling gateway interface, switching version number to old version number retracts, meanwhile, observe new version
The request of application, waits requests to complete, then closes the application example of new version.
2. according to the method described in claim 1, it is characterized by: switching version number to old version number in the method
Part legacy version application example is closed when being retracted, when if disposing new version application, it is again that these applications are real
Example deployment is got up.
3. according to the method described in claim 1, it is characterized by:
In a distributed system, an application is made of multiple services, and a service has multiple examples.
4. according to the method described in claim 1, it is characterized by:
Registration center records the address url of all Service Instances, title, monitor state;The information of the record is real in service
It is recorded when example registration, when Service Instance disconnects, removes record;
Example is served by by calling registration center to obtain Service Instance list;Registration center returns according to different version numbers
Return the corresponding Service Instance list of version number.
5. according to the method described in claim 1, it is characterized by: the method,
Using new version number application deployment example, application example obtains the service of new version number according to new version number to registration center
List;Gateway or old version number simultaneously, the Service Instance list that gateway is got are that the service of legacy version is real
Example;Before the version number of switching gateway, request will not call new service.
6. according to the method described in claim 1, it is characterized by: the method, after switching version number, service network
The address of service of Central Shanxi Plain caching has all been changed to the address of service of new version;The service of new version is all called in all new requests.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811481159.4A CN109408096A (en) | 2018-12-05 | 2018-12-05 | A kind of method that Distributed Application heat updates |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811481159.4A CN109408096A (en) | 2018-12-05 | 2018-12-05 | A kind of method that Distributed Application heat updates |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109408096A true CN109408096A (en) | 2019-03-01 |
Family
ID=65457365
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811481159.4A Withdrawn CN109408096A (en) | 2018-12-05 | 2018-12-05 | A kind of method that Distributed Application heat updates |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109408096A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110022357A (en) * | 2019-03-11 | 2019-07-16 | 潘洪安 | Data access method and data access device |
CN110708367A (en) * | 2019-09-24 | 2020-01-17 | 中信百信银行股份有限公司 | Application calling method, application publishing method and application publishing system |
CN111949193A (en) * | 2019-05-16 | 2020-11-17 | 腾讯科技(深圳)有限公司 | Interface switching method, device, terminal and storage medium |
CN112099817A (en) * | 2020-07-30 | 2020-12-18 | 爱普(福建)科技有限公司 | Automatic app updating method and system |
CN112214239A (en) * | 2020-11-19 | 2021-01-12 | 湖南红网新媒体集团有限公司 | News client configuration method and system |
CN112905204A (en) * | 2021-02-23 | 2021-06-04 | 杭州推啊网络科技有限公司 | Updating method and system of Tensorflow model |
CN113055465A (en) * | 2021-03-11 | 2021-06-29 | 南京大学 | Micro-service dynamic updating method supporting transaction consistency |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9619222B2 (en) * | 2014-01-16 | 2017-04-11 | International Business Machines Corporation | System, method and apparatus for automatic device registration and secure application activation |
CN108683516A (en) * | 2018-03-14 | 2018-10-19 | 聚好看科技股份有限公司 | A kind of upgrade method of application example, device and system |
-
2018
- 2018-12-05 CN CN201811481159.4A patent/CN109408096A/en not_active Withdrawn
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9619222B2 (en) * | 2014-01-16 | 2017-04-11 | International Business Machines Corporation | System, method and apparatus for automatic device registration and secure application activation |
CN108683516A (en) * | 2018-03-14 | 2018-10-19 | 聚好看科技股份有限公司 | A kind of upgrade method of application example, device and system |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110022357A (en) * | 2019-03-11 | 2019-07-16 | 潘洪安 | Data access method and data access device |
CN111949193A (en) * | 2019-05-16 | 2020-11-17 | 腾讯科技(深圳)有限公司 | Interface switching method, device, terminal and storage medium |
CN111949193B (en) * | 2019-05-16 | 2023-08-04 | 腾讯科技(深圳)有限公司 | Interface switching method, device, terminal and storage medium |
CN110708367A (en) * | 2019-09-24 | 2020-01-17 | 中信百信银行股份有限公司 | Application calling method, application publishing method and application publishing system |
CN112099817A (en) * | 2020-07-30 | 2020-12-18 | 爱普(福建)科技有限公司 | Automatic app updating method and system |
CN112214239A (en) * | 2020-11-19 | 2021-01-12 | 湖南红网新媒体集团有限公司 | News client configuration method and system |
CN112905204A (en) * | 2021-02-23 | 2021-06-04 | 杭州推啊网络科技有限公司 | Updating method and system of Tensorflow model |
CN112905204B (en) * | 2021-02-23 | 2024-05-07 | 杭州推啊网络科技有限公司 | Tensorflow model updating method and system |
CN113055465A (en) * | 2021-03-11 | 2021-06-29 | 南京大学 | Micro-service dynamic updating method supporting transaction consistency |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109408096A (en) | A kind of method that Distributed Application heat updates | |
EP3182678B1 (en) | Method for upgrading network function virtualization application, and related system | |
EP1962538B1 (en) | Method for managing terminal device | |
EP3413511B1 (en) | Vnfm determining method and network function virtualization orchestrator | |
EP2166712A1 (en) | A method for implementing service interaction in the ip multimedia subsystem | |
CN101814077B (en) | OCI 9-based database access middleware | |
CA2975071A1 (en) | Management of network functions virtualization and orchestration apparatus, system, management method, and program | |
WO2015131696A1 (en) | Method and device for virtual network function management | |
CN100471134C (en) | Method, device for upgrading telecommunication equipment and upgrading engine unit | |
CN104618127B (en) | Active and standby memory node switching method and system | |
JP2005502145A (en) | Transition support mechanism in open service architecture and open mobile communication architecture | |
CN105653328B (en) | The multi version program of big memory service and deposit method and apparatus | |
CN105100144B (en) | Update the method and device of application | |
CN105959390A (en) | Unified management system and method of micro services | |
US20150113131A1 (en) | Scheduling A Service Event In A Network | |
CN113055421A (en) | Service grid management method and system | |
CN100479380C (en) | Network device managing method, network device and network managing system | |
CN106095603A (en) | The application program that a kind of android system is identical can open multiple methods simultaneously | |
CN109639818B (en) | Service discovery method and device under cloud environment, server and storage medium | |
CN110620676B (en) | Fault management method and related device | |
CN111757353B (en) | Network data processing method and device in 5G core network | |
CN105227379A (en) | A kind of centralized monitor for java web application and method for early warning | |
CN111090495A (en) | Node management method, device, equipment, storage medium and system | |
CN106161532A (en) | A kind of orientation method for cleaning based on cloud service and system | |
WO2016197688A1 (en) | Data collection method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190301 |
|
WW01 | Invention patent application withdrawn after publication |