CN110377419A - A kind of server calls method, apparatus and electronic equipment - Google Patents
A kind of server calls method, apparatus and electronic equipment Download PDFInfo
- Publication number
- CN110377419A CN110377419A CN201910499985.XA CN201910499985A CN110377419A CN 110377419 A CN110377419 A CN 110377419A CN 201910499985 A CN201910499985 A CN 201910499985A CN 110377419 A CN110377419 A CN 110377419A
- Authority
- CN
- China
- Prior art keywords
- service
- address
- access
- server calls
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
Abstract
The disclosure provides service about a kind of server calls method, apparatus and electronic equipment, to invoking server for client, is related to Internet technical field.In this method, user in the access request that client trigger packet address label containing service is known, search corresponding address of service in the access request according to address of service mark in configuration file and gather by client end response.The address of service in the address of service set found is accessed, invoking server provides service for user.The above method, it does not need through load balancer invoking server, service directly can be provided for user by the configuration file invoking server of client, whole system failure will not be led to because of the Single Point of Faliure of load balancer, improve the stability and safety of system.Furthermore, it is only necessary to which safeguard service device reduces hardware maintenance cost.
Description
Technical field
This disclosure relates to Internet technical field more particularly to a kind of server calls method, apparatus and electronic equipment.
Background technique
Currently, most of Internet services are serviced dependent on grpc, for the High Availabitity and disaster tolerance function for realizing server-side, meeting
Multiple server-side examples are configured for same Internet service.When client needs to service, initiates to request to load balancer, bear
The request that balanced device is initiated according to client is carried, it is client that available server-side is called in multiple server-side examples of configuration
Service is provided.
In the related technology, it in load balancer Single Point of Faliure, will affect entire service system, server-side caused not to be
Client provides service.
Summary of the invention
The disclosure provides a kind of server calls method, apparatus and electronic equipment, at least to solve single-point in the related technology
When failure, entire service system is influenced, the problem of providing service for client is led to not.The technical solution of the disclosure is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of server calls method is provided, comprising:
In response to the access request identified comprising address of service, searched in configuration file according to address of service mark
The address of service identifies corresponding address of service set;
Access the address of service in the address of service set found.
Optionally, the address of service in the address of service set found is accessed, comprising:
Determine each address of service in the address of service set, if be corresponding with active mark;
If at least one address of service is corresponding with active mark, accesses and described actively identify corresponding address of service.
Optionally, the server calls method further include:
If being corresponding with the address of service actively identified accesses failure, access in the set of the address of service except pair
There should be each address of service other than the address of service actively identified, and delete the active mark.
Optionally, each clothes in the address of service set in addition to being corresponding with the address of service actively identified are accessed
Business address, comprising:
For each address of service in addition to being corresponding with the address of service actively identified, the address of service is accessed;
If address of service access failure, access are described each in addition to being corresponding with the address of service actively identified
The address of service of not visited mistake in address of service, until accessing successfully.
Optionally, the server calls method further include:
If each address of service is not corresponding with the active mark, for each clothes in the set of the address of service
It is engaged in address, accessing the address of service;
If address of service access failure, accesses next address of service, until accessing successfully;Next service
Address is the address of service of not visited mistake in the set of the address of service;
If the address of service accesses successfully, active mark is added for the address of service, and ring according to the address of service
Access request described in Ying Yu.
Optionally, the server calls method further include:
If each address of service accesses failure, judge whether each address of service is corresponding with active mark;
If at least one address of service is corresponding with the active mark, the active mark is deleted, and show alarm signal
Breath;
If each address of service is not corresponding with the active mark, the warning message is shown.
Optionally, the address of service in the address of service set found is accessed, comprising:
It sequentially accesses in address of service set described in each address of service or the random access in the address of service set
Each address of service.
According to the second aspect of an embodiment of the present disclosure, a kind of server calls device is provided, comprising:
Response unit is configured as executing the access request in response to identifying comprising address of service, according to the service ground
Location mark searches the address of service in configuration file and identifies corresponding address of service set;
Access unit is configured as executing the address of service in the address of service set that access is found.
Optionally, the access unit is configured as specifically executing:
Determine each address of service in the address of service set, if be corresponding with active mark;
If at least one address of service is corresponding with active mark, accesses and described actively identify corresponding address of service.
Optionally, the access unit is additionally configured to execute:
If being corresponding with the address of service actively identified accesses failure, access in the set of the address of service except pair
There should be each address of service other than the address of service actively identified, and delete the active mark.
Optionally, the access unit is additionally configured to specifically execute:
For each address of service in addition to being corresponding with the address of service actively identified, the address of service is accessed;
If address of service access failure, access are described each in addition to being corresponding with the address of service actively identified
The address of service of not visited mistake in address of service, until accessing successfully.
Optionally, the access unit is additionally configured to execute:
If each address of service is not corresponding with the active mark, for each clothes in the set of the address of service
It is engaged in address, accessing the address of service;
If address of service access failure, accesses next address of service, until accessing successfully;Next service
Address is the address of service of not visited mistake in the set of the address of service;
If the address of service accesses successfully, active mark is added for the address of service, and ring according to the address of service
Access request described in Ying Yu.
Optionally, the access unit is additionally configured to execute:
If each address of service accesses failure, judge whether each address of service is corresponding with active mark;
If at least one address of service is corresponding with the active mark, the active mark is deleted, and show alarm signal
Breath;
If each address of service is not corresponding with the active mark, the warning message is shown.
Optionally, the access unit is additionally configured to specifically execute:
It sequentially accesses in address of service set described in each address of service or the random access in the address of service set
Each address of service.
According to the third aspect of an embodiment of the present disclosure, a kind of electronic equipment is provided, comprising:
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to described instruction is executed, to realize any server call method.
According to a fourth aspect of embodiments of the present disclosure, a kind of computer program product, including at least one processor are provided;
And the memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory
The instruction that a processor executes, described instruction is executed by least one described processor, so that at least one described processor energy
Enough execute any server call method that the embodiment of the present disclosure provides.
According to a fifth aspect of the embodiments of the present disclosure, another embodiment of the disclosure additionally provides a kind of computer storage Jie
Matter, wherein the computer storage medium is stored with computer executable instructions, and the computer executable instructions are based on making
Calculation machine executes any server call method in the embodiment of the present disclosure.
The technical scheme provided by this disclosed embodiment is at least brought following the utility model has the advantages that not needing to pass through load balancer
Invoking server directly can provide service by the configuration file invoking server of client for user, will not be equal because loading
Weighing apparatus failure leads to whole system failure, improves the stability and safety of system.Furthermore, it is only necessary to which safeguard service device is
Can, reduce hardware maintenance cost.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
The other feature and advantage of the disclosure will illustrate in the following description, also, partly become from specification
It obtains it is clear that being understood and implementing the application.The purpose of the application and other advantages can be by written explanations
Specifically noted structure is achieved and obtained in book, claims and attached drawing.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention
Attached drawing is briefly described, it should be apparent that, attached drawing described below is only some embodiments of the present invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure, do not constitute the improper restriction to the disclosure.
Fig. 1 is a kind of application scenarios schematic diagram of server calls method shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of server calls method shown according to an exemplary embodiment;
Fig. 3 is a kind of another flow chart of server calls method shown according to an exemplary embodiment;
Fig. 4 is a kind of operation interface schematic diagram of server calls method shown according to an exemplary embodiment;
Fig. 5 is a kind of block diagram of server calls device shown according to an exemplary embodiment;
Fig. 6 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Specific embodiment
In order to make ordinary people in the field more fully understand the technical solution of the disclosure, below in conjunction with attached drawing, to this public affairs
The technical solution opened in embodiment is clearly and completely described.
It should be noted that the specification and claims of the disclosure and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to embodiment of the disclosure described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.Embodiment described in following exemplary embodiment does not represent and disclosure phase
Consistent all embodiments.On the contrary, they are only and as detailed in the attached claim, the disclosure some aspects
The example of consistent device and method.
In the related technology, Internet service depends on grpc to service mostly.Grpc is a RPC system.?
In grpc service, client can call directly server-side application on another different machine as calling native object,
It allows users to more easily create Distributed Application and service.With many RPC (Remoto Procedure Call, remotely
The invocation of procedure) system is similar, and grpc, which is also based on, defines a service, specifies the service that can be by the theory of far call
Client provides service.
In the related technology, it when client call service end provides service for user, needs to send to load balancer and adjust
With request, related service end is called to provide service for user according to the call request by load balancer.Inventor was studying
It is found in journey, if load balancer breaks down, will affect entire service system, cause server-side that can not provide clothes for client
Business.Also, not only need safeguard service end, it is also necessary to safeguard load balancer, increase hardware maintenance cost.
Based on the demand, the disclosure provides a kind of server calls method.In this method, one is configured for client and is matched
File is set, an address of service mark is distributed to each service in configuration file, configures at least one address of service for it.Its
In, the corresponding server in each address of service.User is in the access request that client trigger packet address label containing service is known, visitor
Corresponding address of service is searched in configuration file according to address of service mark and is gathered in response to the access request in family end.It visits
Ask the address of service in the address of service set found, invoking server provides service for user.
The above method is not needed through load balancer invoking server, can directly pass through the configuration file of client
Invoking server provides service for user, will not lead to whole system failure because of load balancer failure, improve the steady of system
Qualitative and safety.Furthermore, it is only necessary to which safeguard service device reduces hardware maintenance cost.
It refering to fig. 1, is a kind of application scenarios schematic diagram of server calls method shown according to an exemplary embodiment.
The scene includes:
User 10, client 20, server 30, server 31, server 32.Wherein, server 30,31 kimonos of server
Business device 32 is provided which that consolidated network content search services A, has different addresss of service.
User 10 triggers the access request of access A network address in client 20, and client 20 is according to the service of the access request
Address identifies A, and mark A corresponding address of service set in address of service is searched in configuration file.With accessing the service found
Address of service in the set of location, invoking server 30 or server 31 or server 32 provide in corresponding network for user
Hold search service.
Server 30, server 31 and server 32 can be the service an of server or several servers composition respectively
Device cluster or cloud computing center.Client 20 is the electronic equipment for having network communications capability, which can be intelligence
Mobile phone, tablet computer or portable personal computer etc., by wired or wireless network and server 30 or server 31 or
Server 32 connects.
In order to be apparent from the technical solution of embodiment of the present disclosure offer, below to matching in the embodiment of the present disclosure
File is set to be described further:
Staff can configure a configuration file for client, in the configuration file, for same service content point
It is identified with an address of service, and configures an address of service set for the service content, included at least in the set of address of service
One address of service.The corresponding server in each address of service.Optionally, a time threshold can also be configured for each address of service
Value, if accessing the access time of each address of service beyond the time threshold, then it represents that access failure.When it is implemented, each service
The time threshold of address may be the same or different.For example, the time threshold of each address of service can be disposed as 5s, or
Person can be respectively set to 5s, 10s etc. different time.
For example, staff is Web content search service A, an address of service mark A is distributed, is searched for the Web content
Rope server A configures an address of service set, includes A1 in the set of the address of service, and the corresponding time threshold of A1 is 5s, A2
And corresponding time threshold 5s, A3 and corresponding time threshold 5s.User is when triggering Web content search service A, then
Each address of service in accessible address of service set, calls the corresponding server in address of service.
When it is implemented, each address of service can be stored with array form.For example, an address of service mark is one corresponding
Array is stored with each address of service and corresponding time threshold in array.
Referring to Fig.2, may include for a kind of flow chart of server calls method shown according to an exemplary embodiment
Following steps:
Step 201: in response to the access request identified comprising address of service, according to address of service mark in configuration text
The address of service is searched in part identifies corresponding address of service set.
Step 202: accessing the address of service in the address of service set found.
Optionally, it when accessing the address of service in the set of address of service, can sequentially access in the set of address of service
Each address of service, until accessing successfully.Alternatively, each address of service in being gathered with random access address of service, until visiting
Ask success.
For example, including address of service 1, address of service 2, address of service 3 and service ground in the address of service set found
Location 4, four addresss of service.Optionally, when accessing each address of service, address of service 1 is first accessed, if the access of address of service 1 is lost
It loses, then accesses address of service 2, if address of service 2 also accesses failure, access address of service 3, until accessing successfully.
Alternatively, an address of service access can be randomly selected, for example, can first access when accessing each address of service
Address of service 3, if the access failure of address of service 3, in address of service 1, address of service 2 randomly selects one in address of service 4 again
Address of service access, until accessing successfully.
The above method is not needed through load balancer invoking server, can directly pass through the configuration file of client
Invoking server provides service for user, will not lead to whole system failure because of load balancer failure, improve the steady of system
Qualitative and safety.Furthermore, it is only necessary to which safeguard service device reduces hardware maintenance cost.
In order to reduce access time, access speed is improved, can add and correspond to for the address of service in the set of address of service
Active mark.Active mark refers at the upper address of service once accessed in the set of the address of service, accesses successfully.
Active mark and address of service collection are corresponding with below at least one address of service in the set of address of service
Two schemes that address of service in conjunction is not corresponding with active mark are illustrated respectively.
Scheme one: at least one address of service in the set of address of service is corresponding with active mark.
In one embodiment, above-mentioned steps 202 in the specific implementation, can be preferential to access in address of service is gathered
It is corresponding with the address of service of active mark.Specifically, determining each address of service in the address of service set, if be corresponding with
Active mark;If at least one address of service is corresponding with active mark, accesses and described actively identify corresponding address of service.
Specifically, access is corresponding with if there is only an addresss of service to be corresponding with active mark in the set of address of service
The address of service actively identified.For example, the address of service set found includes address of service A, address of service B and address of service
C.Wherein, address of service C is corresponding with active mark.Then, preferential to access when accessing each address of service in the set of address of service
Address of service C.
If in the set of address of service, there are multiple addresss of service to be corresponding with active mark, can sequentially access and be corresponding with actively
Each address of service of mark, until accessing successfully.Alternatively, each address of service of active mark can be corresponding with random access,
Until accessing successfully.
For example, in the address of service set found, including address of service A, address of service B and address of service C, three clothes
Business address.Wherein, address of service B and address of service C are corresponding with active mark.When accessing each address of service, preferential access pair
Should there are the address of service B or address of service C of active mark.Optionally, the service for being corresponding with active mark can sequentially be accessed
Address, for example, priority access service address B.Alternatively, the address of service of active mark can be corresponding with random access, for example,
An address of service is randomly selected in address of service B and address of service C to access.
The above method is corresponding with the address of service of active mark by preferentially accessing, and can effectively reduce access service
The number of address improves access efficiency.
In one embodiment, if being corresponding with the address of service actively identified accesses failure, the clothes are accessed
Each address of service being engaged in address set in addition to being corresponding with the address of service actively identified, and delete the active mark
Know.Specifically, accessing the address of service for each address of service in addition to being corresponding with the address of service actively identified;
If address of service access failure, access each address of service in addition to being corresponding with the address of service actively identified
In not visited mistake address of service, until access successfully.
Access each address of service in the address of service set in addition to being corresponding with the address of service actively identified
When, if there are multiple addresss of service to be visited, corresponding each address of service can be sequentially accessed, until accessing successfully.Alternatively, also
It can be with the corresponding each address of service of random access, until accessing successfully.
In one embodiment, if each address of service in the set of address of service accesses failure, it is determined that server needs
It safeguards.Specifically, judging whether each address of service is corresponding with active mark if each address of service accesses failure
Know;If at least one address of service is corresponding with the active mark, the active mark, and display alarm information are deleted;If
Each address of service is not corresponding with the active mark, then shows the warning message.
Specifically, access unsuccessfully can be access time-out, the i.e. access time of access party address of service beyond preset
Time threshold.Wherein, time threshold can not do any restriction by staff's self-setting, the embodiment of the present application, for example, can
To be set as 5s, 15s etc..When it is implemented, starting to count when client accesses the address of service in the set of address of service
When, if timing time is greater than time threshold, then it represents that access time is greater than time threshold, it is determined that access time-out, i.e. access are lost
It loses.Alternatively, access is unsuccessfully also possible to that corresponding server etc. can not be connected.
Optionally, corresponding active mark can also be added to access successful address of service, in access service next time
When address of service in address set, the successful address of service of the access can be preferentially accessed.
For example, it is assumed that including address of service 1 and its corresponding time threshold 5s, service in the address of service set found
Address 2 and its corresponding time threshold 5s and address of service 3 and its corresponding time threshold 5s.Wherein, address of service 1 is corresponding with
Active mark.When accessing the address of service in the set of address of service, priority access service address 1, and start timing, if access
Time, which is greater than 5s, then indicates the access failure of address of service 1, when address of service 1 accesses failure, access address of service 2 and service ground
Location 3, and delete the corresponding service identifiers in address of service 1.
Optionally, it when accessing address of service 2 and address of service 3, can sequentially access, or can be with random access.
For example, when address of service 1 accesses failure, random access address of service 2, if the access failure of address of service 2, continues access clothes
Business address 3.If address of service 3 accesses successfully, a corresponding active mark is added for address of service 3.
The above method accesses its in the set of address of service in the address of service access failure for being corresponding with active mark
Remaining address of service provides service for user, can be improved the stability of service.Further, since with deleting the service of access failure
The corresponding service identifiers in location will not be accessed preferentially when can also ensure that the address of service in access address of service set next time
The access times of address of service are reduced in the address of service, improve access efficiency.
Scheme two: the address of service in the set of address of service is not corresponding with active mark.
For each address of service in the set of address of service, executes step A1- step A4, Fig. 3 as shown in Figure 3 and show for one
Example property implements a kind of flow chart of the server calls method exemplified.
Step A1: for each address of service in the set of address of service, the address of service is accessed;
Step A2: judging whether the address of service accesses success, successfully thens follow the steps A4 if accessing, if access failure
Accessing step A3.
Step A3: next address of service is accessed, A2 is returned to step.
Specifically, next address of service is the address of service of not visited mistake in the set of the address of service.
For example, including address of service 1, address of service 2 and address of service 3 in an address of service set.Address of service 1
Access failure, then access next address of service.Next address of service can be appointing in address of service 2 and address of service 3
One.
Step A4: active mark is added for the address of service, and according to the address of service in response to the access request.
For example, including address of service a, address of service b and address of service c, three service ground in an address of service set
Location is uniformly corresponding with active mark.Client sequentially accesses each address of service, i.e. access address of service a, if address of service a is accessed
Failure, then access address of service b, if address of service b is accessed successfully, adds corresponding active mark for address of service b.
Alternatively, client can be with each address of service of random access, i.e. random access address of service c, if address of service c is visited
It asks unsuccessfully, then random access address of service a, if address of service a is accessed successfully, adds corresponding active mark for address of service a
Know.
The above method can call corresponding server by each address of service in the set of access address of service to use
Family provides service, and same service corresponds to multiple addresss of service, improves the stability of service.In addition, invoking server by
Client is realized, load balancer is not needed, and can guarantee the stability of system, saves hardware maintenance cost.
In one embodiment, if each address of service in the set of address of service accesses failure, it is determined that server needs
It safeguards.Specifically, judging whether each address of service is corresponding with active mark if each address of service accesses failure
Know;If at least one address of service is corresponding with the active mark, the active mark, and display alarm information are deleted;If
Each address of service is not corresponding with the active mark, then shows the warning message.
It is a kind of operation interface schematic diagram of server calls method of an exemplary embodiment refering to Fig. 4.It is finding
Address of service set in each address of service access unsuccessfully when, then need to show corresponding warning message.For example, such as Fig. 4
Shown in server it is available, or access is unsuccessfully equal prompts, in order to which staff safeguards server.Also, it is taking
Being engaged in address set, there is when the address of service for being corresponding with active mark, delete active mark.
The above method, when multiple addresss of service of same service access failure, then it represents that corresponding each server hair
Raw failure, shows corresponding warning message at this time, staff can be made to find failure, and safeguard to server.
In order to which technical solution provided by the present disclosure is well understood, it is described further below with reference to Fig. 1.
User 10 triggers the access request of access A network address in client 20.Client 20 identifies A according to address of service and is matching
It sets and searches corresponding address of service set in file.It include the address of service a of server 30 in the set of address of service, and corresponding
Time threshold 3s;The address of service b of server 31 and its corresponding time threshold 3s, the address of service c of server 32 and its
Corresponding time threshold 3s.Wherein, address of service a is corresponding with active mark.
20 priority access service address a of client, and start timing, when timing time (access time) is greater than 3s, determine
Access failure, then delete the corresponding active mark of address of service a.And address of service c is accessed, address of service c can not be connected, then visited
Ask address of service b.Address of service b is accessed successfully, then invoking server 31 provides Web search service for user, and is service ground
Location b adds corresponding active mark.
Based on identical inventive concept, the disclosure also provides a kind of server calls device.It is one exemplary refering to Fig. 5
Implement a kind of server calls device block diagram exemplified.The device includes:
Response unit 501 and access unit 502;
Response unit 501 is configured as executing the access request in response to identifying comprising address of service, according to the service
Address mark searches the address of service in configuration file and identifies corresponding address of service set;
Access unit 502 is configured as executing the address of service in the address of service set that access is found.
Optionally, access unit 502 are configured as specifically executing:
Determine each address of service in the address of service set, if be corresponding with active mark;
If at least one address of service is corresponding with active mark, accesses and described actively identify corresponding address of service.
Optionally, access unit 502 are additionally configured to execute:
If being corresponding with the address of service actively identified accesses failure, access in the set of the address of service except pair
There should be each address of service other than the address of service actively identified, and delete the active mark.
Optionally, access unit 502 are additionally configured to specifically execute:
For each address of service in addition to being corresponding with the address of service actively identified, the address of service is accessed;
If address of service access failure, access are described each in addition to being corresponding with the address of service actively identified
The address of service of not visited mistake in address of service, until accessing successfully.
Optionally, access unit 502 are additionally configured to execute:
If each address of service is not corresponding with the active mark, for each clothes in the set of the address of service
It is engaged in address, accessing the address of service;
If address of service access failure, accesses next address of service, until accessing successfully;Next service
Address is the address of service of not visited mistake in the set of the address of service;
If the address of service accesses successfully, active mark is added for the address of service, and ring according to the address of service
Access request described in Ying Yu.
Optionally, access unit 502 are additionally configured to execute:
If each address of service accesses failure, judge whether each address of service is corresponding with active mark;
If at least one address of service is corresponding with the active mark, the active mark is deleted, and show alarm signal
Breath;
If each address of service is not corresponding with the active mark, the warning message is shown.
Optionally, access unit 502 are additionally configured to specifically execute:
It sequentially accesses in address of service set described in each address of service or the random access in the address of service set
Each address of service.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 6 is the block diagram of a kind of electronic equipment device 600 shown according to an exemplary embodiment.
In the exemplary embodiment, a kind of storage medium including instruction, the memory for example including instruction are additionally provided
601, above-metioned instruction can be executed by the processor 602 of device 600 to complete the above method.Processor 602 can be a center
Processing unit (central processing unit, CPU), or be digital processing element etc..In the embodiment of the present disclosure not
Limit the specific connection medium between above-mentioned memory 601 and processor 602.The embodiment of the present disclosure is in Fig. 6 with memory 601
It is connected between processor 602 by bus 603, bus 603 is indicated in Fig. 6 with thick line, the connection side between other components
Formula is only to be schematically illustrated, does not regard it as and be limited.The bus 603 can be divided into address bus, data/address bus, control
Bus etc..Only to be indicated with a thick line in Fig. 6 convenient for indicating, it is not intended that an only bus or a type of total
Line.
Optionally, storage medium can be non-transitorycomputer readable storage medium, for example, the non-transitory calculates
Machine readable storage medium storing program for executing can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices
Deng.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.The disclosure is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (10)
1. a kind of server calls method, which is characterized in that the described method includes:
In response to the access request identified comprising address of service, according to the lookup in configuration file of address of service mark
Address of service identifies corresponding address of service set;
Access the address of service in the address of service set found.
2. server calls method according to claim 1, which is characterized in that access the address of service collection found
Address of service in conjunction, comprising:
Determine each address of service in the address of service set, if be corresponding with active mark;
If at least one address of service is corresponding with active mark, accesses and described actively identify corresponding address of service.
3. server calls method according to claim 2, which is characterized in that the server calls method further include:
If being corresponding with the address of service actively identified accesses failure, access in the set of the address of service except being corresponding with
Each address of service other than the address of service actively identified, and delete the active mark.
4. server calls method according to claim 3, which is characterized in that access in the set of the address of service except pair
There should be each address of service other than the address of service actively identified, comprising:
For each address of service in addition to being corresponding with the address of service actively identified, the address of service is accessed;
If address of service access failure, access each service in addition to being corresponding with the address of service actively identified
The address of service of not visited mistake in address, until accessing successfully.
5. server calls method according to claim 2, which is characterized in that the server calls method further include:
If each address of service is not corresponding with the active mark, for each service ground in the set of the address of service
Location accesses the address of service;
If address of service access failure, accesses next address of service, until accessing successfully;Next address of service
For the address of service of not visited mistake in the set of the address of service;
If the address of service accesses successfully, add active mark for the address of service, and according to the address of service in response to
The access request.
6. according to any server calls method of claim 2-5, which is characterized in that the server calls method is also
Include:
If each address of service accesses failure, judge whether each address of service is corresponding with active mark;
If at least one address of service is corresponding with the active mark, the active mark, and display alarm information are deleted;
If each address of service is not corresponding with the active mark, the warning message is shown.
7. server calls method according to claim 1, which is characterized in that access the address of service collection found
Address of service in conjunction, comprising:
It sequentially accesses each in address of service set described in each address of service or the random access in the address of service set
Address of service.
8. a kind of server calls device, which is characterized in that described device includes:
Response unit is configured as executing the access request in response to identifying comprising address of service, is marked according to the address of service
Knowledge searches the address of service in configuration file and identifies corresponding address of service set;
Access unit is configured as executing the address of service in the address of service set that access is found.
9. a kind of electronic equipment characterized by comprising
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to executing described instruction, to realize the clothes as described in any one of claims 1 to 7
Business device call method.
10. a kind of storage medium, which is characterized in that when the instruction in the storage medium is executed by the processor of electronic equipment
When, so that electronic equipment is able to carry out the server calls method as described in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910499985.XA CN110377419A (en) | 2019-06-11 | 2019-06-11 | A kind of server calls method, apparatus and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910499985.XA CN110377419A (en) | 2019-06-11 | 2019-06-11 | A kind of server calls method, apparatus and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110377419A true CN110377419A (en) | 2019-10-25 |
Family
ID=68249988
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910499985.XA Pending CN110377419A (en) | 2019-06-11 | 2019-06-11 | A kind of server calls method, apparatus and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110377419A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110944051A (en) * | 2019-11-29 | 2020-03-31 | 北京达佳互联信息技术有限公司 | Load balancing implementation method and device, computer equipment and storage medium |
CN111984309A (en) * | 2020-08-31 | 2020-11-24 | 北京达佳互联信息技术有限公司 | Service calling method, device, server and storage medium |
CN113114588A (en) * | 2021-04-14 | 2021-07-13 | 百度在线网络技术(北京)有限公司 | Data processing method and device, electronic equipment and storage medium |
CN113259431A (en) * | 2021-05-11 | 2021-08-13 | 中国工商银行股份有限公司 | Service calling method, service calling device, electronic device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106941508A (en) * | 2016-01-05 | 2017-07-11 | 阿里巴巴集团控股有限公司 | Service calling method, device and system |
CN107172096A (en) * | 2017-07-06 | 2017-09-15 | 苏州蜗牛数字科技股份有限公司 | It is a kind of to prevent DNS from cutting the method held |
EP3221795A1 (en) * | 2014-11-18 | 2017-09-27 | Alibaba Group Holding Limited | Service addressing in distributed environment |
CN108289060A (en) * | 2017-01-09 | 2018-07-17 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device based on RPC service |
US20190114442A1 (en) * | 2017-10-17 | 2019-04-18 | Aagey Holding, LLC | Application programming interface bridge for transporting a local request from a local client system to a target server system, and method thereof |
-
2019
- 2019-06-11 CN CN201910499985.XA patent/CN110377419A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3221795A1 (en) * | 2014-11-18 | 2017-09-27 | Alibaba Group Holding Limited | Service addressing in distributed environment |
CN106941508A (en) * | 2016-01-05 | 2017-07-11 | 阿里巴巴集团控股有限公司 | Service calling method, device and system |
CN108289060A (en) * | 2017-01-09 | 2018-07-17 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device based on RPC service |
CN107172096A (en) * | 2017-07-06 | 2017-09-15 | 苏州蜗牛数字科技股份有限公司 | It is a kind of to prevent DNS from cutting the method held |
US20190114442A1 (en) * | 2017-10-17 | 2019-04-18 | Aagey Holding, LLC | Application programming interface bridge for transporting a local request from a local client system to a target server system, and method thereof |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110944051A (en) * | 2019-11-29 | 2020-03-31 | 北京达佳互联信息技术有限公司 | Load balancing implementation method and device, computer equipment and storage medium |
CN111984309A (en) * | 2020-08-31 | 2020-11-24 | 北京达佳互联信息技术有限公司 | Service calling method, device, server and storage medium |
CN113114588A (en) * | 2021-04-14 | 2021-07-13 | 百度在线网络技术(北京)有限公司 | Data processing method and device, electronic equipment and storage medium |
CN113114588B (en) * | 2021-04-14 | 2023-02-17 | 百度在线网络技术(北京)有限公司 | Data processing method and device, electronic equipment and storage medium |
CN113259431A (en) * | 2021-05-11 | 2021-08-13 | 中国工商银行股份有限公司 | Service calling method, service calling device, electronic device and storage medium |
CN113259431B (en) * | 2021-05-11 | 2022-11-11 | 中国工商银行股份有限公司 | Service calling method, service calling device, electronic device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110377419A (en) | A kind of server calls method, apparatus and electronic equipment | |
EP3531290B1 (en) | Data backup method, apparatus, electronic device, storage medium, and system | |
CN107135128B (en) | Call chain data acquisition method, mobile terminal and computer-readable storage medium | |
CN110677492B (en) | Access request processing method and device, electronic equipment and storage medium | |
CN106034138A (en) | Remote service calling method and remote service calling device | |
CN113010818A (en) | Access current limiting method and device, electronic equipment and storage medium | |
CN111901157B (en) | Service deployment method, device, equipment and medium based on k8s | |
US11502925B2 (en) | Information processing terminal and control method | |
CN107181779A (en) | Processing method, the device and system of access request | |
CN108989369A (en) | The method and its system of progress current limliting are requested user | |
CN106664515A (en) | Method for transmitting content between terminals through service control device link | |
CN109254914A (en) | Software development kit test method, system, computer installation and readable storage medium storing program for executing | |
CN109302437A (en) | A kind of method and apparatus redirecting website | |
CN113132293B (en) | Attack detection method and device and public honeypot system | |
CN110677475A (en) | Micro-service processing method, device, equipment and storage medium | |
CN103701867A (en) | Method, system and central server for processing call requests | |
CN103516851A (en) | Cloud testing platform system for wireless products | |
CN105763545B (en) | A kind of BYOD method and device | |
CN108781189B (en) | Load balancing method and related equipment | |
CN104144170A (en) | URL filtering method, device and system | |
US20180314563A1 (en) | Information processing apparatus and information processing system | |
US20130260804A1 (en) | Apparatus and method for wireless network connection | |
CN109218371B (en) | Method and equipment for calling data | |
CN112799849B (en) | Data processing method, device, equipment and storage medium | |
CN110177018A (en) | For controlling the method and device of network state |
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: 20191025 |
|
RJ01 | Rejection of invention patent application after publication |