CN106657423A - Server service discovering method and system - Google Patents

Server service discovering method and system Download PDF

Info

Publication number
CN106657423A
CN106657423A CN201510732252.8A CN201510732252A CN106657423A CN 106657423 A CN106657423 A CN 106657423A CN 201510732252 A CN201510732252 A CN 201510732252A CN 106657423 A CN106657423 A CN 106657423A
Authority
CN
China
Prior art keywords
server
service
etcd
servers
background server
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
Application number
CN201510732252.8A
Other languages
Chinese (zh)
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.)
TVM Beijing Technology Co Ltd
Original Assignee
TVM Beijing Technology 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 TVM Beijing Technology Co Ltd filed Critical TVM Beijing Technology Co Ltd
Priority to CN201510732252.8A priority Critical patent/CN106657423A/en
Publication of CN106657423A publication Critical patent/CN106657423A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4541Directories for service discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a server service discovering method and system, and the method comprises the steps that a background server carries out the registration to an ETCD server; the ETCD server receives the registration information of the background server, and forms a topological structure chart; a foreground server carries out the call of a service from the ETCD server; the ETCD server searches the background server corresponding to the service; the ETCD server obtains the path information of the service; and the foreground server obtains the service from the ETCD server. According to the technical scheme of the invention, the method carries out the effective management of the service in a system, quickly achieves the service discovering function, quickly achieves the call of the service, is suitable for the configuration of a distributed system, improves the operation efficiency of a distributed system and the service, maintains the stable operation of a distributed server system, and provides reliable technical guarantee.

Description

