Search

CN-121985028-A - Service processing method, server and service processing system based on multiple service instances

CN121985028ACN 121985028 ACN121985028 ACN 121985028ACN-121985028-A

Abstract

The embodiment of the application provides a business processing method, a server and a business processing system based on multiple service instances. The business processing system applied to the multiple service instances comprises a plurality of servers deployed in a plurality of geographic subareas, wherein each geographic subarea comprises at least one server, at least one service instance is configured in each server, each geographic subarea is configured with at least two service instances, the business processing system comprises the steps of responding to a business request of a user side, determining a target service instance, processing the business request based on the target service instance to obtain a processing result, returning the processing result to the user side based on the server configured with the target service instance, determining a standby service instance if the processing state of the target service instance is determined to be abnormal, and sending the business request to the standby service instance so that the standby service instance processes the business request to obtain the processing result. The method is used for achieving the effect of improving the reliability of processing the service request.

Inventors

  • WANG LEI
  • ZHANG SHIQIAN
  • LIU KAI
  • LI JUNFENG
  • LONG KAI

Assignees

  • 岚图汽车科技股份有限公司

Dates

Publication Date
20260505
Application Date
20260108

Claims (16)

  1. 1. A business processing method based on multiple service instances is characterized by being applied to a business processing system of the multiple service instances, wherein the business processing system comprises a plurality of servers deployed in a plurality of geographic partitions, each geographic partition comprises at least one server, at least one service instance is configured in each server, and at least two service instances are configured in each geographic partition, and the method comprises the following steps: determining a target service instance in response to a service request of a user side, and processing the service request based on the target service instance to obtain a processing result; If the processing state of the target service instance is abnormal, determining a standby service instance, and sending the service request to the standby service instance so that the standby service instance processes the service request to obtain a processing result, wherein the processing state of the standby service instance is healthy.
  2. 2. The method of claim 1, wherein the target service instance is configured with at least one of a start probe, a survive probe, and a ready probe, the detection probe being configured to detect a processing state of the target service instance.
  3. 3. The method of claim 2, wherein determining that the processing state of the target service instance is an abnormal state comprises: Detecting the starting state of the target service instance through the starting probe; When the starting state is an abnormal state, determining that the processing state of the target service instance is an abnormal state; Detecting a ready state of the target service instance by the ready probe and/or detecting a surviving state of the target service instance by the surviving probe when the start-up state is a healthy state; and if the ready state or the survival state is an abnormal state, determining that the processing state of the target service instance is an abnormal state.
  4. 4. A method according to claim 3, wherein determining that the start-up state is an abnormal state comprises: and if the target service instance is determined to not finish the initialization operation after the first preset time, determining that the starting state is an abnormal state.
  5. 5. A method according to claim 3, wherein determining that the ready state is an abnormal state comprises: And if the target service instance is determined to not pass the verification on the verification result of the ready detection rule indicated by the ready probe, determining that the ready state is an abnormal state.
  6. 6. A method according to claim 3, wherein determining that the surviving state is an abnormal state comprises: Detecting whether the target service instance survives or not at a preset frequency; And if the target service instance is not survived, determining that the survived state is an abnormal state, wherein N is an integer greater than 1.
  7. 7. The method of claim 6, wherein if the surviving status is determined to be an abnormal status, the method further comprises: and restarting the target service instance and/or creating a new service instance.
  8. 8. The method of claim 1, wherein the alternate service instance is a newly created service instance; or the standby service instance is a service instance except the target service instance in a geographical zone where the target service instance is located; Or the standby service instance is a service instance configured by one geographic partition in other geographic partitions, wherein the other geographic partitions are geographic partitions except the geographic partition in which the target instance is located in a plurality of geographic partitions.
  9. 9. The method according to any one of claims 1-8, further comprising: Acquiring an operation index of a server configured with the target service instance, wherein the operation index represents the operation pressure of the server for processing the service request; and if the operation index meets the preset condition, creating a new service instance.
  10. 10. The method of claim 9, wherein the operation index comprises at least one of a central processing unit occupancy rate, a memory usage rate, and a custom index.
  11. 11. The method according to any one of claims 1-8, further comprising: When the service instance in the service processing system needs to be subjected to version upgrading, creating a service instance after version upgrading; and if the processing state of the service instance after version upgrading is determined to be the health state, terminating the original service instance in the service processing system.
  12. 12. A multi-service instance based business processing apparatus, comprising: The first processing module is used for responding to the service request of the user side, determining a target service instance, and processing the service request based on the target service instance to obtain a processing result; And the second processing module is used for determining a standby service instance if the processing state of the target service instance is abnormal, and sending the service request to the standby service instance so that the standby service instance processes the service request to obtain a processing result, wherein the processing state of the standby service instance is a health state.
  13. 13. The server is characterized by comprising a memory and a processor; the memory stores computer-executable instructions; the processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-11.
  14. 14. A business processing system of multiple service instances is characterized by comprising a plurality of servers deployed in a plurality of geographic partitions, wherein each geographic partition comprises at least one server, at least one service instance is configured in each server, and at least two service instances are configured in each geographic partition; the service processing system of the multi-service instance is configured to implement the method of any of claims 1-11.
  15. 15. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-11.
  16. 16. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-11.

