CN117255136B - Routing method, micro-service system, device and storage medium - Google Patents

Routing method, micro-service system, device and storage medium Download PDF

Info

Publication number
CN117255136B
CN117255136B CN202311518483.XA CN202311518483A CN117255136B CN 117255136 B CN117255136 B CN 117255136B CN 202311518483 A CN202311518483 A CN 202311518483A CN 117255136 B CN117255136 B CN 117255136B
Authority
CN
China
Prior art keywords
instance
adjusted
routing
service
micro
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.)
Active
Application number
CN202311518483.XA
Other languages
Chinese (zh)
Other versions
CN117255136A (en
Inventor
都正杰
唐焱
叶琼青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Pateo Connect Nanjing Co Ltd
Original Assignee
Pateo Connect Nanjing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Pateo Connect Nanjing Co Ltd filed Critical Pateo Connect Nanjing Co Ltd
Priority to CN202311518483.XA priority Critical patent/CN117255136B/en
Priority to CN202410186864.0A priority patent/CN118175209A/en
Publication of CN117255136A publication Critical patent/CN117255136A/en
Application granted granted Critical
Publication of CN117255136B publication Critical patent/CN117255136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • H04L45/507Label distribution

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a routing method, a micro-service system, a device and a storage medium, wherein the routing method comprises the following steps: receiving a routing adjustment instruction for a target micro-service in a micro-service system; the target micro-service comprises at least one instance, and the routing adjustment instruction carries a routing adjustment strategy corresponding to an instance to be adjusted in the at least one instance; responding to the routing adjustment instruction, and generating a routing strategy based on the routing adjustment strategy corresponding to the instance to be adjusted and the label information of the instance to be adjusted; based on the routing policy, the call request for the target micro-service is routed to a target instance of the at least one instance. Therefore, after receiving the routing adjustment instruction, the micro-service system in the application can finish the routing modification based on the label information of the instance to be adjusted, so that the current call request cannot be influenced, and the modification of the routing configuration is realized under the condition that a user does not feel.

Description

Routing method, micro-service system, device and storage medium
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a routing method, a micro-service system, a device, and a storage medium.
Background
In the early stage of the Internet, the product functions are single, each application can bear most product functions, and the internal service call is not complex. However, the development of the internet is rapid, the functions of the current cloud product are very complex, and often a single product is provided with services by a plurality of application modules; in order to promote the self competitiveness, enterprises find new business opportunities, and product types are widely involved, which is a great challenge for service management.
Most of the current schemes are based on a static route configuration mode, routing rules are statically stored in a back-end storage, and a configuration file of a designated position is read and the route configuration is loaded when a service is started. Such a method is simple and reliable and has high practicality, but once the routing configuration needs to be modified, the service needs to wait for restarting, and the service will be interrupted to some extent, which is not acceptable. With iteration of product versions, service versions often need to be frequently updated and put on line and rolled back, and the traditional route management mode is not flexible. The platform is required to dynamically and flexibly configure different versions of service routes, and normal online user access cannot be affected.
Disclosure of Invention
An object of the present invention is to provide a routing method, which has the advantages that after receiving a routing adjustment instruction, a micro service system in the embodiment of the present invention can complete route modification based on the routing adjustment instruction carried in the routing adjustment instruction and label information of an instance to be adjusted, so as to solve the problem in the related art that service is waiting to be restarted when route configuration is modified, thereby affecting on-line normal user access, and enabling the micro service system to modify the route configuration without affecting call requests, i.e. without perception of users.
An object of the present invention is to provide a routing method, which has the advantage that through updating the label information of an instance to be adjusted, a call request can be routed to a corresponding instance to be adjusted, so that version replacement of the instance is realized without perception of a user.
An object of the present invention is to provide a routing method, which has the advantage that by updating the access weight of a first to-be-adjusted instance and the access weight of a second to-be-adjusted instance, the first to-be-adjusted instance and a new version instance in the second to-be-adjusted instance can be online without perception of a user.
An object of the present application is to provide a routing method, which can implement routing of a corresponding number of call requests to a corresponding instance according to a preset access weight, thereby improving accuracy of routing call requests.
An object of the present invention is to provide a routing method, which has the advantage that, in the case that test cases in a first to-be-adjusted instance and a second to-be-adjusted instance pass, by deleting the first to-be-adjusted instance and the second to-be-adjusted instance except for the test cases, comprehensive online of the test cases is realized. And other call requests for the target micro-service may be routed to the test case based on the tag information of the test case. In this way, routing interference caused by other examples in the target micro-service can be reduced, and accuracy of routing call requests is improved.
One object of the present application is to provide a routing method, which has the advantage that the label information of the test case is updated, so that the test case can be comprehensively online without perception of a user.
An object of the present application is to provide a routing method, which may forward a call request to other micro services corresponding to a forwarding rule by using a forwarding manner provided by an embodiment of the present application, so as to improve accuracy of routing the call request.
In one aspect, an embodiment of the present application provides a routing method, where the routing method includes:
receiving a routing adjustment instruction for a target micro service in the micro service system; the target micro-service comprises at least one instance, and the routing adjustment instruction carries a routing adjustment strategy corresponding to an instance to be adjusted in at least one instance; responding to the routing adjustment instruction, and generating a routing strategy based on the routing adjustment strategy corresponding to the instance to be adjusted and the label information of the instance to be adjusted; based on the routing policy, a call request for the target micro-service is routed to a target instance of the at least one instance.
On the other hand, the embodiment of the application provides a micro-service system, which comprises a target micro-service, a routing component corresponding to the target micro-service and a routing management unit; wherein,
the route management unit is used for receiving a route adjustment instruction aiming at the target micro service; the target micro-service comprises at least one instance, and a routing adjustment strategy corresponding to an instance to be adjusted in at least one instance carried by the routing adjustment instruction;
The route management unit is further configured to generate a route policy based on a route adjustment policy corresponding to the to-be-adjusted instance and tag information of the to-be-adjusted instance, and cache the route policy to the route component in response to the route adjustment instruction;
the routing component is configured to route a call request for the target micro-service to a target instance of the at least one instance based on the routing policy.
In yet another aspect, an embodiment of the present application provides a routing device, including a memory and a processor, where the memory stores a computer program executable on the processor, and where the processor implements some or all of the steps in the routing method described above when the processor executes the program.
In yet another aspect, embodiments of the present application provide a storage medium having stored thereon executable instructions that when executed by a processor implement the routing method provided by embodiments of the present application.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the aspects of the present application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the technical aspects of the application.
Fig. 1 is a schematic flow chart of an alternative routing method provided in an embodiment of the present application;
fig. 2 is a second flowchart of an alternative routing method provided in an embodiment of the present application;
fig. 3 is a schematic flowchart III of an alternative routing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an alternative routing method provided in an embodiment of the present application;
fig. 5 is a schematic view of a scenario of a routing method provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a composition structure of a micro service system according to an embodiment of the present application;
fig. 7 is a schematic diagram of a second component structure of a micro service system according to an embodiment of the present application;
fig. 8 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application are further elaborated below in conjunction with the accompanying drawings and examples, which should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making inventive efforts are within the scope of protection of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
The term "first/second/third" is merely to distinguish similar objects and does not represent a specific ordering of objects, it being understood that the "first/second/third" may be interchanged with a specific order or sequence, as permitted, to enable embodiments of the present application described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing the present application only and is not intended to be limiting of the present application.
In the conventional service management, configuration information such as a route is required to be stored in a configuration center, the route configuration information of the configuration center is read when the service is started, and when the route information changes, the service is required to be reloaded, and related service examples are restarted in a cold mode. This is unacceptable in environments with frequently changing complex service invocation relationships, with the end result that the user experience will be greatly degraded.
In order to solve the problem of unaware of a user when modifying a routing configuration, the embodiment of the application provides a routing method which can be applied to a micro-service system; the micro-service system may be configured in a computer device. The computer device may be a server, a notebook computer, a tablet computer, a desktop computer, a smart television, a set-top box, a mobile device (such as a mobile phone, a portable video player, a personal digital assistant, a dedicated messaging device, and a portable game device) and the like.
Fig. 1 is a schematic flow chart of an alternative routing method provided in an embodiment of the present application, as shown in fig. 1, the method includes the following steps S101 to S103:
in S101, receiving a routing adjustment instruction for a target micro service in the micro service system; the target micro-service comprises at least one instance, and the routing adjustment instruction carries a routing adjustment strategy corresponding to an instance to be adjusted in at least one instance.
Here, the target micro service may be any one of at least one micro service in the micro service system. The routing adjustment instructions are to instruct adjustment of routing rules associated with instances in the target micro-service.
In some embodiments, after receiving the routing adjustment instruction, the micro service system may obtain the routing adjustment policy carried in the routing adjustment instruction by parsing the routing adjustment instruction. The routing adjustment strategy is used for adjusting the routing rule of the to-be-adjusted instance in the target micro-service.
In some embodiments, the instance to be adjusted may be one, i.e., indicating that the micro-service system needs to adjust the routing rules of one instance in the target micro-service; in other embodiments, the instance to be adjusted may also be multiple, i.e., the routing rules indicating that the micro-service system needs to adjust the routing rules of multiple instances in the target micro-service.
In S102, in response to the routing adjustment instruction, a routing policy is generated based on the routing adjustment policy corresponding to the to-be-adjusted instance and the label information of the to-be-adjusted instance.
Here, the tag information of the instance to be adjusted is used to characterize attribute information of the instance. In some embodiments, the attribute information may include at least one of: environment information, version information, mapping relation of environment version and tenant information of the instance. The environment information is used for representing the environment type of the instance. The environment type may be a formal environment or a test environment, for example. The version information is used to characterize the version number of the instance. Illustratively, instance A has a version number of V1.0 and instance B has a version number of V2.0. The mapping relation of the environment version is used for representing the relation between the environment information and the version information of the instance. Illustratively, the version number V1.0 of instance A represents that instance A is in a formal environment and the version number V2.0 of instance B represents that instance B is in a test environment.
In this embodiment of the present application, according to a routing adjustment policy corresponding to an instance to be adjusted carried in a routing adjustment instruction, a routing policy may be generated based on label information of the instance to be adjusted. Wherein the routing policy is for routing call requests for the target microservice to target instances in the target microservice. That is, the micro service system in the embodiment of the present application may adjust the routing rule of any one micro service in the micro service system at any time according to the service requirement (i.e. the routing adjustment instruction), so when receiving the call request of the micro service for adjusting the routing rule, the call request may be routed to the target instance corresponding to the service requirement based on the new routing rule.
In S103, a call request for the target micro-service is routed to a target instance of the at least one instance based on the routing policy.
Here, the target instance in at least one instance refers to an instance corresponding to the routing policy, that is, an instance to which the routing adjustment instruction wants to route the call request for the target micro service.
In the embodiment of the application, the call request for the target micro-service can be routed to the target instance according to the mode of routing the call request in the routing policy.
The micro service system in the embodiment of the application receives a routing adjustment instruction carrying a routing adjustment strategy corresponding to an instance to be adjusted in at least one instance aiming at a target micro service in the micro service system; then, the micro service system responds to the routing adjustment instruction, and generates a routing strategy based on the routing adjustment strategy corresponding to the instance to be adjusted and the label information of the instance to be adjusted; and finally, the micro service system routes the call request aiming at the target micro service to the target instance based on the routing strategy. In this way, after receiving the routing adjustment instruction, the micro-service system in the embodiment of the application can complete the routing modification based on the routing adjustment instruction carried in the routing adjustment instruction and the label information of the instance to be adjusted, so that the problem that in the related art, when the routing configuration is modified, the service is waited to be restarted, thereby influencing the normal access of the on-line user is solved, and the micro-service system realizes the modification of the routing configuration under the condition that the calling request is not influenced, that is, the user does not feel.
In some embodiments, the call request carries domain name information; prior to S103, the routing method may further include: receiving a call request; determining a target micro service corresponding to the domain name information in at least one micro service in a micro service system; and routing the call request to the target micro-service.
In the embodiment of the present application, the target micro-service may be determined based on the domain name information carried by the call request, and after the call request is routed to the target micro-service, the call request is routed to the target instance of the target micro-service based on the routing policy. In this way, the efficiency and accuracy of routing requests may be improved.
Fig. 2 is a second flowchart of an alternative routing method provided in the embodiment of the present application, and based on fig. 1, the routing adjustment policy is used to indicate updating the label information of the to-be-adjusted instance to target label information; the target instance comprises the instance to be adjusted; s102 in fig. 1 may be implemented by S201, S103 may be implemented by S202, and the steps shown in fig. 2 will be described.
In S201, in response to the routing adjustment instruction, the tag information of the to-be-adjusted instance is updated to target tag information, and a first routing policy for routing a call request carrying the target tag information to the to-be-adjusted instance is generated.
Here, the target tag information refers to tag information carried in the call request, and is used for characterizing a call intention of a client that sends the call request. That is, when the client generates the call request, the target tag information may be set in the call request according to the requirement, which represents an instance that the client wants to call matching the target tag information.
Therefore, in order to adjust the routing rule of the target micro service under the condition that the client does not feel, the embodiment of the application can update the label information of the to-be-adjusted instance into the target label information according to the call request carrying the target label information, wherein the original label information of the to-be-adjusted instance is different from the target label information. That is, the micro-service system may route a call request that does not call the instance to be adjusted into the instance to be adjusted by modifying the tag information of the instance to be adjusted, in which process the user is unaware.
One of the scenarios to which the embodiments of the present application apply may be that the new version instance is fully online. Illustratively, the micro service a currently has an instance 1, and the tag information of this instance 1 is V1.0, which represents an instance of a formal version. At this point, instance 2 of V2.0 of microservice a is online in the microservice system, representing an instance of the test version. Through testing, example 2 of V2.0 can be fully online, i.e. can be changed from the example of the test version to the example of the formal version. Because the client still sends the call request carrying V1.0, the call request carrying V1.0 cannot call instance 2 of V2.0. If the call request is modified or a request for modifying the tag is sent to the client, the user can feel the request, and the current service request is influenced. In order not to affect the current service request, the micro service system may modify the label of the instance 2, that is, update V2.0 of the instance 2 to V1.0, and then offline the instance 1, so that after receiving the call request carrying V1.0, the call request may be routed to the instance 2, thereby implementing adjustment of the routing rule of the micro service a without perception by the client.
In some embodiments, the tag information of the instance to be adjusted in S201 may be version information.
In some embodiments, in addition to updating the tag information that is version information in the instance to be adjusted, at least one of the environment information and the mapping relationship of the environment version may be updated. For example, when V2.0 of example 2 is updated to V1.0, the environment information characterizing the test environment of example 2 may be updated to the environment information characterizing the formal environment, and/or the mapping relationship of V2.0 to the test environment may be updated to the mapping relationship of V1.0 to the formal environment.
In some embodiments, the label information of the instance to be adjusted in S201 is also tenant information.
The scenario to which the embodiment of the present application applies may be to make the call request call more instances belonging to different tenants. Illustratively, the tag information carried in the call request is a tenant (x-tenant: a), that is, the call request is routed to an instance belonging to a tenant. According to business requirements, it is desirable to route the call request to an instance with label information of b tenant (x-tenant: a), and at this time, the b tenant in the instance can be updated to a tenant. Thus, when a call request is received, the call request can be routed to instances belonging to a-tenants and b-tenants.
In some embodiments, the label information of the instance to be adjusted in S201 may be version information and tenant information. Namely, the version information of the instance to be adjusted and the tenant information are simultaneously modified.
In some embodiments, after S201, the routing method may further include: and deleting the instance which corresponds to the target tag information and is different from the instance to be adjusted. In this way, it is possible to reduce the case where the routing fails due to the presence of two instances of the same tag information in the same micro service.
In S202, a call request for the target micro-service is routed to an instance to be adjusted of the at least one instance based on the first routing policy.
In the embodiment of the application, the call request can be routed to the instance to be adjusted based on the target tag information carried in the call request. In some embodiments, the address information of the instance to be adjusted may be determined based on the target tag information, and then the call request may be routed into the instance to be adjusted based on the address information of the instance to be adjusted.
In this embodiment of the present application, the tag information of the to-be-adjusted instance may be updated to target tag information, and a first routing policy for routing a call request carrying the target tag information to the to-be-adjusted instance may be generated. In this way, through updating the label information of the instance to be adjusted, the call request which does not call the instance to be adjusted can be routed to the instance to be adjusted, so that the version replacement of the instance is realized under the condition that the user does not feel.
Fig. 3 is a schematic flowchart third of an alternative routing method provided in the embodiment of the present application, and based on fig. 1, the to-be-adjusted instances include a first to-be-adjusted instance and a second to-be-adjusted instance; the label information comprises first label information of the first instance to be adjusted and second label information of the second instance to be adjusted; the route adjustment strategy is used for indicating that the access weight of the first instance to be adjusted and the access weight of the second instance to be adjusted are respectively updated into a first access weight and a second access weight; the target instance comprises the first instance to be adjusted and a second instance to be adjusted; s102 in fig. 1 may be implemented by S301, S103 may be implemented by S302, and the steps shown in fig. 3 will be described.
In S301, in response to the routing adjustment instruction, based on the first tag information of the first to-be-adjusted instance and the second tag information of the second to-be-adjusted instance, the access weight of the first to-be-adjusted instance and the access weight of the second to-be-adjusted instance are updated to be the first access weight and the second access weight, respectively, and a second routing policy for routing the call request without carrying tag information to the first to-be-adjusted instance or the second to-be-adjusted instance according to the first access weight and the second access weight is generated.
Here, the access weight is used to characterize the probability that the corresponding instance is accessed, that is, the access weight of the first instance to be adjusted is used to characterize the probability that the first instance to be adjusted is invoked, and the access weight of the second instance to be adjusted is used to characterize the probability that the second instance to be adjusted is invoked.
In some embodiments, the access weight of the first instance to be adjusted is the same as the access weight of the second instance to be adjusted, that is, the probability that the first instance to be adjusted is accessed is the same as the probability that the second instance to be adjusted is accessed. It should be noted that, the call request for accessing the first instance to be adjusted and the second instance to be adjusted does not carry tag information. Because when the call request carries tag information, the call request is routed to the corresponding instance based on the carried tag information, and the access weight corresponding to the instance is irrelevant. When the call request does not carry tag information, the call request can be routed to the corresponding instance according to the access weight of each instance.
Here, the first access weight is different from the second access weight, that is, the same access weight may be updated to a different access weight. In some embodiments, different access weights may also be updated to the same access weight. In other embodiments, different access weights may also be updated to other and different access weights.
In this embodiment of the present application, in response to the routing adjustment instruction, the access weight of the first to-be-adjusted instance may be determined based on the first tag information of the first to-be-adjusted instance; determining the access weight of the second instance to be adjusted based on the second tag information of the second instance to be adjusted; and then updating the access weight of the first instance to be adjusted and the access weight of the second instance to be adjusted into a first access weight and a second access weight respectively, and generating a second routing strategy for routing the call request which does not carry the tag information to the first instance to be adjusted or the second instance to be adjusted according to the first access weight and the second access weight.
One of the scenarios to which the embodiments of the present application apply may be that the new version instance is online in a small scope. Illustratively, the micro service a currently has an instance 1, and the tag information of this instance 1 is V1.0, which represents an instance of a formal version. At this point, instance 2 of V2.0 of microservice a is online in the microservice system, representing an instance of the test version. At this point, example 2 of V2.0 needs to be tested, i.e., a small range line, before example 2 of V2.0 is fully on line. Under normal circumstances, the access weights of instance 1 and instance 2 are the same, so that when instance 2 is problematic, more users may be affected. So the micro service system can update the access weight of both instance 1 and instance 2 to 1, with the access weight of instance 1 being 9 and the access weight of instance 2 being 1. In this way, a small-scale online of instance 2 without user awareness can be achieved, thereby testing instance 2 without affecting user access.
In S302, a call request for the target micro-service is routed to the first instance to be adjusted or the second instance to be adjusted based on the second routing policy.
In this embodiment of the present application, a call request for a target micro service may be routed to a first instance to be adjusted or a second instance to be adjusted according to a first access weight of the first instance to be adjusted and a second access weight of the second instance to be adjusted, which are determined based on an adjustment instruction.
In this embodiment of the present application, based on the first tag information of the first to-be-adjusted instance and the second tag information of the second to-be-adjusted instance, the access weight of the first to-be-adjusted instance and the access weight of the second to-be-adjusted instance may be updated to the first access weight and the second access weight, respectively, to generate a second routing policy for routing, according to the first access weight and the second access weight, a call request that does not carry tag information to the first to-be-adjusted instance or the second to-be-adjusted instance. In this way, the access weight of the first instance to be adjusted and the access weight of the second instance to be adjusted are updated, so that the new version instance in the first instance to be adjusted and the new version instance in the second instance to be adjusted are online under the condition that the user does not feel.
Fig. 4 is a schematic flowchart of an alternative routing method provided in the embodiment of the present application, and based on fig. 3, the number of call requests is greater than or equal to 2; s302 in fig. 3 may be implemented by S401 and S402.
In S401, the call request is routed to the first instance to be adjusted until the number of call requests routed to the first instance to be adjusted is equal to the first access weight, and the call request is routed to the second instance to be adjusted until the number of call requests routed to the second instance to be adjusted is equal to the second access weight; the first access weight is greater than the second access weight.
In S402, the above-mentioned routing process is repeated until at least two of the call requests are routed to the first instance to be adjusted or the second instance to be adjusted.
In this embodiment, after receiving the call request, the call request may be routed to the instance with the larger weight by comparing the first access weight and the second access weight, and because the first access weight is greater than the second access weight, the call request is routed to the first instance to be adjusted first until the number of call requests routed to the first instance to be adjusted is equal to the first access weight. At this time, the call request may be routed to the second instance to be adjusted until the number of call requests routed to the second instance to be adjusted is equal to the second access weight.
Illustratively, when the first access weight is 9 and the second access weight is 1, because the first access weight is greater than the second access weight, the call request is routed to the first instance to be adjusted until the number of call requests routed to the first instance to be adjusted is 9, at which time the next call request is routed to the second instance to be adjusted until the number of call requests routed to the second instance to be adjusted is 1. Thus, the number of call requests routed to the first instance to be adjusted is 9 and the number of call requests routed to the second instance to be adjusted is 1.
In this embodiment of the present application, a call request may be routed to a first instance to be adjusted until the number of call requests routed to the first instance to be adjusted is equal to a first access weight, and a call request may be routed to a second instance to be adjusted until the number of call requests routed to the second instance to be adjusted is equal to a second access weight; the first access weight is greater than the second access weight; the above routing process is repeated until at least two call requests are routed to the first instance to be adjusted or the second instance to be adjusted. Therefore, the routing of the call requests with the corresponding number to the corresponding examples according to the preset access weight can be realized, and the accuracy of the routing call requests is improved.
In some embodiments, after S301 or S402, the routing method may further include step 1 and step 2:
and step 1, deleting the examples except the test examples in the first to-be-adjusted example and the second to-be-adjusted example under the condition that the test examples in the first to-be-adjusted example and the second to-be-adjusted example pass the test.
In this embodiment of the present application, the test case may be a case with a smaller access weight in the first to-be-adjusted case and the second to-be-adjusted case. In this way, it is possible to combine the small-scale user experience with the application performance to decide whether to bring a new version online on a large scale. In some embodiments, the test case may be a case with a larger access weight in the first to-be-adjusted case and the second to-be-adjusted case, so that the newly-online case may be tested by introducing a larger number of call requests.
In the embodiment of the application, the examples except the test example in the first to-be-adjusted example and the second to-be-adjusted example are deleted, so that the comprehensive online of the test example can be realized.
And step 2, based on the label information of the test case, other call requests aiming at the target micro-service are routed to the test case.
In some embodiments, when no tag information is carried in other call requests for the target micro-service, address information of the test case may be determined based on the tag information of the test case; other call requests for the target micro-service are routed to the test case based on the address information of the test case.
In some embodiments, in a case where the tag information carried by the other call request is different from the tag information of the test case, step 2 may be implemented through step 21 and step 22:
and step 21, updating the label information of the test case into the label information carried by the other calling requests.
And step 22, based on the updated label information of the test case, other call requests aiming at the target micro service are routed to the test case.
In the embodiment of the application, because the tag information carried by other call requests is different from the tag information of the test case, other call requests cannot be routed to the test case based on the tag information of the test case. In order to route other call requests to the test case without perception by the user, the tag information of the test case may be updated to tag information carried by other call requests.
In the embodiment of the application, the label information of the test case can be updated to the label information carried by other calling requests; and then, based on the updated label information of the test case, other call requests aiming at the target micro service are routed to the test case. Therefore, the label information of the test case can be updated, so that the test case can be comprehensively online under the condition that a user does not feel.
In some embodiments, after the step S402, the routing method may further include step 3 and step 4:
step 3, obtaining a forwarding rule corresponding to the target micro-service; the forwarding rule is used for indicating the target micro-service to forward the call request to other micro-services; the other micro-services include at least one other instance.
Here, the forwarding rule is used to instruct the target micro-service to forward the call request to other micro-services. Since in a practical scenario, each call request will not only call one micro-service, after routing the call request to the target micro-service, a forwarding rule corresponding to the target micro-service may be obtained, which is also a routing rule that may determine the next routing target of the call request after being routed to the target micro-service, i.e. the other micro-services described above.
In some embodiments, the manner of obtaining the forwarding rule corresponding to the target micro service may be to determine, based on the micro service name of the target micro service, the forwarding rule corresponding to the micro service name in the forwarding rule set.
And step 4, forwarding the call request for the target micro-service to the other micro-service based on the forwarding rule.
In the embodiment of the application, after determining that the next route target of the call request after the call request is routed to the target micro service is the other micro service based on the forwarding rule, it is required to determine which other instance of the other micro service to forward the call request to.
In some embodiments, the other instances of the target to which the call request is forwarded may be determined based on whether tag information is carried in the call request.
In the case that the call request carries the target tag information, the tag indicating the instance in the micro service that the client desires the call request to access is the target tag information, and the target tag information may be version information of the instance or tenant information to which the instance belongs.
Thus, step 4 may comprise: under the condition that the call request carries target tag information, determining other target instances matched with the target tag information in at least one other instance based on the target tag information; and forwarding the call request to other target examples based on the address information of the other target examples.
In this embodiment, after determining, in at least one other instance, the other instance of the target that matches the target tag information, an address information set including address information of all other instances may be obtained, then, based on the target tag information, the address information of the other instance of the target is determined in the address information set, and finally, based on the address information of the other instance of the target, the call request is forwarded to the other instance of the target.
In some embodiments, the call request may also be without tag information, and in the case where the call request does not carry tag information and the number of call requests is 2 or more, at least two call requests may be routed to at least two other instances based on the polling algorithm.
Here, the polling algorithm refers to an algorithm that alternately routes at least two call requests to at least two other instances.
In the embodiment of the application, a forwarding rule corresponding to a target micro-service is acquired; the forwarding rule is used for indicating the target micro-service to forward the call request to other micro-services; other micro-services include at least one other instance; and forwarding the call request for the target micro-service to other micro-services based on the forwarding rule. In this way, the forwarding method provided by the embodiment of the application can forward the call request to other micro services corresponding to the forwarding rule, so that the accuracy of the routing call request is improved.
Fig. 5 is a schematic view of a scenario of a routing method provided in an embodiment of the present application, where, as shown in fig. 5, a micro service system 52 includes a service gateway 521, a service construction publishing unit 522, a routing management unit 523, a first micro service 524, a second micro service 525, and a third micro service 526, where the service gateway 521 is configured to receive a call request sent by a client, and route the call request to a micro service corresponding to domain name information based on domain name information carried in the call request; the service construction issuing unit 522 is configured to issue a micro service in the micro service system, and generate a service tag when issuing the micro service, the service tag including at least one of: the current environment, version information, release information and tenant information of the instance in the micro-service. The routing management unit 523 is configured to modify a service label of the micro service, modify a routing rule of the micro service, and cache the modified service label and the modified routing rule into a routing component of the corresponding micro service. The routing component is configured to route the call request to the corresponding micro-service instance based on the modified service tag and the modified routing rule.
As shown in fig. 5, a client (not shown) sends a first invocation request 51 to the micro-service system 52, which first invocation request 51 may be "https:// a.svc/hello"; wherein, the header of the first call request 51 carries "x-tenant: a "and" x-app-version: v1.1", the label information representing that the first call request 51 needs to call tenant information as" x-tenant: a "and version information are" x-app-version: v 1.1'. First, the service gateway is based on the "x-tenant" carried by the tag in the first invoke sub-request 511: a "routes the first call request 51 to the first micro service 524; wherein the first invoke sub-request 511 may be "http:// python. A. Svc:8080/doSome"; the first micro service 524 is tenant information of "x-tent: a', micro-services. The first microservice 524 may be a python microservice and a nodejs microservice. Then, based on the forwarding rules corresponding to the first micro service 524 and the "x-app-version" carried by the tag in the second invoke sub-request 512: v1.1", the version information in routing the first call request 51 to the third micro service 526 is" x-app-version: v1.1 "micro service instance; wherein the second invoke sub-request 512 may be "http:// python. A. Svc:8080/doSome".
As shown in fig. 5, a client (not shown) sends a second call request 53 to the micro-service system 52, the second call request 53 being implemented by "https:// a.svc/hello"; wherein, the header of the second call request 53 carries "x-tenant: b "and" x-app-version: v1.2", the label information representing that the second call request 53 needs to call tenant information as" x-tenant: b "and version information is" x-app-version: v 1.2'. First, the service gateway is based on the "x-tenant" carried by the tag in the third invoke sub-request 531: b "routing the second call request 53 to the second micro service 525; wherein, the third call sub-request 531 may be http:// python.a. svc 8080/doSome; the second micro service 525 is tenant information of "x-tent: b'. The second micro-service 525 may be a dotnet micro-service as well as a php micro-service. Then, based on the forwarding rule corresponding to the third micro service 526 and the "x-app-version" carried by the tag in the fourth call sub-request 532: v1.2", the version information in routing the second call request 53 to the third micro service 526 is" x-app-version: v1.2 "micro service instance; the fourth invoke sub-request 532 may be http:// python. A. Svc 8080/doSome, among others.
In this embodiment, if the micro service system 52 receives a routing adjustment instruction, the routing adjustment instruction is used to indicate that the first call request needs to access the tag information as "x-tenant: b ", in order to realize that the first call request access tag information is" x-tenant "in the case that the client does not feel: b ", the routing management unit 523 may modify the instance label of the instance in the second micro service by" x-tenant: a). Thus, because the first call request carries "x-tenant: a ", the first call request may be routed to an instance in the second micro-service based on tag information carried in the first call request.
Fig. 6 is a schematic diagram of a composition structure of a micro service system according to an embodiment of the present application, as shown in fig. 6, the micro service system 52 includes: a service gateway 521, a service construction issuing unit 522, a route management unit 523, and a plurality of micro services 63; wherein,
in the release phase of a plurality of micro services:
the a tenant 61 and the B tenant 62 first send a request for applying to issue a micro service to the micro service system 52; after receiving a request for applying for publishing a micro service, service gateway 521 may forward the request to service build publication unit 522, and then service build publication unit 522 for code build and service publication; wherein the code build representation submits the code to the code repository; the service release represents a templated request tag and a service tag. That is, the service construction issuing unit 522 may issue the micro service instance corresponding to the a tenant 61 in the micro service system, and the tag information of the micro service instance corresponding to the a tenant 61 may be "x-tenant: a ", and publishing the micro service instance corresponding to the B tenant 62, the tag information of the micro service instance corresponding to the B tenant 62 may be" x-tenant: b). That is, the plurality of micro services 63 may include a plurality of micro services customized by the a tenant 61, and a plurality of micro services customized by the B tenant 62.
As shown in fig. 6, the "tenant" may be further automatically added to the micro service instance corresponding to the a tenant 61 and the micro service instance corresponding to the B tenant 62 by the "standard micro service: standard "tag information.
In this embodiment of the present application, after a plurality of micro services are released, the self information may be registered in the route management unit, where the registration information includes a micro service name, tag information of the micro service instance, and address information of the micro service instance. The route management unit is used for cluster service route management, namely, generating a route rule based on registration information of a plurality of micro services.
In this embodiment of the present application, each micro service further corresponds to a lightweight routing component, and each micro service instance and the routing component corresponding to each micro service are all run in the micro service system in a container form. The routing management unit may also cache registration information for each micro-service and the generated routing rules into each routing component. When the call request is routed to the target micro-service, the routing component corresponding to the target micro-service may route the call request to the target instance in the target micro-service based on the routing rule, and may forward the call request to other micro-services based on the routing rule and the registration information of each micro-service.
Fig. 7 is a schematic diagram of a second component structure of a micro service system according to the embodiment of the present application, as shown in fig. 7, the micro service system 52 includes a target micro service 72, a routing component 71 corresponding to the target micro service 72, and a routing management unit 523; wherein,
the route management unit 523 is configured to receive a route adjustment instruction for a target micro service in the micro service system; the target micro-service comprises at least one instance, and a routing adjustment strategy corresponding to an instance to be adjusted in at least one instance carried by the routing adjustment instruction;
the route management unit 523 is further configured to generate a route policy based on a route adjustment policy corresponding to the to-be-adjusted instance and label information of the to-be-adjusted instance, and cache the route policy to a route component corresponding to the target micro-service in response to the route adjustment instruction;
the routing component 71 is configured to route a call request for the target micro service to a target instance of the at least one instance based on the routing policy.
In some embodiments, the route adjustment policy is used to instruct updating tag information of the instance to be adjusted to target tag information; the target instance comprises the instance to be adjusted; the routing management unit 523 is further configured to update the label information of the to-be-adjusted instance to target label information, and generate a first routing policy for routing a call request carrying the target label information to the to-be-adjusted instance.
In some embodiments, the instance to be adjusted includes a first instance to be adjusted and a second instance to be adjusted; the label information comprises first label information of the first instance to be adjusted and second label information of the second instance to be adjusted; the route adjustment strategy is used for indicating that the access weight of the first instance to be adjusted and the access weight of the second instance to be adjusted are respectively updated into a first access weight and a second access weight; the target instance includes the first instance to be adjusted and a second instance to be adjusted.
The routing management unit 523 is further configured to update the access weight of the first to-be-adjusted instance and the access weight of the second to-be-adjusted instance to a first access weight and a second access weight respectively based on the first tag information of the first to-be-adjusted instance and the second tag information of the second to-be-adjusted instance, and generate a second routing policy for routing a call request that does not carry tag information to the first to-be-adjusted instance or the second to-be-adjusted instance according to the first access weight and the second access weight.
In some embodiments, the number of call requests is 2 or more; the routing component 71 is further configured to route the call request to the first instance to be adjusted until the number of call requests routed to the first instance to be adjusted is equal to the first access weight, and route the call request to the second instance to be adjusted until the number of call requests routed to the second instance to be adjusted is equal to the second access weight; the first access weight of the first instance to be adjusted is greater than the second access weight of the second instance to be adjusted; the above routing process is repeated until at least two of the call requests are routed to the first instance to be adjusted or the second instance to be adjusted.
In some embodiments, the micro-service system further comprises: a deletion unit; the deleting unit is configured to delete an instance except for the test instance in the first to-be-adjusted instance and the second to-be-adjusted instance when the test instance in the first to-be-adjusted instance and the second to-be-adjusted instance passes a test; the routing component 71 is further configured to route other call requests for the target micro service to the test case based on the tag information of the test case.
In some embodiments, when the tag information carried by the other call request is different from the tag information of the test case, the routing management unit 523 is further configured to update the tag information of the test case to the tag information carried by the other call request, and cache the updated tag information to the routing component; the routing component 71 is further configured to route other call requests for the target micro service to the test case based on the updated label information of the test case.
In some embodiments, the routing component 71 is further configured to obtain a forwarding rule corresponding to the target micro-service; the forwarding rule is used for indicating the target micro-service to forward the call request to other micro-services; the other micro-services include at least one other instance; forwarding the call request for the target micro-service to the other micro-service based on the forwarding rule.
The description of the apparatus embodiments above is similar to that of the method embodiments above, with similar benefits to the same method embodiments. In some embodiments, functions or modules included in the apparatus provided in the embodiments of the present application may be used to perform the methods described in the embodiments of the methods, and for technical details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the description of the embodiments of the methods of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the routing method is implemented in the form of a software functional module, and sold or used as a separate product, the routing method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or portions contributing to the related art, and the software product may be stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the present application are not limited to any specific hardware, software, or firmware, or to any combination of hardware, software, and firmware.
The embodiment of the application provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program capable of running on the processor, and the processor executes the program to realize part or all of the steps of the method.
Embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs some or all of the steps of the above-described method. The computer readable storage medium may be transitory or non-transitory.
Embodiments of the present application provide a computer program comprising computer readable code which, when run in a computer device, performs some or all of the steps for implementing the above method.
Embodiments of the present application provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program which, when read and executed by a computer, performs some or all of the steps of the above-described method. The computer program product may be realized in particular by means of hardware, software or a combination thereof. In some embodiments, the computer program product is embodied as a computer storage medium, in other embodiments the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It should be noted here that: the above description of various embodiments is intended to emphasize the differences between the various embodiments, the same or similar features being referred to each other. The above description of apparatus, storage medium, computer program and computer program product embodiments is similar to that of method embodiments described above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus, storage medium, computer program and computer program product of the present application, please refer to the description of the method embodiments of the present application.
It should be noted that, fig. 8 is a schematic diagram of a hardware entity of a computer device in the embodiment of the present application, as shown in fig. 8, the hardware entity of the computer device 800 includes: a processor 801, a communication interface 802, and a memory 803, wherein:
the processor 801 generally controls the overall operation of the computer device 800.
The communication interface 802 may enable the computer device to communicate with other terminals or servers over a network.
The memory 803 is configured to store instructions and applications executable by the processor 801, and may also cache data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or processed by various modules in the processor 801 and the computer device 800, which may be implemented by a FLASH memory (FLASH) or a random access memory (Random Access Memory, RAM). Data may be transferred between processor 801, communication interface 802, and memory 803 via bus 804.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence number of each step/process described above does not mean that the execution sequence of each step/process should be determined by the function and the internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units; can be located in one place or distributed to a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the integrated units described above may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the related art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The foregoing is merely an embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered in the protection scope of the present application.