The method and system that a kind of server service finds
Technical field
The present invention relates to Internet technical field, method and be that more particularly to a kind of server service finds System.
Background technology
In cloud computing era, it is linked into computing cluster with how allowing service fast transparent, how allows shared matching somebody with somebody Confidence breath quickly by cluster in all machine discoveries, it is even more important that how to build it is so a set of it is high can With, safely, be easy to dispose and response quickly service cluster, have become in the urgent need to address asking Topic.Such issues that ETCD is to solve provides effective scheme.ETCD is applied under distributed environment Key/value storage services, are the key assignments storage systems of a High Availabitity, are mainly used in configuration sharing kimonos Business finds.Using the characteristic of ETCD, application program can in the cluster share information, configuration or service It was found that, ETCD can replicate these data and ensure that these data are correct all the time in each node of cluster. 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:
Simply:It is user-friendly to based on the API of HTTP+JSON;
Safety:Optional SSL authenticated clients mechanism;
Quickly:Each example is per second to support 1,000 write operations;
It is credible:The uniformity of distributed system architecture is adequately achieved using Raft algorithms.
In a distributed system, service and configure distribution on a different server, with dispersed distribution on network Operational order and the database that is affected by providing the operation of data.It is distributed to be conducive to task whole It is allocated on server system and optimization, overcoming traditional integrated system can cause central host resource tight With response bottleneck defect, solve Heterogeneous data present in network, data sharing, computing share etc. Problem;Distributed type assemblies server system has the low advantage of financial cost, usually by PC with low cost Server group into cluster, the process performance of large scale computer can be reached or surmount in aspect of performance, on cost Far below large scale computer, the financial cost of the webserver is advantageously reduced;And, distributed system has well Extensibility, disposal ability that can be overall to strengthen distributed system by increasing number of servers, with The business of reply enterprise increases the calculating demand brought.
But, distributed type assemblies server system is put forward higher requirement to service discovery.In a distribution In formula group system, different services are distributed on a different server, and demand end is connect by unified access Mouth accesses distributed system to transfer different services;Distributed system be able to will seek rapidly to service Location, it should can obtain the details of current environment in the way of programming to the example that any one is applied, Existing applied environment can be embedded into without manual intervention for new example.This is accomplished by simplifying service It was found that the step of, service discovery is quickly realized, to improve the efficiency and operation stability of distributed cluster system.
The content of the invention
The present invention provides the method and system that a kind of server service finds, effectively to the clothes in distributed system Business is managed, and service discovery function is realized rapidly, and quickly realizes calling for service, is adapted to distributed The framework of system, for the operational efficiency, the holding distributed server system that improve distributed system and service Stable operation, there is provided reliable technical guarantee.
Technical scheme provides a kind of method that server service finds, comprises the following steps:
Background server is to ETCD server registrations;
ETCD servers receive the log-on message of background server, and form topology diagram;
Front End Server is serviced from ETCD server calls;
Corresponding background server is serviced described in ETCD server searches;
ETCD servers obtain the routing information of service;
Front End Server is obtained from ETCD servers and serviced.
Further, upper level server is parent node, and next stage server is child node;
The log-on message includes but is not limited to the numbering of book server, parent node server, child node service Device, the service that book server is shared.
Further, ETCD servers and background server adopt tree structure;
Child node server one parent node server of correspondence, parent node server correspondence is no less than an estrade section Point server;
ETCD servers are without parent node.
Further, the topology diagram, including the parent node and the information of child node of every server;
According to the topology diagram, ETCD servers can route all background servers, and get Up to the path of each background server;
The path refers to from ETCD servers and eventually arrives at every one-level that destination server is routed across The title or numbering of server.
Further, Front End Server calls service according to the title of the service;
ETCD servers are supported the fuzzy query of the title of the service and are called.
Further, no less than a service, each services one backstage of correspondence to every background server correspondence Server;
ETCD servers search corresponding background server according to the title of service;
Further, ETCD servers are according to the address of corresponding background server, acquisition approach information;
ETCD servers call the service according to the routing information of the lookup.
Technical scheme additionally provides the system that a kind of server service finds, including:Background service Device, ETCD servers, Front End Server, wherein,
Background server is used for ETCD server registrations, and shared service;
ETCD servers are used to receive the registration of background server, record the network of distributed type assemblies server Topological structure, records the routing information of background server, records the corresponding relation of background server and service, And according to the instruction calls service of Front End Server;
Front End Server is used to that service to be transferred and obtained to ETCD servers.
Further, ETCD servers and background server adopt tree-like topological structure.
Further, background server provides service and shares;
No less than a service, one services the unique background service of correspondence to every background server correspondence Device.
Technical solution of the present invention is designed with the server that special working mechanism comes in managing distributing type system With service configuration, for service rapid computations provide good hardware environment, can be to distributed system In service effectively managed, realize service discovery function rapidly, and quickly realize calling for service, The framework of suitable distributed system, it is distributed for the operational efficiency, the holding that improve distributed system and service The stable operation of server system provides reliable technical guarantee.
Other features and advantages of the present invention will illustrate 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, claims and accompanying drawing write .
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 to explain the present invention together, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the method flow diagram that server service finds in the embodiment of the present invention one;
Fig. 2 is the system construction drawing that server service finds 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 finds 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 registrations.
Background server is registered in the case where starting or the machine of delaying being restarted to ETCD servers;
After registration, the service corresponding to the server brings into operation, and is in service available state.
Step 102, ETCD servers receive the log-on message of background server, and form topology diagram.
The log-on message includes but is not limited to the numbering of book server, parent node server, child node service Device, the service that book server is shared;
Wherein, the upper level server of background server is parent node, and next stage server is child node;
ETCD servers and background server adopt tree structure;
Child node server one parent node server of correspondence, parent node server correspondence is no less than an estrade section Point server, ETCD servers are without parent node;
ETCD is received after log-on message, parent node, the child node sent according to every background server Information forms network topology structure figure;
According to the topology diagram, ETCD servers can route all background servers, and get Up to the path of each background server;
The path refers to from ETCD servers and eventually arrives at every one-level that destination server is routed across The title or numbering of server.
Step 103, Front End Server are serviced from ETCD server calls.
Front End Server calls service according to the title of the service;
ETCD servers are supported the fuzzy query of the title of the service and are called.
Corresponding background server is serviced described in step 104, ETCD server searches.
No less than a service, each services one background server of correspondence to every background server correspondence;
Background server of the ETCD servers according to corresponding to the title of service searches the service.
Step 105, ETCD servers obtain the routing information of service.
ETCD servers are according to the address of corresponding background server, acquisition approach information;
ETCD servers reach destination server according to the routing information of the lookup, and call corresponding clothes Business.
Step 106, Front End Server are obtained from ETCD servers and serviced.
In order to realize the flow process that above-mentioned server service finds, the present embodiment additionally provides a kind of server service It was found that system, Fig. 2 be the embodiment of the present invention one in server service find system construction drawing.Such as Fig. 2 Shown, the system includes:Background server 201, ETCD servers 202, Front End Server 203, its In,
Background server is used for ETCD server registrations, and shared service;
ETCD servers are used to receive the registration of background server, record the topology of distributed type assemblies server Structure, records the routing information of background server, records the corresponding relation of background server and service, and According to the instruction calls service of Front End Server;
Front End Server is used to transfer service to ETCD servers.
Further, ETCD servers and background server adopt tree-like topological structure.
Further, background server provides service and shares;
No less than a service, one services the unique background service of correspondence to every background server correspondence Device.
Technical solution of the present invention is designed with the server that special working mechanism comes in managing distributing type system With service configuration, for service rapid computations provide good hardware environment, can be to distributed system In service effectively managed, realize service discovery function rapidly, and quickly realize calling for service, The framework of suitable distributed system, it is distributed for the operational efficiency, the holding that improve distributed system and service The stable operation of server system provides reliable technical guarantee.
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 Close the form of the embodiment in terms of software and hardware.And, the present invention can be adopted and wherein wrapped at one or more Computer-usable storage medium containing computer usable program code (including but not limited to magnetic disc store and Optical memory etc.) on implement computer program 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 and/or block diagram of product is 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 devices is producing a machine so that by calculating The instruction of the computing device of machine or other programmable data processing devices 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 can guide computer or other programmable datas process to set In the standby computer-readable memory for working in a specific way so that in being stored in the computer-readable memory Instruction produce and include the manufacture of command device, command device realization is 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 also can be loaded into computer or other programmable data processing devices, made Obtain and series of operation steps is performed on computer or other programmable devices to produce computer implemented place Reason, so as to the instruction performed on computer or other programmable devices is 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 finds, it is characterised in that comprise the following steps:
Background server is to ETCD server registrations;
ETCD servers receive the log-on message of background server, and form topology diagram;
Front End Server is serviced from ETCD server calls;
Corresponding background server is serviced described in ETCD server searches;
ETCD servers obtain the routing information of service;
Front End Server is obtained from ETCD servers and serviced.
2. method according to claim 1, it is characterised in that further include:
Upper level server is parent node, and next stage server is child node;
The log-on message includes but is not limited to the numbering of book server, parent node server, child node server, the service that book server is shared.
3. method according to claim 1, it is characterised in that further include:
ETCD servers and background server adopt tree structure;
Child node server one parent node server of correspondence, parent node server correspondence is no less than an estrade node server;
ETCD servers are without parent node.
4. method according to claim 1, it is characterised in that further include:
The topology diagram, including the parent node and the information of child node of every server;
According to the topology diagram, ETCD servers can route all background servers, and get the path up to each background server;
The path refers to from ETCD servers the title or numbering for eventually arriving at every primary server that destination server is routed across.
5. method according to claim 1, it is characterised in that the Front End Server is serviced from ETCD server calls, is further included:
Front End Server calls service according to the title of the service;
ETCD servers are supported the fuzzy query of the title of the service and are called.
6. the method according to claim 1 and 5, it is characterised in that further include:
No less than a service, each services one background server of correspondence to every background server correspondence;
ETCD servers search corresponding background server according to the title of service.
7. the method according to claim 1,4 and 6, it is characterised in that further include:
ETCD servers are according to the address of corresponding background server, acquisition approach information;
ETCD servers call the service according to the routing information of the lookup.
8. the system that a kind of server service finds, it is characterised in that include:Background server, ETCD servers, Front End Server, wherein,
Background server is used for ETCD server registrations, and shared service;
ETCD servers are used to receive the registration of background server, record the network topology structure of distributed type assemblies server, record the routing information of background server, record the corresponding relation of background server and service, and according to the instruction calls service of Front End Server;
Front End Server is used to that service to be transferred and obtained to ETCD servers.
9. system according to claim 8, it is characterised in that further include:
ETCD servers and background server adopt tree-like topological structure.
10. system according to claim 8, it is characterised in that further include:
It is shared that background server provides service;
No less than a service, one services the unique background server of correspondence to every background server correspondence.
CN201510732252.8A 2015-11-02 2015-11-02 Server service discovering method and system Pending CN106657423A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510732252.8A CN106657423A (en) 2015-11-02 2015-11-02 Server service discovering method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510732252.8A CN106657423A (en) 2015-11-02 2015-11-02 Server service discovering method and system