Description

Service processing method, server and service processing system based on multiple service instances Technical Field The present application relates to the technical field of cloud servers, and in particular, to a service processing method, a server and a service processing system based on multiple service instances. Background With the wave of the digitizing process, the cloud server technology has become a core support technology for various businesses. Services in different fields are introduced into the service processing process of the cloud server. For example, in the field of internet of vehicles, service requests of vehicles need to be processed in real time, and reliability requirements on cloud servers are high. In some technologies, a traditional cloud server architecture adopts a single entity server, a plurality of virtual machines are configured on the entity server, and service instances for processing service requests are deployed on the virtual machines in a load balancing mode. In the technology, when the service instance of the virtual machine fails, the service instance needs to be manually switched or restarted, and if the entity server fails in hardware, the repair time is longer, and the reliability of processing the service request by the cloud server is poor. Therefore, a scheme capable of improving the reliability of processing a service request is needed. Disclosure of Invention The business processing method, the server and the business processing system based on the multi-service instance provided by the embodiment of the application are used for achieving the effect of improving the reliability of processing the business request. In a first aspect, an embodiment of the present application provides a service processing method based on multiple service instances, which is applied to a service processing system of multiple service instances, where the service processing system includes multiple servers deployed in multiple geographic partitions, each geographic partition includes at least one server, at least one service instance is configured in each server, and at least two service instances are configured in each geographic partition, and the method includes: Determining a target service instance in response to a service request of a user side, and processing the service request based on the target service instance to obtain a processing result; If the processing state of the target service instance is abnormal, determining a standby service instance, and sending a service request to the standby service instance so that the standby service instance processes the service request to obtain a processing result, wherein the processing state of the standby service instance is healthy. In one possible implementation, the target service instance is configured with at least one of a start probe, a survive probe, and a ready probe, and the detection probe is used to detect a processing state of the target service instance. In one possible implementation, determining that the processing state of the target service instance is an abnormal state includes: Detecting the starting state of the target service instance through a starting probe; When the starting state is an abnormal state, determining that the processing state of the target service instance is an abnormal state; Detecting a ready state of the target service instance by the ready probe and/or detecting a surviving state of the target service instance by the surviving probe when the start-up state is a healthy state; And if the ready state or the survival state is an abnormal state, determining that the processing state of the target service instance is an abnormal state. In one possible embodiment, determining that the start-up state is an abnormal state includes: if the target service instance is determined to not finish the initialization operation after the first preset time, the starting state is determined to be an abnormal state. In one possible embodiment, determining the ready state as an abnormal state includes: And if the verification result of the ready detection rule indicated by the ready probe of the target service instance is determined to be not passed, determining that the ready state is an abnormal state. In one possible embodiment, determining that the surviving state is an abnormal state comprises: detecting whether the target service instance survives or not at a preset frequency; and if the target service instance is not survived, determining that the survived state is an abnormal state, wherein N is an integer greater than 1. In one possible embodiment, if the survival state is determined to be an abnormal state, the method further comprises: and restarting the target service instance and/or creating a new service instance. In one possible implementation, the standby service instance is a newly created service instance; or the standby service instance is a service instance except the target service instance