CN106487561A - The method and system that a kind of server service updates - Google Patents
The method and system that a kind of server service updates Download PDFInfo
- Publication number
- CN106487561A CN106487561A CN201510550095.9A CN201510550095A CN106487561A CN 106487561 A CN106487561 A CN 106487561A CN 201510550095 A CN201510550095 A CN 201510550095A CN 106487561 A CN106487561 A CN 106487561A
- Authority
- CN
- China
- Prior art keywords
- server
- etcd
- background server
- ttl value
- background
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Hardware Redundancy (AREA)
Abstract
The invention discloses the method and system that a kind of server service updates, the method includes:A, background server are to ETCD server registration;B, ETCD server arranges the ttl value for background server;C, background server send ttl value to ETCD server update;D, ETCD server monitors the ttl value sent by background server, if listening to ttl value, executes step C, if not hearing ttl value within the time of ttl value, executes E step;E, restart background server, and return step A.Technical solution of the present invention can be monitored to the operation conditions of background server, the running status of effective monitoring server, the rapid interruption service scenario for finding server, and take recovery measure to restart rapidly service, the stable operation for keeping distributed server system is provided and is effectively ensured.
Description
Technical field
The present invention relates to Internet technical field, method and be that more particularly to a kind of server service updates
System.
Background technology
In cloud computing era, it is linked in computing cluster with how allowing service fast transparent, how allows shared joining
Confidence is ceased quickly by all machine discoveries in cluster, it is even more important that how to build so a set of high can
With, safely, be easy to dispose and response quickly service cluster, had become as in the urgent need to address asking
Topic.Such issues that ETCD is for solving provides effective scheme.ETCD is applied under distributed environment
Key/value storage service, is the key assignments storage system of a High Availabitity, is mainly used in configuration sharing kimonos
Business finds.Using the characteristic of ETCD, application program can share information, configuration or service in the cluster
It was found that, ETCD can replicate these data in each node of cluster and ensure that these data are correct all the time.
Container cluster management system Kubernetes, PaaS platform Cloud of the increasing income Foundry of Google and
The Fleet of CoreOS has been widely used ETCD.
ETCD has the following advantages:
ˇ is simple:You just easily can be used with curl based on the API of HTTP+JSON;
ˇ safety:Optional SSL authenticated client mechanism;
ˇ is quick:Each example is per second to support 1,000 write operations;
ˇ is credible:The uniformity of distributed system architecture is adequately achieved using Raft algorithm.
In a distributed system, how between management node state is always a difficult problem.ETCD is special
Service discovery and registration for cluster environment and design, it provides the failure of data TTL, data and changes prison
Depending on functions such as, many-valued, catalogue monitoring, distributed lock atomic operations, in that context it may be convenient to track and manage cluster
The state of node.
But, said method cannot effective process background server delay machine, interrupt service the occurrence of.
In distributed system architecture, large number of server due to processing the interaction of the computing data of flood tide,
Occur system crash, the situation of machine of delaying, and the interruption of server service will result in cannot configuration sharing or
Service discovery, affects the operation of whole distributed system.For this reason, it may be necessary to solve sub-service in the middle part of distributed system
Business device interrupts the generation of service scenario, being capable of rapid recovery system after interrupting occurring.
Content of the invention
The present invention provides the method and system that a kind of server service updates, the operation conditions to background server
Monitored, be capable of the running status of effective monitoring server, the rapid interruption service scenario for finding server,
And take the recovery measure to restart rapidly service, it is to avoid the function of distributed type assemblies server systems and service
Interrupt, the stable operation for keeping distributed server system is provided and is effectively ensured.
Technical scheme provides a kind of method that server service updates, and comprises the following steps:
A, background server are to ETCD server registration;
B, ETCD server arranges the ttl value for background server;
C, background server send ttl value to ETCD server update;
D, ETCD server monitors the ttl value sent by background server;
If ttl value is listened to, step C is executed;
If ttl value is not heard within the time of ttl value, execute E step;
E, restart background server, and return step A.
Further, after step A, ETCD server arranges ttl value for the background server of new registration.
Further, ETCD server arranges different ttl values for different background servers.
Further, background server sends ttl value according to certain frequency to ETCD server update.
Further, frequency time was spaced less than the time defined in ttl value.
Further, ETCD server is provided with management of monitor mechanism, judges that background server sends TTL
Whether value is successful.
Further, the management of monitor mechanism is:ETCD server does not hear backstage clothes for continuous 3 times
The ttl value that business device sends, then judge that the background server corresponding to the ttl value interrupts service.
The system that technical scheme additionally provides a kind of server service renewal, including:Background service
Device, ETCD server, wherein,
Background server is used for ETCD server registration, and periodically sends TTL signal;
ETCD server is used for receiving the registration of background server, is that background server arranges ttl value, with
And background server is restarted in order.
Further, ETCD server arranges ttl value for the background server of new registration;
ETCD server is that different background servers arrange different ttl values.
Further, have no progeny in the TTL signal of background server, ETCD server command restarts backstage
Server;
Background server is restarted backward ETCD server and is registered.
Technical solution of the present invention is designed with special working mechanism to monitor and manage the work of group's server
State, in the case that background server goes wrong, can find rapidly to interrupt the server of service, and
Take measures to recover the service of restarting rapidly, it is to avoid the interruption of the function of distributed cluster system and service, right
Provide in the stable operation for keeping distributed cluster system and effectively ensure.
Other features and advantages of the present invention will be illustrated in the following description, also, partly from explanation
Become apparent in book, or understood by implementing the present invention.The purpose of the present invention and other advantages can
Realize and obtain by specifically noted structure in the specification that is write, claims and accompanying drawing
?.
Below by drawings and Examples, technical scheme is described in further detail.
Description of the drawings
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for specification, with this
Bright embodiment is used for together explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the method flow diagram that server service updates in the embodiment of the present invention one;
Fig. 2 is the system construction drawing that server service updates in the embodiment of the present invention one.
Specific embodiment
The preferred embodiments of the present invention are illustrated below in conjunction with accompanying drawing, it will be appreciated that described herein
Preferred embodiment is merely to illustrate and explains the present invention, is not intended to limit the present invention.
Fig. 1 is the method flow diagram that server service updates in the embodiment of the present invention one.As shown in figure 1, should
Flow process is comprised the following steps:
Step 101, background server are to ETCD server registration.
Step 102, ETCD server arrange the ttl value for background server;
After step A, ETCD server arranges ttl value for the background server of new registration;
ETCD server arranges different ttl values for different background servers;
ETCD only arranges a ttl value to every server, connects ETCD server in every server
When registering set ttl value is all adopted during service is provided.
Step 103, background server send ttl value to ETCD server update.
Background server sends ttl value according to certain frequency to ETCD server update;
Frequency time was spaced less than the time defined in ttl value.
Step 104, ETCD server monitor the ttl value sent by background server;
ETCD server is provided with management of monitor mechanism, judges that background server sends whether ttl value becomes
Work(;
The management of monitor mechanism is:ETCD server does not hear background server transmission for continuous 3 times
Ttl value, then judge that the background server corresponding to the ttl value interrupts service;
If ttl value is listened to, 103 steps are executed;
If ttl value is not heard within the time of ttl value, execute 105 steps.
Step 105, restart background server, and return 101 steps.
In order to realize the flow process of above-mentioned server service renewal, the present embodiment additionally provides a kind of server service
The system of renewal, Fig. 2 are the system construction drawing that server service updates in the embodiment of the present invention one.As Fig. 2
Shown, the system includes:Background server 201, ETCD server 202, wherein,
Background server is used for ETCD server registration, and periodically sends TTL signal;
ETCD server is used for receiving the registration of background server, is that background server arranges ttl value, with
And background server is restarted in order.
Further, ETCD server arranges ttl value for the background server of new registration;
ETCD server is that different background servers arrange different ttl values.
Further, have no progeny in the TTL signal of background server, ETCD server command restarts backstage
Server;
Background server is restarted backward ETCD server and is registered.
Technical solution of the present invention is designed with the working condition that special equipment is monitored and manages group's server,
In the case that operation problem occurs in background server, the service that service disruption situation occurs can be found rapidly
Device, and take recovery measure to restart rapidly service, it is to avoid the interruption of the function of distributed system and service,
The stable operation for keeping distributed system is provided and is effectively ensured.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or knot
The form of the embodiment in terms of conjunction software and hardware.And, the present invention can be adopted and wherein be wrapped one or more
Computer-usable storage medium containing computer usable program code (including but not limited to magnetic disc store and
Optical memory etc.) the upper computer program that implements form.
The present invention is produced with reference to method according to embodiments of the present invention, equipment (system) and computer program
The flow chart of product and/or block diagram are describing.It should be understood that can by computer program instructions flowchart and
/ or block diagram in each flow process and/or square frame and flow chart and/or the flow process in block diagram and/
Or the combination of square frame.These computer program instructions can be provided to all-purpose computer, special-purpose computer, embedded
The processor of formula processor or other programmable data processing device is to produce a machine so that by calculating
The instruction of the computing device of machine or other programmable data processing device is produced for realizing in flow chart one
The device of the function of specifying in individual flow process or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set
In the standby computer-readable memory for working in a specific way so that be stored in the computer-readable memory
Instruction produce and include the manufacture of command device, the command device is realized in one flow process or multiple of flow chart
The function of specifying in one square frame of flow process and/or block diagram or multiple square frames.
These computer program instructions can be also loaded in computer or other programmable data processing device, made
Obtain series of operation steps is executed on computer or other programmable devices to produce computer implemented place
Reason, the instruction so as to execute on computer or other programmable devices are provided for realizing in flow chart one
The step of function of specifying in flow process or one square frame of multiple flow processs and/or block diagram or multiple square frames.
Obviously, those skilled in the art can carry out various changes and modification without deviating from this to the present invention
The spirit and scope of invention.So, if these modifications of the present invention and modification belong to the claims in the present invention
And its within the scope of equivalent technologies, then the present invention is also intended to comprising these changes and modification.
Claims (10)
1. a kind of method that server service updates, it is characterised in that comprise the following steps:
A, background server are to ETCD server registration;
B, ETCD server arranges the ttl value for background server;
C, background server send ttl value to ETCD server update;
D, ETCD server monitors the ttl value sent by background server;
If ttl value is listened to, step C is executed;
If ttl value is not heard within the time of ttl value, execute E step;
E, restart background server, and return step A.
2. method according to claim 1, it is characterised in that after step A, ETCD server
Background server for new registration arranges ttl value.
3. the method according to claim 1 and 2, it is characterised in that ETCD server is not for
Same background server arranges different ttl values.
4. method according to claim 1, it is characterised in that background server is according to certain frequency
Rate sends ttl value to ETCD server update.
5. the method according to claim 1 and 4, it is characterised in that frequency time is spaced less than TTL
The value defined time.
6. method according to claim 1, it is characterised in that ETCD server is provided with monitoring
Administrative mechanism, judges whether background server sends ttl value successful.
7. the method according to claim 1 and 6, it is characterised in that the management of monitor mechanism is:
ETCD server does not hear the ttl value of background server transmission for continuous 3 times, then judge the ttl value
Corresponding background server interrupts service.
8. the system that a kind of server service updates, it is characterised in that include:Background server, ETCD
Server, wherein,
Background server is used for ETCD server registration, and periodically sends TTL signal;
ETCD server is used for receiving the registration of background server, is that background server arranges ttl value, with
And background server is restarted in order.
9. system according to claim 8, it is characterised in that further include:
ETCD server arranges ttl value for the background server of new registration;
ETCD server is that different background servers arrange different ttl values.
10. system according to claim 8, it is characterised in that further include:
Have no progeny in the TTL signal of background server, ETCD server command restarts background server;
Background server is restarted backward ETCD server and is registered.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510550095.9A CN106487561A (en) | 2015-09-01 | 2015-09-01 | The method and system that a kind of server service updates |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510550095.9A CN106487561A (en) | 2015-09-01 | 2015-09-01 | The method and system that a kind of server service updates |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106487561A true CN106487561A (en) | 2017-03-08 |
Family
ID=58235588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510550095.9A Pending CN106487561A (en) | 2015-09-01 | 2015-09-01 | The method and system that a kind of server service updates |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106487561A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108390766A (en) * | 2017-10-25 | 2018-08-10 | 国云科技股份有限公司 | A kind of service register and discovery method suitable for micro services |
CN109753540A (en) * | 2018-12-03 | 2019-05-14 | 新华三云计算技术有限公司 | Shared resource access method, device and computer-readable storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104135512A (en) * | 2014-07-16 | 2014-11-05 | 小米科技有限责任公司 | Method and device of updating service registration as well as server and client |
-
2015
- 2015-09-01 CN CN201510550095.9A patent/CN106487561A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104135512A (en) * | 2014-07-16 | 2014-11-05 | 小米科技有限责任公司 | Method and device of updating service registration as well as server and client |
Non-Patent Citations (2)
Title |
---|
JASON WILDER: ""Open-Source Service Discovery"", 《HTTP://JASONWILDER.COM/BLOG/2014/02/04/SERVICE-DISCOVERY-IN-THE-CLOUD/》 * |
孙健波: ""etcd:从应用场景到实现原理的全方位解读"", 《HTTPS://WWW.INFOQ.CN/ARTICLE/ETCD-INTERPRETATION-APPLICATION-SCENARIO-IMPLEMENT-PRINCIPLE》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108390766A (en) * | 2017-10-25 | 2018-08-10 | 国云科技股份有限公司 | A kind of service register and discovery method suitable for micro services |
CN109753540A (en) * | 2018-12-03 | 2019-05-14 | 新华三云计算技术有限公司 | Shared resource access method, device and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11296923B2 (en) | Network fault originator identification for virtual network infrastructure | |
US9361126B1 (en) | Device driver aggregation in operating system deployment | |
US20180176088A1 (en) | Virtualized network function monitoring | |
CN106888245B (en) | Data processing method, device and system | |
CN106878363B (en) | Information processing method, device and system | |
US10169166B2 (en) | Real-time fault-tolerant architecture for large-scale event processing | |
US8825779B2 (en) | Systems and methods of real-time data subscription and reporting for telecommunications systems and devices | |
JP2019523501A (en) | Risk identification method, risk identification device, cloud risk identification device and system | |
CN106712981A (en) | Method and device for informing node change | |
CN107295031A (en) | A kind of method of data synchronization and device | |
CN107040576A (en) | Information-pushing method and device, communication system | |
US8719622B2 (en) | Recording and preventing crash in an appliance | |
US10645155B2 (en) | Scalable parallel messaging process | |
US20170141949A1 (en) | Method and apparatus for processing alarm information in cloud computing | |
CN106487561A (en) | The method and system that a kind of server service updates | |
US10853892B2 (en) | Social networking relationships processing method, system, and storage medium | |
US12050505B2 (en) | Systems and methods for automatically applying configuration changes to computing clusters | |
US9930140B2 (en) | Tie-breaking for high availability clusters | |
CN108154343B (en) | Emergency processing method and system for enterprise-level information system | |
KR102145137B1 (en) | Methods and devices for processing data | |
CN112463514A (en) | Monitoring method and device for distributed cache cluster | |
CN109389271B (en) | Application performance management method and system | |
US11277300B2 (en) | Method and apparatus for outputting information | |
US11526499B2 (en) | Adaptively updating databases of publish and subscribe systems using optimistic updates | |
US10389830B2 (en) | Device delegation of push notification distribution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170308 |
|
RJ01 | Rejection of invention patent application after publication |