Publications (1)

Publication Number Publication Date
CN106657423A true CN106657423A (en) 2017-05-10

Family

ID=58809619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510732252.8A Pending CN106657423A (en) 2015-11-02 2015-11-02 Server service discovering method and system

Country Status (1)

Country Link
CN (1) CN106657423A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924215A (en) * 2018-06-28 2018-11-30 北京顺丰同城科技有限公司 A kind of service discovery processing method and processing device based on tree structure

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731743A (en) * 2005-09-06 2006-02-08 杭州华为三康技术有限公司 Method for managing network device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731743A (en) * 2005-09-06 2006-02-08 杭州华为三康技术有限公司 Method for managing network device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙健波: ""etcd:从应用场景到实现原理的全方位解读"", 《HTTPS://WWW.INFOQ.CN/ARTICLE/ETCD-INTERPRETATION-APPLICATION-SCENARIO-IMPLEMENT-PRINCIPLE》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924215A (en) * 2018-06-28 2018-11-30 北京顺丰同城科技有限公司 A kind of service discovery processing method and processing device based on tree structure
CN108924215B (en) * 2018-06-28 2021-03-19 北京顺丰同城科技有限公司 Service discovery processing method and device based on tree structure

Similar Documents

Publication Publication Date Title
US11928514B2 (en) Systems and methods providing serverless DNS integration
JP2018088293A (en) Database system providing single tenant environment and a plurality of tenant environments
CN110209719B (en) System and method for unified access of multiple databases based on micro-service architecture
US11068461B1 (en) Monitoring key access patterns for nonrelational databases
CN109981757B (en) API gateway load balancing method for small-scale micro-service architecture
US11308043B2 (en) Distributed database replication
EP3376403A1 (en) Method of accessing distributed database and device providing distributed data service
US10872097B2 (en) Data resolution system for management of distributed data
US10834173B2 (en) On-premises and off-premises communication
US20190340041A1 (en) Event domains
TW201724001A (en) System and method for acquiring, processing and updating global information
US20180131605A1 (en) Floating internet protocol for private networks
CN111209364A (en) Mass data access processing method and system based on crowdsourcing map updating
CN105045762A (en) Management method and apparatus for configuration file
CN108989399A (en) A kind of cluster common data querying method, system, device and readable storage medium storing program for executing
CN113301079B (en) Data acquisition method, system, computing device and storage medium
US20160301625A1 (en) Intelligent High-Volume Cloud Application Programming Interface Request Caching
US20200036784A1 (en) Peer-to-peer network for internet of things resource allocation operation
US10097628B2 (en) Resource affinity in a dynamic resource pool
CN113452600A (en) Cross-region message communication method and device, electronic equipment and storage medium
WO2021017907A1 (en) Method and device for optimized inter-microservice communication
US11303606B1 (en) Hashing name resolution requests according to an identified routing policy
CN104796465B (en) Cloud platform method for processing business and system
CN109450798B (en) Method for managing routing table information and computer-readable storage medium
CN106657423A (en) Server service discovering method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510

RJ01 Rejection of invention patent application after publication