Claims (10)

1. A routing method, characterized in that,
the method is applied to a micro-service system; the routing method comprises the following steps:
receiving a routing adjustment instruction for a target micro service in the micro service system; the target micro-service comprises at least one instance, and the routing adjustment instruction carries a routing adjustment strategy corresponding to an instance to be adjusted in at least one instance;
responding to the routing adjustment instruction, and generating a routing strategy based on the routing adjustment strategy corresponding to the instance to be adjusted and the label information of the instance to be adjusted; the label information of the instance to be adjusted is used for representing attribute information of the instance;
routing a call request for the target micro-service to an instance to be adjusted in the at least one instance based on the routing policy; the route adjustment strategy is used for indicating to update the label information of the instance to be adjusted into target label information;
The generating a routing policy based on the routing adjustment policy corresponding to the to-be-adjusted instance and the label information of the to-be-adjusted instance includes:
updating the label information of the to-be-adjusted instance into target label information, and generating a first routing strategy for routing a call request carrying the target label information to the to-be-adjusted instance; and updating the label information of the instance to be regulated into target label information according to the call request carrying the target label information.
2. The routing method of claim 1, wherein,
the tag information includes at least one of the following information: version information of the instance to be adjusted and tenant information of the instance to be adjusted.
3. The routing method of claim 1, wherein,
the to-be-adjusted examples comprise a first to-be-adjusted example and a second to-be-adjusted example; the label information comprises first label information of the first instance to be adjusted and second label information of the second instance to be adjusted;
the route adjustment strategy is used for indicating that the access weight of the first instance to be adjusted and the access weight of the second instance to be adjusted are respectively updated into a first access weight and a second access weight;
The to-be-adjusted instance comprises the first to-be-adjusted instance and a second to-be-adjusted instance;
the generating a routing policy based on the routing adjustment policy corresponding to the to-be-adjusted instance and the label information of the to-be-adjusted instance includes:
based on the first tag information of the first instance to be adjusted and the second tag information of the second instance to be adjusted, the access weight of the first instance to be adjusted and the access weight of the second instance to be adjusted are respectively updated into a first access weight and a second access weight, and a second routing strategy for routing the call request without the tag information to the first instance to be adjusted or the second instance to be adjusted according to the first access weight and the second access weight is generated.
4. The routing method of claim 3, wherein,
the number of the call requests is more than or equal to 2; the routing, based on the routing policy, a call request for the target micro-service to an instance to be adjusted of the at least one instance, including:
routing the call request to the first instance to be adjusted until the number of call requests routed to the first instance to be adjusted is equal to the first access weight, and routing the call request to the second instance to be adjusted until the number of call requests routed to the second instance to be adjusted is equal to the second access weight; the first access weight of the first instance to be adjusted is greater than the second access weight of the second instance to be adjusted;
The above routing process is repeated until at least two of the call requests are routed to the first instance to be adjusted or the second instance to be adjusted.
5. The routing method according to claim 3 or 4, wherein,
the routing method further comprises the following steps:
deleting the first instance to be adjusted and the second instance to be adjusted except the test instance under the condition that the test instance test in the first instance to be adjusted and the second instance to be adjusted passes;
based on the label information of the test case, other call requests for the target micro-service are routed to the test case.
6. The routing method of claim 5, wherein,
and when the label information carried by the other call requests is different from the label information of the test case, the routing the other call requests aiming at the target micro service to the test case based on the label information of the test case comprises the following steps:
updating the label information of the test case into the label information carried by the other calling requests;
and based on the updated label information of the test case, other call requests aiming at the target micro service are routed to the test case.
7. The routing method of claim 4, wherein,
the routing method further comprises the following steps:
acquiring a forwarding rule corresponding to the target microservice; the forwarding rule is used for indicating the target micro-service to forward the call request to other micro-services; the other micro-services include at least one other instance;
forwarding the call request for the target micro-service to the other micro-service based on the forwarding rule.
8. A micro-service system is characterized in that,
the micro service system comprises a target micro service, a routing component corresponding to the target micro service and a routing management unit; wherein,
the route management unit is used for receiving a route adjustment instruction aiming at the target micro service; the target micro-service comprises at least one instance, and a routing adjustment strategy corresponding to an instance to be adjusted in at least one instance carried by the routing adjustment instruction;
the route management unit is further configured to generate a route policy based on a route adjustment policy corresponding to the to-be-adjusted instance and tag information of the to-be-adjusted instance, and cache the route policy to the route component in response to the route adjustment instruction; the label information of the instance to be adjusted is used for representing attribute information of the instance;
The routing component is configured to route a call request for the target micro service to an instance to be adjusted in the at least one instance based on the routing policy;
the route adjustment strategy is used for indicating to update the label information of the instance to be adjusted into target label information;
the generating a routing policy based on the routing adjustment policy corresponding to the to-be-adjusted instance and the label information of the to-be-adjusted instance includes:
updating the label information of the to-be-adjusted instance into target label information, and generating a first routing strategy for routing a call request carrying the target label information to the to-be-adjusted instance;
and updating the label information of the instance to be regulated into target label information according to the call request carrying the target label information.
9. A routing device, characterized in that,
comprising the following steps:
a memory for storing executable instructions;
a processor for implementing the method of any one of claims 1 to 7 when executing executable instructions stored in said memory.
10. A storage medium, characterized in that,
the storage medium having stored thereon executable instructions which when executed by a processor implement the method of any of claims 1 to 7.
CN202311518483.XA 2023-11-15 2023-11-15 Routing method, micro-service system, device and storage medium Active CN117255136B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311518483.XA CN117255136B (en) 2023-11-15 2023-11-15 Routing method, micro-service system, device and storage medium
CN202410186864.0A CN118175209A (en) 2023-11-15 2023-11-15 Routing method, micro-service system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311518483.XA CN117255136B (en) 2023-11-15 2023-11-15 Routing method, micro-service system, device and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202410186864.0A Division CN118175209A (en) 2023-11-15 2023-11-15 Routing method, micro-service system, device and storage medium

