CN108134828A - Method for routing, device, computer equipment and the storage medium of service request - Google Patents
Method for routing, device, computer equipment and the storage medium of service request Download PDFInfo
- Publication number
- CN108134828A CN108134828A CN201711382049.8A CN201711382049A CN108134828A CN 108134828 A CN108134828 A CN 108134828A CN 201711382049 A CN201711382049 A CN 201711382049A CN 108134828 A CN108134828 A CN 108134828A
- Authority
- CN
- China
- Prior art keywords
- service
- identifiers
- request
- instance
- identity
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/70—Routing based on monitoring results
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
- H04L65/1073—Registration or de-registration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1012—Server selection for load balancing based on compliance of requirements or conditions with available server resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Multimedia (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention provides a kind of method for routing of service request, device, computer equipment and storage medium, the method includes:Receive service request;Identity and service type are obtained according to the service request;Inquiring service node mark and service identifiers in route record table;The service node mark and service identifiers are corresponding to the identity and the service type;By the service request be sent to the service node identify it is being run in corresponding service node and corresponding to the Service Instance of the service identifiers inquired.The service request for corresponding to common identity mark and service type that will repeatedly be received according to route record table, it routes to same services example and carries out response processing, it is achieved thereby that the effect of viscosity routing, and it can realize and service request is directly routed into specific Service Instance, refine the route target granularity corresponding to service request.
Description
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method for routing of service request, device, computer
Equipment and storage medium.
Background technology
With the continuous development of Internet technology, interactive data volume rapid growth, the clothes that internet provides on internet
Business is also more and more, in order to mitigate the data processing pressure of individual server, forms the pattern of distributed server.In other words
It says, distributed server is distributed to by the service for providing data and program to mitigate the data processing pressure of individual server
Power.Individual server in the distributed server is known as a service node, can be distributed multiple types on a service node
The service of type, can also run the Service Instance of multiple same types, and a type of service can also be distributed in multiple service sections
Point on.When client initiates service request to distributed server for the first time, which is routed into multiple service and is saved
Single service node in point.It, still please by the service when client initiates the service request to distributed server again
Seek the service node of secondary response and the processing service request before routing to.Same service is routed to for same service request
The effect that node is handled is known as viscosity routing.
At present, the mode for realizing viscosity routing is that load equalizer is set between server and external network, by the load
Balanced device realizes that the state being route between client and service node is kept.Such as using nginx as load equalizer, pass through and be configured
Sticky realizes that load equalizer distributes the service request of client to the service node of corresponding configuration, it is achieved thereby that " viscous
Property " routing effect.
However, distributed server is not all based on http agreements, also differ the storage object established a capital and kept with state.
Moreover, the service request in response to client may call multiple service nodes, it is related to multiple kinds, and it is existing
Load equalizer fails to realize the route assignment of various protocols.In addition, load equalizer can only be by the service request road of client
By to some service node, the specific Service Instance of some in the service node can not be routed to, so as to cause corresponding to clothes
The route target granularity asked of being engaged in is inadequate.
Invention content
Based on this, it is necessary at present corresponding to service request route target granularity it is inadequate the technical issues of, propose
A kind of method for routing of service request, device, computer equipment and storage medium.
A kind of method for routing of service request, the method includes:
Receive service request;
Identity and service type are obtained according to the service request;
Inquiring service node mark and service identifiers in route record table;Service node mark and service identifiers and
The identity and the service type are corresponding;
By the service request be sent to the service node identify it is being run in corresponding service node and corresponding to looking into
The Service Instance of the service identifiers ask.
The method further includes in one of the embodiments,:
When the service request for receiving the Service Instance feedback, it is described according to service request acquisition to return to execution
The step of identity and service type;The service request of the feedback is real according to the service is sent to by the Service Instance
The service request feedback of example.
The method further includes in one of the embodiments,:
When not inquiring the service node mark and the service identifiers in the route record table, noted from service
Inquiry is corresponding to the service identifiers of the service type in volume table;
Service identifiers are selected in the service identifiers inquired;
The service request is sent to the corresponding Service Instance of the service identifiers of selection;
In route record table identity described in corresponding record, the service type, selection the service identifiers with
And corresponding service node mark.
It is described in one of the embodiments, to select service identifiers in the service identifiers inquired, including:
Service identifiers are randomly choosed in the service identifiers inquired;Or,
In a manner of traversing poll service identifiers are selected from the service identifiers inquired;Or,
According to the corresponding load selection service identifiers of the service identifiers institute inquired;Or,
To the cryptographic Hash of the identity according to the total quantity remainder of the service identifiers, according to calculate gained remainder from
Service identifiers are selected in the service identifiers.
The method further includes in one of the embodiments,:
Receive the service registration request that Service Instance is sent;
Corresponding service type, service node mark and service identifiers are obtained according to the service registration request;
By the service type of acquisition, service node mark and the service identifiers corresponding record in service registration
In table.
The method further includes in one of the embodiments,:
The corresponding Service Instance of service identifiers into the web services registry sends heartbeat data packets;
When the response bag for not receiving the heartbeat data packets in the first preset duration, then
From the web services registry, delete the corresponding service identifiers of the Service Instance and with the service
The corresponding service type of mark and service node mark.
The method further includes in one of the embodiments,:
When not receiving the service request corresponding to the identity and the service type in the second preset duration
When, then
From the route record table, service node mark corresponding with the identity and the service type is deleted
And service identifiers.
A kind of route device of service request, described device include:
Service request reception module, for receiving service request;
Acquisition module, for obtaining identity and service type according to the service request;
Enquiry module, for inquiring service node mark and service identifiers in route record table;The service node mark
Know and service identifiers are corresponding to the identity and service type;
Service request sending module saves for the service request to be sent to the corresponding service of the service node mark
It is being run in point and corresponding to the Service Instance of the service identifiers that inquires.
A kind of computer equipment, including memory and processor, the memory is stored with computer program, the calculating
When machine program is performed by the processor so that the processor performs following steps:
Receive service request;
Identity and service type are obtained according to the service request;
Inquiring service node mark and service identifiers in route record table;Service node mark and service identifiers and
The identity and service type are corresponding;
By the service request be sent to the service node identify it is being run in corresponding service node and corresponding to looking into
The Service Instance of the service identifiers ask.
A kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor,
So that the processor performs following steps:
Receive service request;
Identity and service type are obtained according to the service request;
Inquiring service node mark and service identifiers in route record table;Service node mark and service identifiers and
The identity and service type are corresponding;
By the service request be sent to the service node identify it is being run in corresponding service node and corresponding to looking into
The Service Instance of the service identifiers ask.
Method for routing, device, computer equipment and the storage medium of above-mentioned service request, according to the service request of reception institute
Corresponding identity and service type, the service in response to the service request that query history records from route record table are real
The corresponding service identifiers of example, and the service request of reception is sent to the corresponding Service Instance of service identifiers of the inquiry so that
The service request repeatedly received can be routed to same Service Instance and carry out response processing, it is achieved thereby that viscosity routing
Effect, and can realize and service request is directly routed into specific Service Instance, refine the road corresponding to service request
By targeted particle size.
Description of the drawings
Fig. 1 is the applied environment figure of the method for routing of service request in one embodiment;
Fig. 2 is the internal structure chart of server in one embodiment;
Fig. 3 is the flow diagram of the method for routing of service request in one embodiment;
Fig. 4 is the flow diagram of the method for routing of service request in another embodiment;
Fig. 5 is the flow diagram of the method for routing of service request in another embodiment;
Fig. 6 is the structure diagram of the route device of service request in one embodiment;
Fig. 7 is the structure diagram of the route device of service request in another embodiment.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
As shown in Figure 1, in one embodiment, provide a kind of applied environment figure of the method for routing of service request.Ginseng
According to Fig. 1, the method for routing of the service request is applied to the route system of service request, which includes terminal 110 and server
120, terminal 110 is connect by network with server 120.Terminal 110 can be specifically mobile terminal or terminal console, and movement is eventually
End can be specifically at least one of mobile phone, tablet computer and laptop etc., and terminal console can be specifically desk-top meter
Calculation machine.Terminal 110 can be used for generating service request, and the service request generated is sent to server 120, server 120
A kind of method for routing of service request is can perform, to handle the service request.Server 120 may include routing server
121 and distributed server 122, distributed server 122 include the service node of one or more than one.Routing server
121 can be used for service request routeing between service node.One or more Service Instances can be run on each service node,
The Service Instance of same type may operate on multiple service nodes.Service Instance is running service routine.In an implementation
In example, the function of routing server can be integrated in service node, can specifically be integrated in a service node or each service
In node.
Fig. 2 is the internal structure schematic diagram of server in one embodiment.The server includes connecting by system bus
Processor, memory and network interface.Wherein, memory includes non-volatile memory medium and built-in storage.The server
Memory in can be stored with operating system, be also stored with computer program, when which is executed by processor, can make
It obtains processor and realizes a kind of method for routing of service request.The built-in storage of server is the calculating in non-volatile memory medium
The operation of machine program provides environment, which can be stored with computer program, when which is executed by processor, make
It obtains processor and realizes a kind of method for routing of service request.The processor supports entire clothes for providing calculating and control ability
The operation of business device.The network interface of the server receives eventually for communicating according to this with external terminal through internet
Hold the service request sent.
It will be understood by those skilled in the art that structure shown in Figure 2, only part knot relevant with application scheme
The block diagram of structure, does not form the restriction for the server being applied thereon to application scheme, and specific server can include
Certain components are either combined than components more or fewer shown in figure or are arranged with different components.
As shown in figure 3, in one embodiment, a kind of method for routing of service request is provided, the present embodiment is with the party
Method is illustrated applied to the routing server in above-mentioned Fig. 1.This method specifically comprises the following steps:
S302 receives service request.
Wherein, service request is the mark for asking service.Service request can specifically include identity, service class
Type and data parameters.Identity can be used for the user of mark initiation service request, it can also be used to which transmission generates and sends service
The terminal of request.Identity can be specifically the character string of at least one of number, letter and symbol etc. character composition.Clothes
Service type is used to identify the type belonging to Service Instance.Data parameters are that Service Instance receives the processing performed after service request
Object.Data parameters can be specifically account, password or operational order.
Specifically, routing server receives service request, and the service request is sent to corresponding to the service request
Service Instance, so that service instance response is in the service request.Wherein, the service type belonging to the Service Instance please with service
Ask corresponding service type consistent.
In one embodiment, routing server receives the service request that terminal is sent, and the service request is sent to
Respond the Service Instance of the service request.The service request sent by Service Instance of reception can be also sent to by routing server
In response to the Service Instance of the service request.
S304 obtains identity and service type according to service request.
Specifically, after routing server receives service request, corresponding identity is obtained according to the service request received
Mark and service type, so as to determine the service reality in response to the service request according to acquired identity and service type
Example.
In one embodiment, it after routing server receives service request, is parsed from the service request corresponding
Identity and service type can also be obtained from the terminal or Service Instance for sending the service request according to service request and be corresponded to
Identity and service type in the service request.
S306, inquiring service node mark and service identifiers in route record table;Service node identifies and service identifiers
It is corresponding to identity and service type.
Wherein, route record table is used to record the routed path of service request.Every route record in route record table
Identity, service type, service node mark and service identifiers can specifically be included.Service node mark is for unique mark
Form the service node of distributed server.Service node forms the server of distributed server for expression.Service identifiers
The Service Instance of service node is distributed in for unique mark.Service node identifies and service identifiers can be specifically to include number
The character string of at least one of word, letter and symbol character.Service node identify and service identifiers specifically can respectively with it is right
There are mapping relations one by one in the service node answered or the chained address of Service Instance.
Specifically, routing server gets corresponding identity and service type according to the service request received,
And inquiry and the service node of acquired identity and service type corresponding record mark and service in route record table
Mark.
S308, by service request be sent to service node identify it is being run in corresponding service node and corresponding to inquiry
The Service Instance of the service identifiers arrived.
Wherein, Service Instance is running service routine.Service routine is to provide the computer program of service function.Tool
Body, routing server inquires in route record table identifies kimonos corresponding to the service node of identity and service type
After business mark, the service node identified corresponding to the service node is determined, and in institute according to the service node mark inquired
The Service Instance corresponding to inquired service identifiers is determined in the Service Instance run on determining service node, is determined
After the service node mark and the Service Instance of service identifiers inquired, the Service Instance received is sent to institute
Determining Service Instance.
The method for routing of above-mentioned service request, identity and service type according to corresponding to the service request of reception,
The corresponding service identifiers of the Service Instance in response to the service request that query history records from route record table, and will receive
Service request be sent to the corresponding Service Instance of service identifiers of the inquiry so that the service request repeatedly received can be by road
By carrying out response processing to same Service Instance, it is achieved thereby that the effect of viscosity routing, and can realize clothes directly
Business request routes to specific Service Instance, has refined the route target granularity corresponding to service request.
In one embodiment, the method for routing of above-mentioned service request further includes:When the clothes for receiving Service Instance feedback
During business request, return and perform the step of identity and service type are obtained according to service request;The service request of feedback is by taking
Pragmatic example is fed back according to the service request for being sent to Service Instance.
Specifically, the service request received is sent to Service Instance corresponding to the service request by routing server,
So that the service instance response and handling received service request.When routing server receives Service Instance for institute
During the service request of the service request feedback of reception, the identity corresponding to the service request is obtained according to the service request received
Mark and service type, and inquiry corresponds to acquired identity and the inquiry service of service type in route record table
Node identification and service identifiers.Corresponding Service Instance is determined further according to inquiring service node mark and service identifiers, and by institute
The service request of reception is sent to identified Service Instance.
In one embodiment, routing server receive terminal send service request, according to the service request of reception from
The Service Instance for responding the service request is determined in multiple Service Instances.When the service instance response and handle the service please
During asking, according to processing logic need call belong to another type of Service Instance when, routing server receive by response to
Clothes that are that the Service Instance of the service request is fed back for service request and belonging to another type Service Instance for request call
Business request, corresponding Service Instance is determined, and service request is sent to the Service Instance further according to the service request received.
In one embodiment, service request is sent to the Service Instance of selection by routing server, and in route record
Corresponding record identity, service type, service node mark and service identifiers in table.Service in response to the service request is real
Example is determined by service node mark and service identifiers.The service request that service instance response is received, and by running service reality
The response data generated in the service node record service instance response service request procedure of example.When being received again corresponding to institute
During the service request of the identity of record and service type, routing server is obtained from route record table corresponding to the identity
The service node of mark and service type mark and service identifiers, and the service request is sent to service node mark kimonos
The determining Service Instance of business mark.
It is real that routing server will route to identical service corresponding to the service request of common identity mark and service type
Example, it is achieved thereby that the effect of viscosity routing.Service Instance receives service request, and corresponding identity is obtained according to service request
Mark, service type and data parameters, and based in the service node for running the Service Instance historical record and corresponding to should
The response data and acquired data parameters of identity and service type respond currently received service request.It is logical
It crosses the sticky route test of routing server and is asked by the service instance response of service node record operation thereon in service
The response data generated when asking so that Service Instance can the response data based on historical record, response correspond to common identity
The service request of mark and service type, so as to provide a kind of stateful service request routing and response.In an implementation
In example, service request is sent to the corresponding Service Instance of service identifiers of selection by routing server so that receiving service please
The Service Instance asked obtains corresponding data parameters according to the service request received, and according to data parameters in response to the service
Request.During service instance response service request, without being related to the corresponding identity of the service request, according to corresponding to
The data parameters of the service request perform corresponding operation.Service Instance handles corresponding service request, energy according to data parameters
It is enough effectively to avoid corresponding identity involved in processing procedure.
In above-described embodiment, when receiving the service request that Service Instance is fed back for received service request, root
Determine to respond the Service Instance of the service request according to the service request that this is received, and determined by the service request is sent to
Service Instance, so that Service Instance is responded and handled to received service request, so as to be to realize multi-layer
Service request routing, increase the routing depth of service request.
In one embodiment, the method for routing of above-mentioned service request further includes:When not inquired in route record table
When service node is identified with service identifiers, inquiry is corresponding to the service identifiers of service type from web services registry;It is inquiring
Service identifiers in select service identifiers;Service request is sent to the corresponding Service Instance of service identifiers of selection;It is routeing
Corresponding record identity, service type, the service identifiers of selection and corresponding service node mark in record sheet.
Wherein, web services registry is used for the Service Instance run in statistical cloth server.Web services registry specifically may be used
To include service node mark, service type and service identifiers.
Specifically, routing server is inquired in route record table corresponding to acquired identity and service type
Service node identifies and service identifiers.When not inquiring the clothes corresponding to the identity and service type in route record table
When business node identification and service identifiers, routing server is inquired according to acquired service type from web services registry belongs to this
The service identifiers of service type.After the service identifiers corresponding to service type are inquired, routing server is from the clothes inquired
Service identifiers are selected in business mark, and acquired service request is sent to the corresponding service of selected service identifiers in fact
Example.Wherein, the Service Instance that selected service identifiers correspond to is used to respond service request.Routing server will be according to service
The identity of acquisition request and service type, the service node mark with selected service identifiers and corresponding to the service identifiers
Corresponding record is known in route record table.
In one embodiment, Service Instance is uniquely determined by service node mark and service identifiers.In web services registry
Corresponding record service node mark, service type and service identifiers, service node, which identifies operation on corresponding service node, category
Service type and Service Instance corresponding with the service identifiers of corresponding record in corresponding record.Determine response service request
Service Instance, that is, can determine that the corresponding service identifiers of the Service Instance and run the corresponding clothes of service node of the Service Instance
Business node identification.
In above-described embodiment, corresponding record identity, service type, service identifiers and service section in route record table
Point identification, during convenient for getting the service request corresponding to the identity and service type again, directly from route record table
It is middle to obtain corresponding service identifiers and service node identification, and service request is sent to corresponding to the service identifiers inquired and
The Service Instance of service node mark, it is achieved thereby that the effect of viscosity routing.
In one embodiment, in the method for routing of above-mentioned service request, service is selected in the service identifiers inquired
Mark, including:Service identifiers are randomly choosed in the service identifiers inquired;Or, from inquiring in a manner of traversing poll
Service identifiers are selected in service identifiers;Or, according to the corresponding load selection service identifiers of the service identifiers institute inquired;
Or, the cryptographic Hash of identity is selected according to the total quantity remainder of service identifiers according to gained remainder is calculated from service identifiers
Select service identifiers.
Wherein, it is randomly selected for representing the arbitrary selection of no additional constraint condition.Poll is traversed for representing to institute
The service identifiers inquired carry out cycle selection in sequence.Traversal poll can be specifically every time according to service type from
During the service identifiers selected in multiple service identifiers of inquiry, the service identifiers being not yet selected always are selected, until being looked into
The multiple service identifiers ask, which are traversed, to be selected.It loads to represent the currently processed clothes of the corresponding Service Instance of service identifiers
Business number of requests.Remainder is referred to as modulus, refer to mathematically take the remainder operation.Cryptographic Hash is by hash function logarithm
According to the transformed value of progress.Such as a can be expressed as according to the mathematic(al) representation of b remainders:A%b.
Specifically, routing server inquires in web services registry the clothes corresponding to the service type according to service type
Business mark can select by multiple choices mode from the service identifiers inquired the Service Instance for responding service request
Corresponding service identifiers.
In one embodiment, route server query is to after corresponding to the service identifiers of service type, from what is inquired
In service identifiers arbitrarily selection correspond to for respond service request Service Instance service identifiers
In one embodiment, routing server selects service in a manner of traversing poll from the service identifiers inquired
Mark.When routing server is inquired according to service type and selects service identifiers, select to determine from the service identifiers inquired
The service identifiers being not yet selected, then service identifiers are selected from the identified service identifiers being not yet selected, until
The corresponding service type of the service type is traversed selection.The corresponding service identifiers of the service type are traversed selection and finish,
When being inquired further according to the service type and selecting corresponding service identifiers, then choosing is traversed from all service identifiers inquired
Select service identifiers.
In one embodiment, routing server is corresponding after the corresponding Service Instance of service identifiers sends service request
Record and change the load of the service identifiers.Routing server inquires the corresponding negative of inquired service identifiers respectively
It carries, the service identifiers of the load is corresponded to by screening load selection from the service identifiers inquired.It specifically can be from inquiry
Service identifiers in select load minimum service identifiers as selected service identifiers.
In one embodiment, routing server calculates the cryptographic Hash of identity, and the service identifiers to being inquired
It is ranked up, while the total quantity of service identifiers that statistical query arrives, then to calculating the cryptographic Hash of gained according to service identifiers
So as to obtain corresponding remainder, serial number is selected corresponding to remaining further according to remainder from the service identifiers after sequence for total quantity remainder
Several service identifiers.
In above-described embodiment, after the service identifiers corresponding to service type are inquired, in several ways from inquiring
Service identifiers in selection for responding the corresponding service identifiers of Service Instance of service request, realizing please for responding service
The load balancing of each Service Instance asked, so as to improve the response efficiency of service request.
In one embodiment, the method for routing of above-mentioned service request further includes:Receive the service note that Service Instance is sent
Volume request;Corresponding service type, service node mark and service identifiers are obtained according to service registration request;By the service of acquisition
Type, service node mark and service identifiers corresponding record are in web services registry.
Wherein, service registration request is the request for triggering registration service example.Service registration request can be specifically
Number, letter and at least one of the characters such as meet.Service registration request can specifically include service type, service node mark
Knowledge and service identifiers.
Specifically, routing server receives the service registration request sent when Service Instance starts, and parses what is received
Service registration request, to obtain the service type corresponding to the service registration request, service node mark and service identifiers, then will
Acquired service type, service node mark and service identifiers corresponding record is in web services registry.
It in one embodiment, please according to the service registration received after routing server receives service registration request
It asks from the Service Instance for sending the service registration request and obtains corresponding service type, service node mark and service identifiers, and
Service type, service node mark and service identifiers in web services registry acquired in corresponding record.
In one embodiment, routing server receives the service registration request that Service Instance is sent, and according to being received
The service registration request arrived obtains the service node of the chained address and Service Instance operation of respective service example thereon
Corresponding chained address.Routing server by Service Instance and the corresponding chained address of service node respectively with it is corresponding
Service identifiers and service node identification build mapping relations one by one so that can be distinguished according to service identifiers and service node identification
Obtain the chained address of Service Instance and service node.
In above-described embodiment, according to the service registration request received, the simultaneously corresponding service type of corresponding record, clothes are obtained
It is engaged in node identification and service identifiers, when not inquiring the service node corresponding to identity and service type in route record table
When mark and service identifiers, convenient for the service mark for corresponding to the service type is inquired in the web services registry according to service type
Know, so that it is determined that for responding the service identifiers corresponding to the Service Instance of service request, improve the routing effect of service request
Rate.
In one embodiment, the method for routing of above-mentioned service request further includes:Service identifiers into web services registry
Corresponding Service Instance sends heartbeat data packets;When the response bag for not receiving heartbeat data packets in the first preset duration,
Then from web services registry, the corresponding service identifiers of Service Instance and service type kimonos corresponding with service identifiers are deleted
Business node identification.
Wherein, heartbeat data packets are the self-defining data packets for keeping routing server and Service Instance heartbeat synchronization.
Response bag is used to represent Service Instance data packet in operating status.Preset duration is preset time span.First
Preset duration is used to mutually distinguish with other preset durations.First preset duration can be specifically to send beats to Service Instance
According to the time span for packaging cumulative calculation, such as 10 seconds.
Specifically, service of the routing server as corresponding to the service identifiers that predetermined period is recorded into web services registry is real
Example sends heartbeat data packets, and receives the response bag that Service Instance is directed to heartbeat data packets feedback.Routing server is when first
Do not received in preset duration Service Instance transmission corresponding to heartbeat data packets response bag when, then from clothes after preset duration
It is engaged in registration table, deletes and do not receive service identifiers corresponding to the Service Instance of response bag and corresponding with the service identifiers
The service type of record and service node identification.
In one embodiment, routing server receives and records the operation number of the expression normal operation of Service Instance transmission
According to, when inquiring corresponding service identifiers according to service type, the selection latest update operation number from the service identifiers inquired
According to Service Instance corresponding to service identifiers.Service identifiers are selected according to the update of operation data, can effectively avoid routeing
Server is deleted and normal operating condition is in web services registry because network reason does not receive the response bag of Service Instance in time
The corresponding service identifiers of Service Instance and service type corresponding with service identifiers and service node identification.According to service
The operation data that example is sent realizes the water conservancy diversion of service request, optimizes the routed path of service request, improves service request
Response efficiency.
In above-described embodiment, heartbeat data is sent by the corresponding Service Instance of service identifiers into web services registry
Packet, and according to whether receiving the operating status that corresponding response bag judges Service Instance, it is right in web services registry to update according to this
Service identifiers, service node mark and the service type that should be recorded so that service request is routed to according to service type and is used for
When responding the Service Instance of the service request, the Service Instance in normal operating condition can be accurately positioned.
In one embodiment, the method for routing of above-mentioned service request further includes:When not received in the second preset duration
During to service request corresponding to identity and service type, then from route record table, delete and identity and service
The corresponding service node mark of type and service identifiers.
Wherein, the second preset duration is preset time span.Specifically, routing server receives pair from previous
It should be in the service request of identity and service type, when not received in the second preset duration corresponding to the identity mark
Know and service type service request when, then after the second preset duration, from route record table delete with the identity and
The corresponding service node mark of service type and service identifiers.
In one embodiment, when routing server receives the service request corresponding to identity and service type,
Cumulative calculation obtains the waiting time of the service request corresponding to the identity and service type again, is more than when waiting time
During the second preset duration, then the service node mark with the identity and service type corresponding record is deleted from route record table
Knowledge and service identifiers.
In above-described embodiment, when it is adjacent twice obtain correspond to common identity mark and service type service request when
The long history route record for being more than preset duration, then deleting corresponding to the identity and service type in route record table,
Reduce the data recorded in route record table, when receiving the service request corresponding to the identity and service type again
When, routed path is reselected, provides stateless service, realizes dynamic routing effect.
As shown in figure 4, in a specific embodiment, providing a kind of method for routing of service request, which please
The method for routing asked includes the following steps:
S402, routing server receive the service registration request that Service Instance is sent.
S404, routing server according to the service registration request obtain corresponding service type, service node mark and
Service identifiers.
S406, routing server is by the service type of acquisition, the service node identifies and the service identifiers pair
It should be recorded in web services registry.
S408, routing server receive service request.
S410, routing server obtain identity and service type according to the service request.
S412, routing server inquire the clothes corresponding to the identity and the service type in route record table
Business node identification and service identifiers.
S414, when inquiring the service node mark and service identifiers, routing server sends out the service request
Send to the service node identify it is being run in corresponding service node and corresponding to the service of the service identifiers inquired
Example.
S416, when not inquiring service node mark and the service identifiers, routing server is from service registration
Inquiry is corresponding to the service identifiers of the service type in table.
S418, routing server select service identifiers in the service identifiers inquired, and by the service request
It is sent to the corresponding Service Instance of the service identifiers of selection.
S420, routing server identity described in corresponding record, the service type, selection in route record table
The service identifiers and corresponding service node mark.
S422 when routing server receives the service request of the Service Instance feedback, is returned and is performed step S410.
S422, when routing server is not received in the second preset duration corresponding to the identity and the service
During the service request of type, then from the route record table, delete corresponding with the identity and the service type
Service node identifies and service identifiers.
In above-described embodiment, routing server records phase according to the service registration request of Service Instance in web services registry
Service node mark, service type and the service identifiers answered, when route service mark receives service request for the first time, according to clothes
Business asks corresponding service type to select to respond the service corresponding to the Service Instance of the service request from service registration
Mark, and corresponding record identity, service type, service node mark and service identifiers in route record table so that road
It, can be straight according to route record table when receiving the service request corresponding to the identity and service type again by server
The Service Instance that service request is routed to response service request corresponding with the identity and service type recently is connect, so as to
Realize sticky routing effort so that service node provides stateful service.
As shown in figure 5, in a specific embodiment, provide a kind of method for routing of service request.Specifically, divide
Cloth server includes n service node, and tri- kinds of Sa, Sb and Sc is distributed on the service node in distributed server and services classes
The Service Instance of type.Service node identifies and tetra- Service Instances of Sa1, Sa2, Sb1 and Sb2 is distributed on 1 corresponding service node,
Service node identifies and tetra- Service Instances of Sa1, Sa2, Sc1 and Sc2 is distributed on 2 corresponding service nodes, service node mark n
Tetra- Service Instances of Sb1, Sb2, Sc1 and Sc2 are distributed on corresponding service node.Terminal calls the service that service type is Sa
Example, the Service Instance that the Service Instance that service type is Sa is Sc dependent on calling service type.Routing server is according to reality
Existing function can be described as sticky router.The execution flow of this method is as follows:
(1) terminal generation service request.Wherein, the service request that terminal is generated includes identity A service types Sa.
(2) sticky router receives the service request that terminal is sent, and obtains corresponding identity A according to service request
With service type Sa.
(3) sticky router first calls the corresponding Service Instances of service type Sa, then stochastic route is to corresponding to service
The Service Instance of type Sa such as routes to the Service Instance that 1 and service identifiers Sa1 is identified corresponding to service node.
(4) sticky router corresponding record identity A, service type Sa, service node mark 1 in route record table
With service identifiers Sa1.
(5) phase is generated when service node identifies the service request of 1 service instance response terminal corresponding with service identifiers Sa1
The service request answered.Wherein, service request includes identity A and service type Sc.
(6) sticky router receives the service for corresponding to the Service Instance transmission that service node identifies 1 and service identifiers Sa1
Request, and obtain corresponding identity A and service type Sc.
(7) sticky router calls the corresponding Service Instances of service type Sc for the first time, then stochastic route is to corresponding to clothes
The Service Instance of service type Sc such as routes to the Service Instance that 2 and service identifiers Sc1 is identified corresponding to service node.
(8) sticky router corresponding record identity A, service type Sc, service node mark 2 in route record table
With service identifiers Sc1.
(9) sticky router receives the service request comprising identity A and service type Sa again, please by the service
Viscosity is asked, which to route to response recently, corresponding to the Service Instance of the service request of identity A and service type Sa, will service
Request routes to service node and identifies 1 Service Instance corresponding with service identifiers Sa1.
(10) sticky router receives the service request comprising identity A and service type Sc again, this is serviced
Request viscosity routes to response recently and, corresponding to the Service Instance of the service request of identity A and service type Sc, will take
Business request routes to service node and identifies 2 Service Instances corresponding with service identifiers Sc1.
In above-described embodiment, sticky router receives for the first time when calling the corresponding Service Instance of service type, random road
By to corresponding Service Instance, and routed path is recorded, when receiving the Service Instance for calling the service type again, directly
The Service Instance of historical record is routed to, realizes the viscosity routing that route target is refined to Service Instance granularity.
As shown in fig. 6, in one embodiment, provide the route device 600 of service request.With reference to Fig. 6, service request
Route device 600 include:
Service request reception module 601, for receiving service request;
Acquisition module 602, for obtaining identity and service type according to service request;
Enquiry module 603, for inquiring service node mark and service identifiers in route record table;Service node identifies
It is corresponding to identity and service type with service identifiers;
Service request sending module 604 is identified for service request to be sent to service node in corresponding service node
Operation and corresponding to the Service Instance of service identifiers that inquires.
The route device of above-mentioned service request, identity and service type according to corresponding to the service request of reception,
The corresponding service identifiers of the Service Instance in response to the service request that query history records from route record table, and will receive
Service request be sent to the corresponding Service Instance of service identifiers of the inquiry so that the service request repeatedly received can be by road
By carrying out response processing to same Service Instance, it is achieved thereby that the effect of viscosity routing, and can realize clothes directly
Business request routes to specific Service Instance, has refined the route target granularity corresponding to service request.
In one embodiment, service request reception module 601 is additionally operable to when the service for receiving Service Instance feedback please
When asking, return and perform the step of identity and service type are obtained according to service request;The service request of feedback is real by service
Example is according to the service request feedback for being sent to Service Instance.
In above-described embodiment, when receiving the service request that Service Instance is fed back for received service request, root
Determine to respond the Service Instance of the service request according to the service request that this is received, and determined by the service request is sent to
Service Instance, so that Service Instance is responded and handled to received service request, so as to be to realize multi-layer
Service request routing, increase the routing depth of service request.
As shown in fig. 7, in one embodiment, the route device 600 of service request further includes:Service identifiers selecting module
605 and logging modle 606.
Enquiry module 603 is additionally operable to when not inquiring service node mark and service identifiers in route record table, from
Inquiry is corresponding to the service identifiers of service type in web services registry.
Service identifiers selecting module 605, for selecting service identifiers in the service identifiers inquired.
Service request sending module 604, the corresponding service of service identifiers for being additionally operable to service request being sent to selection are real
Example.
Logging modle 606, for the service mark of corresponding record identity, service type, selection in route record table
Know and corresponding service node identifies.
In above-described embodiment, corresponding record identity, service type, service identifiers and service section in route record table
Point identification, during convenient for getting the service request corresponding to the identity and service type again, directly from route record table
It is middle to obtain corresponding service identifiers and service node identification, and service request is sent to corresponding to the service identifiers inquired and
The Service Instance of service node mark, it is achieved thereby that the effect of viscosity routing.
In one embodiment, service identifiers selecting module 605 is additionally operable to randomly choose in the service identifiers inquired
Service identifiers;Service identifiers selecting module 605 is additionally operable to select clothes from the service identifiers inquired in a manner of traversing poll
Business mark;Service identifiers selecting module 605 is additionally operable to according to the corresponding load selection service of service identifiers institute inquired
Mark;Service identifiers selecting module 605 is additionally operable to the cryptographic Hash of identity according to the total quantity remainder of service identifiers, root
Service identifiers are selected from service identifiers according to gained remainder is calculated.
In above-described embodiment, after the service identifiers corresponding to service type are inquired, in several ways from inquiring
Service identifiers in selection for responding the corresponding service identifiers of Service Instance of service request, realizing please for responding service
The load balancing of each Service Instance asked, so as to improve the response efficiency of service request.
In one embodiment, the route device 600 of service request further includes:Registration module 607.
Registration module 607, for receiving the service registration request of Service Instance transmission;Phase is obtained according to service registration request
Service type, service node mark and the service identifiers answered.
Logging modle 606 is additionally operable to taking the service type of acquisition, service node mark and service identifiers corresponding record
It is engaged in registration table.
In above-described embodiment, according to the service registration request received, the simultaneously corresponding service type of corresponding record, clothes are obtained
It is engaged in node identification and service identifiers, when not inquiring the service node corresponding to identity and service type in route record table
When mark and service identifiers, convenient for the service mark for corresponding to the service type is inquired in the web services registry according to service type
Know, so that it is determined that for responding the service identifiers corresponding to the Service Instance of service request, improve the routing effect of service request
Rate.
In one embodiment, the route device 600 of service request further includes:Removing module 608.
Service request sending module 604, the corresponding Service Instance of service identifiers being additionally operable into web services registry are sent
Heartbeat data packets.
Removing module 608, for when the response bag for not receiving heartbeat data packets in the first preset duration, then from clothes
It is engaged in registration table, deletes the corresponding service identifiers of Service Instance and service type corresponding with service identifiers and service node
Mark.
In above-described embodiment, heartbeat data is sent by the corresponding Service Instance of service identifiers into web services registry
Packet, and according to whether receiving the operating status that corresponding response bag judges Service Instance, it is right in web services registry to update according to this
Service identifiers, service node mark and the service type that should be recorded so that service request is routed to according to service type and is used for
When responding the Service Instance of the service request, the Service Instance in normal operating condition can be accurately positioned.
In one embodiment, removing module 608 are additionally operable to receive corresponding to identity in the second preset duration
During the service request of mark and service type, then from route record table, clothes corresponding with identity and service type are deleted
Business node identification and service identifiers.
In above-described embodiment, when it is adjacent twice obtain correspond to common identity mark and service type service request when
The long history route record for being more than preset duration, then deleting corresponding to the identity and service type in route record table,
Reduce the data recorded in route record table, when receiving the service request corresponding to the identity and service type again
When, routed path is reselected, provides stateless service, realizes dynamic routing effect.
In one embodiment, a kind of computer equipment is provided, including memory and processor, memory is stored with meter
Calculation machine program, when computer program is executed by processor so that processor performs following steps:Receive service request;According to clothes
Business acquisition request identity and service type;Inquiring service node mark and service identifiers in route record table;Service section
Point identification and service identifiers are corresponding to identity and service type;Service request is sent to service node and identifies corresponding clothes
It is being run in business node and corresponding to the Service Instance of service identifiers that inquires.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:When connecing
When receiving the service request of Service Instance feedback, the step for performing and identity and service type being obtained according to service request is returned
Suddenly;The service request of feedback is fed back by Service Instance according to the service request for being sent to Service Instance.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:When
When not inquiring service node mark and service identifiers in route record table, inquiry is corresponding to service type from web services registry
Service identifiers;Service identifiers are selected in the service identifiers inquired;Service request is sent to the service identifiers pair of selection
The Service Instance answered;Corresponding record identity, service type, the service identifiers of selection and corresponding in route record table
Service node identifies.
In one embodiment, service identifiers are selected in the service identifiers inquired, including:In the service mark inquired
Service identifiers are randomly choosed in knowledge;Or, service identifiers are selected from the service identifiers inquired in a manner of traversing poll;Or,
According to the corresponding load selection service identifiers of the service identifiers institute inquired;Or, to the cryptographic Hash of identity according to clothes
The total quantity remainder for mark of being engaged in selects service identifiers according to gained remainder is calculated from service identifiers.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:It receives
The service registration request that Service Instance is sent;According to service registration request obtain corresponding service type, service node mark and
Service identifiers;By the service type of acquisition, service node mark and service identifiers corresponding record in web services registry.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:To clothes
The corresponding Service Instance of service identifiers being engaged in registration table sends heartbeat data packets;When not receiving the heart in the first preset duration
When jumping the response bag of data packet, then from web services registry, the corresponding service identifiers of Service Instance and and service identifiers are deleted
Corresponding service type and service node identification.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:When
When the service request corresponding to identity and service type is not received in the second preset duration, then from route record table,
Delete service node mark corresponding with identity and service type and service identifiers.
Above computer equipment, identity and service type according to corresponding to the service request of reception are remembered from routing
The corresponding service identifiers of the Service Instance in response to the service request that query history records in table are recorded, and please by the service of reception
Seek the corresponding Service Instance of the service identifiers for being sent to the inquiry so that the service request repeatedly received can be routed to same
A Service Instance carries out response processing, it is achieved thereby that the effect of viscosity routing, and can realize service request road directly
By to specific Service Instance, having refined the route target granularity corresponding to service request.
In one embodiment, a kind of computer readable storage medium is provided, is stored with computer program, the calculating
When machine program is executed by processor so that processor performs following steps:Receive service request;Identity is obtained according to service request
Mark and service type;Inquiring service node mark and service identifiers in route record table;Service node identifies and service mark
Know corresponding to identity and service type;Service request is sent in the corresponding service node of service node mark and is run
And corresponding to the Service Instance of service identifiers that inquires.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:When connecing
When receiving the service request of Service Instance feedback, the step for performing and identity and service type being obtained according to service request is returned
Suddenly;The service request of feedback is fed back by Service Instance according to the service request for being sent to Service Instance.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:When
When not inquiring service node mark and service identifiers in route record table, inquiry is corresponding to service type from web services registry
Service identifiers;Service identifiers are selected in the service identifiers inquired;Service request is sent to the service identifiers pair of selection
The Service Instance answered;Corresponding record identity, service type, the service identifiers of selection and corresponding in route record table
Service node identifies.
In one embodiment, service identifiers are selected in the service identifiers inquired, including:In the service mark inquired
Service identifiers are randomly choosed in knowledge;Or, service identifiers are selected from the service identifiers inquired in a manner of traversing poll;Or,
According to the corresponding load selection service identifiers of the service identifiers institute inquired;Or, to the cryptographic Hash of identity according to clothes
The total quantity remainder for mark of being engaged in selects service identifiers according to gained remainder is calculated from service identifiers.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:It receives
The service registration request that Service Instance is sent;According to service registration request obtain corresponding service type, service node mark and
Service identifiers;By the service type of acquisition, service node mark and service identifiers corresponding record in web services registry.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:To clothes
The corresponding Service Instance of service identifiers being engaged in registration table sends heartbeat data packets;When not receiving the heart in the first preset duration
When jumping the response bag of data packet, then from web services registry, the corresponding service identifiers of Service Instance and and service identifiers are deleted
Corresponding service type and service node identification.
In one embodiment, when computer program is executed by processor, also so that processor performs following steps:When
When the service request corresponding to identity and service type is not received in the second preset duration, then from route record table,
Delete service node mark corresponding with identity and service type and service identifiers.
Above computer readable storage medium storing program for executing, identity and service type according to corresponding to the service request of reception,
The corresponding service identifiers of the Service Instance in response to the service request that query history records from route record table, and will receive
Service request be sent to the corresponding Service Instance of service identifiers of the inquiry so that the service request repeatedly received can be by road
By carrying out response processing to same Service Instance, it is achieved thereby that the effect of viscosity routing, and can realize clothes directly
Business request routes to specific Service Instance, has refined the route target granularity corresponding to service request.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read
In storage medium, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, it is provided herein
Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile
And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled
Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory
(RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM
(SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM
(ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight
Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each step in above method embodiment, which does not limit, performs sequence, can carry out arbitrary adjustment, to make description simple
It is clean, the permutation and combination that is possible to of each step in above method embodiment is not all described, as long as however, all these
Contradiction is not present in the permutation and combination of step, is all considered to be the range of this specification record.
Each technical characteristic of above example can be combined arbitrarily, to make description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield is all considered to be the range of this specification record.
Embodiment described above only expresses the several embodiments of the present invention, and description is more specific and detailed, but simultaneously
Cannot the limitation to the scope of the claims of the present invention therefore be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention
Protect range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (10)
1. a kind of method for routing of service request, the method includes:
Receive service request;
Identity and service type are obtained according to the service request;
Inquiring service node mark and service identifiers in route record table;Service node mark and service identifiers with it is described
Identity and the service type are corresponding;
By the service request be sent to the service node identify it is being run in corresponding service node and corresponding to inquiring
The service identifiers Service Instance.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
When the service request for receiving the Service Instance feedback, it is described according to service request acquisition identity to return to execution
The step of mark and service type;The service request of the feedback is by the Service Instance according to being sent to the Service Instance
The service request feedback.
3. according to the method described in claim 1, it is characterized in that, the method further includes:
When not inquiring the service node mark and the service identifiers in the route record table, from web services registry
Middle inquiry is corresponding to the service identifiers of the service type;
Service identifiers are selected in the service identifiers inquired;
The service request is sent to the corresponding Service Instance of the service identifiers of selection;
Identity, the service type, the service identifiers of selection and phase described in corresponding record in route record table
The service node mark answered.
4. according to the method described in claim 3, it is characterized in that, described select service in the service identifiers inquired
Mark, including:
Service identifiers are randomly choosed in the service identifiers inquired;Or,
In a manner of traversing poll service identifiers are selected from the service identifiers inquired;Or,
According to the corresponding load selection service identifiers of the service identifiers institute inquired;Or,
To the cryptographic Hash of the identity according to the total quantity remainder of the service identifiers, according to calculating gained remainder from described
Service identifiers are selected in service identifiers.
5. according to the method described in claim 3, it is characterized in that, the method further includes:
Receive the service registration request that Service Instance is sent;
Corresponding service type, service node mark and service identifiers are obtained according to the service registration request;
By the service type of acquisition, service node mark and the service identifiers corresponding record in web services registry
In.
6. according to the method described in claim 5, it is characterized in that, the method further includes:
The corresponding Service Instance of service identifiers into the web services registry sends heartbeat data packets;
When the response bag for not receiving the heartbeat data packets in the first preset duration, then
From the web services registry, delete the corresponding service identifiers of the Service Instance and with the service identifiers
The corresponding service type and service node mark.
7. according to the method described in claim 3, it is characterized in that, the method further includes:
When not receiving the service request corresponding to the identity and the service type in the second preset duration, then
From the route record table, service node mark kimonos corresponding with the identity and the service type is deleted
Business mark.
8. a kind of route device of service request, which is characterized in that described device includes:
Service request reception module, for receiving service request;
Acquisition module, for obtaining identity and service type according to the service request;
Enquiry module, for inquiring service node mark and service identifiers in route record table;Service node mark and
Service identifiers are corresponding to the identity and service type;
Service request sending module is identified for the service request to be sent to the service node in corresponding service node
Operation and corresponding to the Service Instance of the service identifiers that inquires.
9. a kind of computer equipment, including memory and processor, the memory is stored with computer program, the computer
When program is performed by the processor so that the processor perform claim requires the step of any one of 1 to 7 the method.
10. a kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor,
So that the processor perform claim requires the step of any one of 1 to 7 the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711382049.8A CN108134828A (en) | 2017-12-20 | 2017-12-20 | Method for routing, device, computer equipment and the storage medium of service request |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711382049.8A CN108134828A (en) | 2017-12-20 | 2017-12-20 | Method for routing, device, computer equipment and the storage medium of service request |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108134828A true CN108134828A (en) | 2018-06-08 |
Family
ID=62390921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711382049.8A Pending CN108134828A (en) | 2017-12-20 | 2017-12-20 | Method for routing, device, computer equipment and the storage medium of service request |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108134828A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108924210A (en) * | 2018-06-27 | 2018-11-30 | 杭州贝店科技有限公司 | Service request processing method, device, server and storage medium |
CN109327503A (en) * | 2018-08-27 | 2019-02-12 | 珠海格力电器股份有限公司 | Information management system and method, service router |
CN109361749A (en) * | 2018-10-24 | 2019-02-19 | 华为技术有限公司 | Message processing method, relevant device and computer storage medium |
CN109445960A (en) * | 2018-10-18 | 2019-03-08 | 腾讯科技(深圳)有限公司 | Method for routing, device and the storage medium of application |
CN110311900A (en) * | 2019-06-19 | 2019-10-08 | 微梦创科网络科技(中国)有限公司 | A kind of service calling method, device, electronic equipment and storage medium |
CN111371684A (en) * | 2020-03-02 | 2020-07-03 | 中国邮政储蓄银行股份有限公司 | Routing processing method and device and double-activity data center system |
CN112087390A (en) * | 2019-06-14 | 2020-12-15 | 华为技术有限公司 | Network routing method and device |
CN112118291A (en) * | 2020-08-13 | 2020-12-22 | 北京思特奇信息技术股份有限公司 | Load balancing system and method for service flow |
CN112350940A (en) * | 2020-10-29 | 2021-02-09 | 中电积至(海南)信息技术有限公司 | Terminal application-oriented multi-channel fusion self-adaptive network link selection method |
WO2021047515A1 (en) * | 2019-09-12 | 2021-03-18 | 华为技术有限公司 | Service routing method and apparatus |
CN112637287A (en) * | 2020-12-10 | 2021-04-09 | 北京字节跳动网络技术有限公司 | Load balancing method and equipment |
CN112953982A (en) * | 2019-11-26 | 2021-06-11 | 腾讯科技(深圳)有限公司 | Service processing method, service configuration method and related device |
CN112968936A (en) * | 2021-01-29 | 2021-06-15 | 紫光云技术有限公司 | Proxy routing method for dynamically acquiring and selecting routing rule |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1592303A (en) * | 2003-08-28 | 2005-03-09 | 国际商业机器公司 | Methods and systems for application instance level workload distribution affinities |
CN101079901A (en) * | 2006-05-24 | 2007-11-28 | 国际商业机器公司 | Method and device for checking client requirement had beed conveyed to adequate server by router |
CN101610222A (en) * | 2009-07-20 | 2009-12-23 | 中兴通讯股份有限公司 | Client-based server selection method and device |
CN102387075A (en) * | 2011-10-18 | 2012-03-21 | 成都康赛电子科大信息技术有限责任公司 | Dynamic service routing method and device for enterprise service bus |
CN102546226A (en) * | 2010-12-08 | 2012-07-04 | 中国科学院声学研究所 | Multi-node-based network service provision system and method |
CN105812261A (en) * | 2016-03-07 | 2016-07-27 | 北京交通大学 | Message forwarding method and system in information center network |
CN106941508A (en) * | 2016-01-05 | 2017-07-11 | 阿里巴巴集团控股有限公司 | Service calling method, device and system |
CN107018174A (en) * | 2016-12-27 | 2017-08-04 | 阿里巴巴集团控股有限公司 | A kind of method, device and the transaction processing system of blocking system service processing |
-
2017
- 2017-12-20 CN CN201711382049.8A patent/CN108134828A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1592303A (en) * | 2003-08-28 | 2005-03-09 | 国际商业机器公司 | Methods and systems for application instance level workload distribution affinities |
CN101079901A (en) * | 2006-05-24 | 2007-11-28 | 国际商业机器公司 | Method and device for checking client requirement had beed conveyed to adequate server by router |
CN101610222A (en) * | 2009-07-20 | 2009-12-23 | 中兴通讯股份有限公司 | Client-based server selection method and device |
CN102546226A (en) * | 2010-12-08 | 2012-07-04 | 中国科学院声学研究所 | Multi-node-based network service provision system and method |
CN102387075A (en) * | 2011-10-18 | 2012-03-21 | 成都康赛电子科大信息技术有限责任公司 | Dynamic service routing method and device for enterprise service bus |
CN106941508A (en) * | 2016-01-05 | 2017-07-11 | 阿里巴巴集团控股有限公司 | Service calling method, device and system |
CN105812261A (en) * | 2016-03-07 | 2016-07-27 | 北京交通大学 | Message forwarding method and system in information center network |
CN107018174A (en) * | 2016-12-27 | 2017-08-04 | 阿里巴巴集团控股有限公司 | A kind of method, device and the transaction processing system of blocking system service processing |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108924210A (en) * | 2018-06-27 | 2018-11-30 | 杭州贝店科技有限公司 | Service request processing method, device, server and storage medium |
CN109327503A (en) * | 2018-08-27 | 2019-02-12 | 珠海格力电器股份有限公司 | Information management system and method, service router |
CN109445960B (en) * | 2018-10-18 | 2021-03-02 | 腾讯科技(深圳)有限公司 | Application routing method, device and storage medium |
CN109445960A (en) * | 2018-10-18 | 2019-03-08 | 腾讯科技(深圳)有限公司 | Method for routing, device and the storage medium of application |
CN109361749B (en) * | 2018-10-24 | 2022-03-29 | 华为云计算技术有限公司 | Message processing method, related equipment and computer storage medium |
CN109361749A (en) * | 2018-10-24 | 2019-02-19 | 华为技术有限公司 | Message processing method, relevant device and computer storage medium |
US11316916B2 (en) | 2018-10-24 | 2022-04-26 | Huawei Technologies Co., Ltd. | Packet processing method, related device, and computer storage medium |
CN112087390A (en) * | 2019-06-14 | 2020-12-15 | 华为技术有限公司 | Network routing method and device |
WO2020249129A1 (en) * | 2019-06-14 | 2020-12-17 | 华为技术有限公司 | Network routing method and apparatus |
CN112087390B (en) * | 2019-06-14 | 2022-05-31 | 华为技术有限公司 | Network routing method and device |
CN110311900A (en) * | 2019-06-19 | 2019-10-08 | 微梦创科网络科技(中国)有限公司 | A kind of service calling method, device, electronic equipment and storage medium |
WO2021047515A1 (en) * | 2019-09-12 | 2021-03-18 | 华为技术有限公司 | Service routing method and apparatus |
CN112953982A (en) * | 2019-11-26 | 2021-06-11 | 腾讯科技(深圳)有限公司 | Service processing method, service configuration method and related device |
CN111371684A (en) * | 2020-03-02 | 2020-07-03 | 中国邮政储蓄银行股份有限公司 | Routing processing method and device and double-activity data center system |
CN111371684B (en) * | 2020-03-02 | 2022-08-09 | 中国邮政储蓄银行股份有限公司 | Routing processing method and device and double-activity data center system |
CN112118291A (en) * | 2020-08-13 | 2020-12-22 | 北京思特奇信息技术股份有限公司 | Load balancing system and method for service flow |
CN112118291B (en) * | 2020-08-13 | 2022-11-18 | 北京思特奇信息技术股份有限公司 | Load balancing system and method for service flow |
CN112350940A (en) * | 2020-10-29 | 2021-02-09 | 中电积至(海南)信息技术有限公司 | Terminal application-oriented multi-channel fusion self-adaptive network link selection method |
CN112637287A (en) * | 2020-12-10 | 2021-04-09 | 北京字节跳动网络技术有限公司 | Load balancing method and equipment |
CN112968936A (en) * | 2021-01-29 | 2021-06-15 | 紫光云技术有限公司 | Proxy routing method for dynamically acquiring and selecting routing rule |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108134828A (en) | Method for routing, device, computer equipment and the storage medium of service request | |
CN107197059B (en) | DNS (Domain name Server) analysis method and device | |
CN106067890B (en) | A kind of domain name analytic method, apparatus and system | |
CN106656849B (en) | Message rate-limiting method and device | |
CN108075934A (en) | A kind of network quality monitoring method, apparatus and system | |
CN103312716B (en) | A kind of method and system accessing internet information | |
CN108173937A (en) | Access control method and device | |
CN105228140A (en) | A kind of data access method and device | |
JP2012161078A (en) | Method and apparatus for determining server which should respond to service request | |
CN109818997A (en) | A kind of load-balancing method, system and storage medium | |
US20100165928A1 (en) | Utilization of multiple access points to support multiple applications and services | |
CN112291365B (en) | Access balance processing method, device, computer equipment and storage medium | |
CN104836839A (en) | Universal user self-defining session system and session management method thereof | |
CN107846364A (en) | A kind for the treatment of method and apparatus of message | |
CN103618801A (en) | Method, device and system for sharing P2P (Peer-to-Peer) resources | |
CN115460175A (en) | IPv6 address generation method and device, electronic equipment and storage medium | |
CN104040539A (en) | Data storage method and apparatus, data operation method and system, and access server | |
CN107347015A (en) | A kind of recognition methods of content distributing network, apparatus and system | |
CN108243266A (en) | Canonical name processing method, configuration method and device | |
EP2918051A1 (en) | Local partitioning in a distributed communication system | |
CN104994022A (en) | Message transmission method and service board | |
Pickard et al. | IPv6 diffusion milestones: Assessing the quantity and quality of adoption | |
CN104092751B (en) | A kind of Operational Visit method and apparatus | |
CN110855424A (en) | Method and device for synthesizing asymmetric flow xDR in DPI field | |
CN108768849A (en) | Message processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180608 |