Publications (2)

Publication Number Publication Date
CN117255136A CN117255136A (en) 2023-12-19
CN117255136B true CN117255136B (en) 2024-02-27

Family

ID=89135316

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311518483.XA Active CN117255136B (en) 2023-11-15 2023-11-15 Routing method, micro-service system, device and storage medium
CN202410186864.0A Pending CN118175209A (en) 2023-11-15 2023-11-15 Routing method, micro-service system, device and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202410186864.0A Pending CN118175209A (en) 2023-11-15 2023-11-15 Routing method, micro-service system, device and storage medium

Country Status (1)

Country Link
CN (2) CN117255136B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800780A (en) * 2017-10-10 2018-03-13 深圳乐信软件技术有限公司 data service method, device, storage medium and computer equipment
WO2020237797A1 (en) * 2019-05-31 2020-12-03 烽火通信科技股份有限公司 Dynamic configuration management method and system in microservice framework
CN112905210A (en) * 2021-03-24 2021-06-04 青岛聚看云科技有限公司 Server and gray scale publishing method
WO2022111313A1 (en) * 2020-11-24 2022-06-02 深圳前海微众银行股份有限公司 Request processing method and micro-service system
CN114924751A (en) * 2022-05-05 2022-08-19 北京电解智科技有限公司 Method and device for distributing service access request flow
CN115766441A (en) * 2022-10-26 2023-03-07 北京奇艺世纪科技有限公司 Service instance publishing method and device, electronic equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800780A (en) * 2017-10-10 2018-03-13 深圳乐信软件技术有限公司 data service method, device, storage medium and computer equipment
WO2020237797A1 (en) * 2019-05-31 2020-12-03 烽火通信科技股份有限公司 Dynamic configuration management method and system in microservice framework
WO2022111313A1 (en) * 2020-11-24 2022-06-02 深圳前海微众银行股份有限公司 Request processing method and micro-service system
CN112905210A (en) * 2021-03-24 2021-06-04 青岛聚看云科技有限公司 Server and gray scale publishing method
CN114924751A (en) * 2022-05-05 2022-08-19 北京电解智科技有限公司 Method and device for distributing service access request flow
CN115766441A (en) * 2022-10-26 2023-03-07 北京奇艺世纪科技有限公司 Service instance publishing method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN117255136A (en) 2023-12-19
CN118175209A (en) 2024-06-11

Similar Documents

Publication Publication Date Title
CN112000348B (en) Control method, device and computer equipment for service gray level release
US10235384B2 (en) Servicing database operations using a messaging server
US20210410057A1 (en) Service Discovery Extension in a 5G Mobile Communication Network
CN112311786B (en) Service request processing method and device, storage medium and computing equipment
US8856365B2 (en) Computer-implemented method, computer system and computer readable medium
US8301595B2 (en) Using AMQP for replication
US20130291121A1 (en) Cloud Abstraction
US20090063423A1 (en) User interfaces for service object located in a distributed system
US20110145320A1 (en) Message bus based replication
EP2901302B1 (en) Session-server affinity for clients that lack session identifiers
JP2022520690A (en) Server-based segmentation of subscriber information and content format conversion for target content provisioning
CN111510330B (en) Interface management device, method and storage medium
US8914815B2 (en) Automated framework for tracking and maintaining kernel symbol list types
CN113965543A (en) Access method and device of application server and storage medium
CN113821307B (en) Method, device and equipment for quickly importing virtual machine images
CN114519082A (en) Data processing method and related device
EP2456172B1 (en) Method and apparatus for a distributed search
CN113301005B (en) Data acquisition method and device
CN117255136B (en) Routing method, micro-service system, device and storage medium
US10467143B1 (en) Event-driven cache
CN115774584A (en) Data processing method and device, electronic equipment and storage medium
US11683413B2 (en) Number management system, number management method, number management device and number management program
CN117608677B (en) Plug-in generation method, cloud service system and service access method
US11316949B2 (en) Access management to user related data
CN106657423A (en) Server service discovering method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant