Service platform access method, device, equipment and storage medium

By re-establishing domain name resolution and load balancing when switching to the OAM service platform when the Kubernetes service platform is switched to the OAM service platform, the problem of client and service container access link interruption is solved, ensuring the stability of access connections.

CN115242791BActive Publication Date: 2024-12-13TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110405543.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-15
Publication Date
2024-12-13
Estimated Expiration
2041-04-15

AI Technical Summary

Technical Problem

When the Kubernetes service platform is switched to an OAM service platform based on K8S, the access link between the external client and the service container in the OAM service platform is interrupted and cannot be accessed normally.

Method used

The target service platform receives the client's domain name resolution request, performs domain name resolution processing, obtains the access address of the target load balancing gateway, and returns it to the client. The client sends an access request to the target load balancing gateway based on this address, and the target service platform Receive the request and forward the data to the corresponding service container to re-establish the access link.

Benefits of technology

Ensure that users can successfully access the service container in the target service platform using the original external access service domain name and restore access connection between the client and the service container.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115242791B_ABST
    Figure CN115242791B_ABST
Patent Text Reader

Abstract

The present application relates to the field of cloud service technology, and provides a method, device, equipment and storage medium for accessing a service platform to solve the problem of interrupted access links between external clients and service containers in an OAM service platform. The method includes: the target service platform performs domain name resolution processing on the received domain name resolution request to obtain the target gateway access address of the corresponding target load balancing gateway; returns the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and data to be processed to the target load balancing gateway based on the target gateway access address; receives a second service access request sent by the target load balancing gateway, and sends the second service access request to the service container of the corresponding node for processing. Users can still use the original external access service domain name to access the services running in the target service platform after the configuration has been transferred.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Kubernetes (hereinafter referred to as K8S) is an open source container orchestration engine used to manage containerized applications on multiple hosts in a cloud platform. K8S provides a mechanism for application deployment, planning, updating, and maintenance, making the deployment of containerized applications simple and efficient, greatly reducing the workload of daily operation and maintenance.

[0003] With the iteration and upgrading of technology, the K8S service platform can be switched to an open source application model (Open Application Model, OAM) service platform based on K8S. However, the service platform switching solution provided in the relevant technology cannot be applied to the scenario where the K8S service platform is switched to an OAM service platform based on K8S, resulting in the interruption of the access link between the external client and the service container in the OAM service platform.

[0004] In view of this, embodiments of the present application provide a new service platform access method, apparatus, device and storage medium. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device and storage medium for accessing a service platform to solve the problem of access link interruption between an external client and a service container in an OAM service platform.

[0006] In a first aspect, an embodiment of the present application provides a method for accessing a service platform, comprising:

[0007] The target service platform receives the domain name resolution request sent by the client, and performs domain name resolution processing on the original external access service domain name of the service to be accessed in the original service platform carried in the domain name resolution request, and obtains the target gateway access address of the corresponding target load balancing gateway;

[0008] The target service platform returns the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and the data to be processed to the target load balancing gateway based on the target gateway access address;

[0009] The target service platform receives a second service access request sent by the target load balancing gateway, wherein the second service access request carries the data to be processed and target node address information mapped by the original external access service domain name in the target service platform;

[0010] The target service platform sends the data to be processed to the service container of the corresponding node for processing based on the target node address information.

[0011] Optionally, determining a third service identifier of the third service after the transfer configuration based on the second component identifier after the transfer configuration includes:

[0012] If a service is provided on the component corresponding to the second component identifier after the transfer configuration, then based on the second component identifier after the transfer configuration, the component configuration information after the transfer configuration is obtained, and based on the component configuration information after the transfer configuration, the third service identifier after the transfer configuration is obtained;

[0013] If at least two services are provided on the component corresponding to the second component identifier after the transfer configuration, then based on the second component identifier after the transfer configuration and the service configuration information before the transfer configuration, the third service identifier after the transfer configuration is obtained from the component configuration information after the transfer configuration.

[0014] Optionally, the target service platform receives the domain name resolution request sent by the client, including:

[0015] The target service platform obtains the domain name resolution request sent by the client from the domain name resolution load balancing gateway through a locally set domain name resolution node.

[0016] Optionally, the target service platform receives the second service access request sent by the target load balancing gateway, including:

[0017] The target service platform obtains the second service access request sent by the target load balancing gateway through a locally set service access node.

[0018] Optionally, the target service platform sends the data to be processed to a service container of a corresponding node for processing based on the target node address information, including:

[0019] If the second service access request is a request with a four-layer protocol stack, the target node address information of the target node is obtained according to the original external access service domain name, and the second service access request is sent to the service container running on the target node. The service container obtains the data to be processed in the second service access request and processes the data to be processed;

[0020] If the second service access request is a request with a seven-layer protocol stack, the second service access request is sent to the service container running on the service access node according to the preset target seven-layer protocol stack forwarding path information, and the service container obtains the data to be processed in the second service access request and processes the data to be processed.

[0021] In a second aspect, an embodiment of the present application further provides a device for accessing a service platform, including:

[0022] A domain name resolution unit is used to receive a domain name resolution request sent by a client, and perform domain name resolution processing on the original external access service domain name of the service to be accessed in the original service platform carried in the domain name resolution request to obtain a target gateway access address of the corresponding target load balancing gateway;

[0023] A transmission unit, configured to return the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and the data to be processed to the target load balancing gateway based on the target gateway access address;

[0024] A processing unit, configured to receive a second service access request sent by the target load balancing gateway, wherein the second service access request carries the data to be processed and target node address information mapped by the original external access service domain name in the target service platform;

[0025] Based on the target node address information, the data to be processed is sent to the service container of the corresponding node for processing.

[0026] Optionally, before receiving the domain name resolution request sent by the client, the device further includes a first configuration unit, and the first configuration unit is used to:

[0027] Transfer and configure various services provided by the original service platform to the target service platform;

[0028] Obtaining a first service set provided by the original service platform; wherein each first service is a service that requires resetting load balancing information after the transfer configuration;

[0029] For each first service in the first service set, perform the following operations respectively:

[0030] Obtain a first service identifier of the first service after the transfer configuration;

[0031] Based on the first service identifier, obtaining a first container unit tag after the transfer configuration; the first container unit tag is an identifier of a container unit running the first service in the target service platform;

[0032] Associating the first external access service domain name of the first service, the first service identifier and the first container unit tag after the transfer configuration to obtain a corresponding first gateway access address after the transfer configuration;

[0033] The first external access service domain name, the first service identifier, the first container unit tag, and the first gateway access address are associated to obtain load balancing information reset for the one first service.

[0034] Optionally, the first configuration unit is used to:

[0035] Obtain the original load balancing information of the original load balancing gateway before the transfer configuration;

[0036] Based on the respective original load balancing information and the preset load balancing information screening rule, at least the following operations are performed to obtain the first service set:

[0037] If it is determined according to the original load balancing information associated with a service that the access link of the load balancing gateway associated with the service has been reconfigured, then the service is removed from the services;

[0038] If it is determined that the original load balancing information associated with a service indicates that the node running the service before the transfer configuration is located on another service platform, or indicates that the service is running on a component outside the original service platform, then the service is removed from the various services;

[0039] If it is determined that the original load balancing information associated with a service indicates that the original service access request corresponding to the service is a request with a seven-layer protocol stack, then the service is removed from the various services.

[0040] Optionally, the first configuration unit determines that the access link of the load balancing gateway of the service has been reconfigured in the following manner:

[0041] If it is determined that the first external access service domain name included in the original load balancing information of the service has been configured with corresponding target load balancing information, it is determined that the access link of the load balancing gateway of the service has been reconfigured;

[0042] The first configuration unit determines original load balancing information associated with a service in the following manner, indicating that a node running the service before the transfer configuration is located on another service platform, or indicating that the service is running on a component outside the original service platform:

[0043] If no corresponding matching item is obtained in the node configuration information of the original service platform based on the node address information included in the original load balancing information of the one service, it is determined that the node running the one service before the transfer configuration is located on the other service platform, or it is determined that the one service is running on a component outside the original service platform;

[0044] The first configuration unit determines original load balancing information associated with a service in the following manner, indicating that an original service access request corresponding to the service is a request with a seven-layer protocol stack:

[0045] If the access port of the original load balancing gateway included in the original load balancing information of the service and the node access port of the original service platform are both set ports, it is determined that the original service access request corresponding to the service is a request with a seven-layer protocol stack.

[0046] Optionally, the first configuration unit is used to:

[0047] Obtaining a first component identifier of the first service before the configuration is transferred;

[0048] Determine a first component identifier of the first service after the transfer configuration based on the first component identifier before the transfer configuration and the component change comparison information before and after the transfer configuration;

[0049] Based on the first component identifier after the transfer configuration and the first service port information of the first service before the transfer configuration, the first component after the transfer configuration and the first service identifier for the first service are determined.

[0050] Optionally, the first configuration unit is used to:

[0051] If the original service access request corresponding to the first service is a request with a seven-layer protocol stack, obtaining a service address of the first service before the transfer configuration, and obtaining a first component identifier of the first service before the transfer configuration based on the service address before the transfer configuration;

[0052] If the original service access request corresponding to the first service is a request with a four-layer protocol stack, or if the original service access request corresponding to the first service is a request with a seven-layer protocol stack and the node access port of the first service before the transfer configuration is a non-set port, then the node access port of the first service before the transfer configuration is obtained, and based on the node access port before the transfer configuration, the first component identifier of the first service before the transfer configuration is obtained.

[0053] Optionally, before receiving the domain name resolution request sent by the client, the device further includes a second configuration unit, and the second configuration unit is used to:

[0054] Transfer and configure various services provided by the original service platform to the target service platform;

[0055] Obtaining a set of second services provided by the original service platform; wherein each second service is a service that requires resetting domain name resolution information after the transfer configuration;

[0056] For each second service in the second service set, perform the following operations respectively:

[0057] If the original service access request corresponding to a second service is a request with a seven-layer protocol stack, determining a second gateway access address of the second service after the transfer configuration, and performing domain name registration processing on a second external access service domain name of the second service and the second gateway access address;

[0058] If the original service access request corresponding to the second service is a request with a four-layer protocol stack, or if the original service access request corresponding to the second service is a request with a seven-layer protocol stack and the node access port of the second service before the transfer configuration is a non-set port, then the second service identifier of the second service after the transfer configuration is obtained, and based on the second service identifier, the second gateway access address of the second service after the transfer configuration is obtained, and domain name registration processing is performed on the second external access service domain name of the second service and the second gateway access address.

[0059] Optionally, the second configuration unit is used to:

[0060] Obtaining the original domain name resolution information corresponding to each of the services provided by the original service platform before the transfer configuration;

[0061] Based on each original domain name resolution information and a preset domain name resolution information screening rule, for each service provided by the original service platform, at least the following operations are performed to obtain the second service set:

[0062] If it is determined according to the original domain name resolution information associated with a service that the original domain name resolution information associated with the service has been reconfigured, then the service is removed from the services;

[0063] If it is determined that the original domain name resolution information associated with a service indicates that the access service domain name associated with the service is an internal access service domain name, then the service is removed from the services;

[0064] If the original domain name resolution information associated with a service is determined, indicating that the external access service domain name associated with the service is in a region other than the region to which the original service platform belongs, then the service is removed from the various services.

[0065] Optionally, the second configuration unit is used to:

[0066] If the original service access request corresponding to the one second service is a request with a four-layer protocol stack, determining a second service identifier of the one second service after the transfer configuration based on the second node access port of the one second service before the transfer configuration;

[0067] If the original service access request corresponding to the second service is a request with a seven-layer protocol stack, and the node access port of the second service before the transfer configuration is a non-set port, then based on the container port of the second service before the transfer configuration, determine the second service identifier of the second service after the transfer configuration.

[0068] Optionally, before obtaining the domain name resolution request sent by the client, the device further includes a third configuration unit, and the third configuration unit is used to:

[0069] Transfer and configure various services provided by the original service platform to the target service platform;

[0070] Obtaining a set of third services provided by the original service platform; wherein each third service is a service that requires resetting the seven-layer protocol stack forwarding path information after the transfer configuration;

[0071] For each third service in the third service set, the following operations are performed respectively:

[0072] Obtain a third service identifier of the third service after the configuration is transferred;

[0073] Based on the third service identifier, the service configuration information after the transfer configuration is obtained, and the third external access service domain name of the third service, the third service identifier and the service configuration information after the transfer configuration are mapped into a seven-layer protocol stack forwarding path information.

[0074] Optionally, the third configuration unit is used to:

[0075] Obtaining the original seven-layer protocol stack forwarding path information corresponding to each service provided by the original service platform before the transfer configuration;

[0076] Based on the forwarding path information of each original seven-layer protocol stack and the preset forwarding path information screening rule, for each service provided by the original service platform, at least the following operations are performed to obtain the third service set:

[0077] Obtaining a third external access service domain name before the transfer configuration from the original seven-layer protocol stack forwarding path information associated with a service;

[0078] If it is determined according to the third external access service domain name that the seven-layer protocol stack forwarding path information associated with the service has been reconfigured, the service is removed from the services.

[0079] Optionally, the third configuration unit is used to:

[0080] Obtaining a second component identifier of the third service before the transfer configuration;

[0081] Determine the second component identifier of the third service after the transfer configuration based on the second component identifier before the transfer configuration and the component change comparison information before and after the transfer configuration;

[0082] Based on the second component identifier after the transfer configuration, a third service identifier of the third service after the transfer configuration is determined.

[0083] Optionally, the third configuration unit is used to:

[0084] If a service is provided on the component corresponding to the second component identifier after the transfer configuration, then based on the second component identifier after the transfer configuration, the component configuration information after the transfer configuration is obtained, and based on the component configuration information after the transfer configuration, the third service identifier after the transfer configuration is obtained;

[0085] If at least two services are provided on the component corresponding to the second component identifier after the transfer configuration, then based on the second component identifier after the transfer configuration and the service configuration information before the transfer configuration, the third service identifier after the transfer configuration is obtained from the component configuration information after the transfer configuration.

[0086] Optionally, the domain name resolution unit is used to:

[0087] The target service platform obtains the domain name resolution request sent by the client from the domain name resolution load balancing gateway through a locally set domain name resolution node.

[0088] Optionally, the processing unit is used to:

[0089] The target service platform obtains the second service access request sent by the target load balancing gateway through a locally set service access node.

[0090] Optionally, the processing unit is used to:

[0091] If the second service access request is a request with a four-layer protocol stack, the target node address information of the target node is obtained according to the original external access service domain name, and the second service access request is sent to the service container running on the target node. The service container obtains the data to be processed in the second service access request and processes the data to be processed;

[0092] If the second service access request is a request with a seven-layer protocol stack, the second service access request is sent to the service container running on the service access node according to the preset target seven-layer protocol stack forwarding path information, and the service container obtains the data to be processed in the second service access request and processes the data to be processed.

[0093] In a third aspect, an embodiment of the present application further provides a computer device, comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of any one of the above-mentioned service platform access methods.

[0094] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of any of the above-mentioned service platform access methods.

[0095] The beneficial effects of this application are as follows:

[0096] The embodiment of the present application provides a method, device, equipment and storage medium for accessing a service platform, the method comprising: the target service platform receives a domain name resolution request sent by a client, and performs domain name resolution processing on the original external access service domain name of the service to be accessed in the original service platform carried by the domain name resolution request, and obtains the target gateway access address of the corresponding target load balancing gateway; the target service platform returns the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and the data to be processed to the target load balancing gateway based on the target gateway access address; the target service platform receives a second service access request sent by the target load balancing gateway, the second service access request carries the data to be processed, and carries the target node address information mapped by the original external access service domain name in the target service platform, and then based on the target node address information, sends the data to be processed to the service container of the corresponding node for processing. After the various services provided by the original service platform are transferred and configured to the target service platform, the original external access service domain name of each service is associated with the network rules reconfigured by the target service platform for each service, and the access link between the external client and the service container in the target service platform is reestablished, ensuring that the user can successfully access the service running in the target service platform using the original external access service domain name.

[0097] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0099] Figure 1a This is an optional schematic diagram of an application scenario in an embodiment of the present application;

[0100] Figure 1b This is a schematic diagram of the first architecture of the cloud service system;

[0101] Figure 1c This is a schematic diagram of the second architecture of the cloud service system;

[0102] Figure 1d The service transfer configurations provided by the original service platform are used to obtain the logical diagram of the target service platform;

[0103] Figure 2aA schematic diagram of a process for resetting load balancing information for a first service after transfer configuration provided in an embodiment of the present application;

[0104] Figure 2b A flowchart for obtaining a first service set;

[0105] Figure 2c A logical schematic diagram of obtaining a first service set from the K8S service platform;

[0106] Figure 2d A flow chart of obtaining a first service identifier of a first service i after transfer configuration;

[0107] Figure 2e It is a logical diagram between components and services;

[0108] Figure 2f A logical diagram for scheduling a first service i from nodes a to c to run in nodes d to f;

[0109] Figure 3a A schematic diagram of a process for resetting domain name resolution information for a second service after transfer configuration provided in an embodiment of the present application;

[0110] Figure 3b A flowchart for obtaining a second service set;

[0111] Figure 3c A logical schematic diagram for obtaining a second service set from the K8S service platform;

[0112] Figure 3d A schematic diagram of a process for determining a second service identifier based on a second node access port;

[0113] Figure 3e A schematic diagram of a process for determining a second service identifier based on a container port before transfer configuration;

[0114] Figure 4a A schematic diagram of a process for resetting the seven-layer protocol stack forwarding path information for the third service after the transfer configuration provided in an embodiment of the present application;

[0115] Figure 4b A flowchart for obtaining a third service set;

[0116] Figure 4c A logical schematic diagram for obtaining a third service set from the K8S service platform;

[0117] Figure 4d A flow chart of obtaining a third service identifier of a third service k after transfer configuration;

[0118] Figure 5A schematic diagram of a process for a client to access a service platform provided in an embodiment of the present application;

[0119] Figure 6a It is a schematic diagram of the process of the first specific embodiment;

[0120] Figure 6b It is a logic diagram of specific embodiment 1;

[0121] Figure 7 A schematic diagram of the structure of an access device for a service platform provided in an embodiment of the present application;

[0122] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;

[0123] Fig. 9 Schematic diagram of the structure of a computing device in an embodiment of the present application. DETAILED DESCRIPTION

[0124] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0125] Some of the terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.

[0126] 1. K8S: It is an open source container orchestration engine used to manage containerized applications on multiple hosts in a cloud platform. K8S provides a mechanism for application deployment, planning, updating, and maintenance, making the deployment of containerized applications simple and efficient, greatly reducing the workload of daily operation and maintenance.

[0127] When deploying an application in a K8S production environment, you usually create multiple service containers that mirror each other, deploy multiple application instances for the application, and run one application instance in each service container; then use the built-in load balancing rules to manage, discover, and access this group of application instances.

[0128] 2. OAM: It is a model that defines cloud-native applications. It integrates applications, other resources required by applications, and network rules related to applications to achieve full life cycle management of applications.

[0129] 3. Node: A node represents a host in the service platform and is the smallest hardware computing unit in K8S. A node can be a physical machine in a data center or a virtual machine hosted by a cloud provider.

[0130] 4. Pod: A Pod represents the environment in which a service container runs. At least one Pod runs in a node, and one or more service containers can run on each Pod. Service containers running on the same Pod can share the Pod Internet Protocol (Pod IP) address and port space of the Pod.

[0131] 5. Component: It consists of multiple container units running service containers that mirror each other.

[0132] 6. Service container: Containerize the application to obtain multiple application instances. Each application instance is deployed in a service container, so that the application can run directly on the operating system of the physical machine and perform read and write operations on the operating system's disk.

[0133] 7. Configuration Center: It is a management platform that carries all configuration information and is used to generate corresponding configuration information for all components in the service platform. The configuration center includes at least the following functions: service registration, service discovery, service planning, service dependency, configuration access links, classification of configuration information, and storage of classified configuration information.

[0134] A private cloud is a cloud infrastructure with software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within the data center. When creating a private cloud, in addition to hardware resources, it generally also includes cloud device Infrastructure as a Service (IaaS) software.

[0135] When private cloud computing is carried out, it also includes three levels: cloud hardware, cloud platform, and cloud service. The difference is that the cloud hardware is the user's personal computer or server, not the cloud computing vendor's data center. The purpose of cloud computing vendors to build data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing, on the other hand, only serves the business needs of individuals, and for enterprises, only serves the business needs of their employees, customers, and suppliers. Therefore, personal computers or servers, as well as enterprise servers, are already able to support cloud service businesses.

[0136] The following is a brief introduction to the design concept of the embodiment of the present application:

[0137] K8S is an open source container orchestration engine used to manage containerized applications on multiple hosts in a cloud platform. K8S provides a mechanism for application deployment, planning, updating, and maintenance, making the deployment of containerized applications simple and efficient, greatly reducing the workload of daily operation and maintenance.

[0138] With the iteration and upgrading of technology, the K8S service platform can be switched to an OAM service platform based on K8S. However, the service platform switching solution provided in the relevant technology cannot be applied in the scenario where the K8S service platform is switched to an OAM service platform based on K8S, resulting in the interruption of the access link between the external client and the service container of the OAM service platform.

[0139] In view of this, an embodiment of the present application provides a method, device, equipment and storage medium for accessing a service platform. In an embodiment of the present application, a target service platform receives a domain name resolution request sent by a client, and performs domain name resolution processing on the original external access service domain name of the service to be accessed in the original service platform carried by the domain name resolution request, and obtains the target gateway access address of the corresponding target load balancing gateway; the target service platform returns the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and data to be processed to the target load balancing gateway based on the target gateway access address; the target service platform receives a second service access request sent by the target load balancing gateway, the second service access request carries the data to be processed, and carries the target node address information mapped in the target service platform with the original external access service domain name, and then based on the target node address information, sends the data to be processed to the service container of the corresponding node for processing.

[0140] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0141] like Figure 1a As shown, it is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario diagram includes two physical terminal devices 110 and a server 130, and the physical terminal device 110 and the server 130 can communicate through a communication network. In an optional embodiment, the communication network is a wired network or a wireless network. The physical terminal device 110 and the server 130 can be directly or indirectly connected through wired or wireless communication, and the present application does not limit this.

[0142] The target service platform, the original service platform and the target load balancing gateway are all running in the server 130. When a user uses the physical terminal device 110 to access the server 130, the target load balancing gateway receives the service access request and distributes the service access request to the node in the target service platform, so that the service container in the node provides the user with the corresponding service based on the pending data carried by the service access request. In addition, when the target service platform cannot provide services to the user due to a failure, a rollback method can also be adopted to make the target load balancing gateway distribute the service access request to the node in the original service platform, so that the service container in the node provides the user with the corresponding service, ensuring that the user's access to the service platform is not affected.

[0143] Specifically, the user enters a domain name resolution request in the access interface 120 of the physical terminal device 110, and the domain name resolution request carries the original external access service domain name of the service to be accessed; the target service platform performs domain name resolution processing on the external access service domain name, obtains the target gateway access address for accessing the target load balancing gateway, and returns the target gateway access address to the physical terminal device 110. The user enters the target gateway access address and the first service access request in the access interface 120, and sends the first service access request to the target load balancing gateway running on the server 130, and the first service access request carries the original external access service domain name and the data to be processed; the target load balancing gateway then maps the original external access service domain name to obtain the corresponding target node address information, and generates a second service access request based on the target node address information; the target load balancing gateway distributes the second service access request to the corresponding node in the target service platform, so that the service container running on the node can provide the user with the corresponding service by processing the data to be processed.

[0144] Specifically, the physical terminal device 110 in the embodiment of the present application is an electronic device used by a user, and the electronic device may be a personal computer, a mobile phone, a tablet computer, a notebook, an e-book reader, a smart home, or other computer device with certain computing capabilities.

[0145] The server 130 in the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms. This application does not make any restrictions here.

[0146] The embodiment of the present application provides a cloud service system, which at least includes a load balancing gateway, an original service platform and a target service platform. Figure 1b The architecture diagram of the cloud service system shown in the figure configures two load balancing gateways for the target service platform. In order to meet the service access requirements of the client, load balancing gateway a is used to distribute domain name resolution requests and service access requests, and load balancing gateway b is used to distribute other service access requests.

[0147] Load balancing gateway a receives the domain name resolution request sent by the client, distributes the domain name resolution request to a node of the target service platform for domain name resolution processing according to the preset distribution rules, and then forwards the target gateway access address sent by the target service platform to the client. If the target gateway access address is the IP address of load balancing gateway a, load balancing gateway a distributes the service access request sent by the client to the corresponding node on the target service platform for processing; if the target gateway access address is the IP address of load balancing gateway b, load balancing gateway b distributes the service access request sent by the client to the corresponding node on the target service platform for processing, so that the service container in the node provides the corresponding service to the user. Among them, the node that processes the domain name resolution and the node that processes the service access may be the same node or different nodes.

[0148] When the target service platform cannot provide services to users due to a failure, a rollback method can be used to allow the client to access the services in the original service platform. The load balancing gateway a' associated with the original service platform receives the domain name resolution request sent by the client, distributes the domain name resolution request to a node of the original service platform for domain name resolution processing according to the distribution rules, and then forwards the target gateway access address sent by the target service platform to the client. If the target gateway access address is the IP address of the load balancing gateway a', the load balancing gateway a' distributes the service access request sent by the client to the corresponding node on the original service platform for processing; if the target gateway access address is the IP address of the load balancing gateway b', the load balancing gateway b' distributes the service access request sent by the client to the corresponding node on the original service platform for processing, so that the service container in the node provides the corresponding service to the user. Among them, the node that processes the domain name resolution and the node that processes the service access may be the same node or different nodes.

[0149] The distribution rule followed by the load balancing gateway a can be any of the following:

[0150] (1) Load balancing gateway a randomly selects a node from the service platform and distributes the domain name resolution request to the node;

[0151] (2) Load balancing gateway a uses a weighted round-robin approach to distribute domain name resolution requests to the node with the maximum weight in the service platform;

[0152] (3) Load balancing gateway a adopts the minimum connection number strategy to distribute the received domain name resolution requests to the node with the least active connections (i.e., the least load pressure);

[0153] (4) Load balancing gateway a adopts the source IP hash strategy, and forwards the domain name resolution request from the same source IP to the same node for domain name resolution processing each time. Specifically, load balancing gateway a obtains the external access service domain name carried in the domain name resolution request, performs hash processing on the external access service domain name, obtains the node IP address, and distributes the domain name resolution request to the node corresponding to the node IP address.

[0154] See also Figure 1c The architecture diagram of the cloud service system shown in the figure configures multiple load balancing gateways for the target service platform. In order to reduce the load pressure of the gateway equipment and improve the load distribution efficiency, the load balancing gateway c is used to distribute domain name resolution requests, and the load balancing gateways d~f are used to distribute the service access requests for which they are responsible.

[0155] The load balancing gateway c receives the domain name resolution request sent by the client, distributes the domain name resolution request to a node of the target service platform for domain name resolution processing according to the preset distribution rules, and then forwards the target gateway access address sent by the target service platform to the client. If the target gateway access address is the IP address of the load balancing gateway f, the load balancing gateway f distributes the service access request sent by the client to the corresponding node on the target service platform for processing, so that the service container in the node provides the corresponding service to the user. Among them, the node that processes the domain name resolution and the node that processes the service access may be the same node or different nodes.

[0156] When the target service platform is unable to provide services to users due to a failure, a rollback method can be used to allow the client to access the services in the original service platform. The load balancing gateway c' associated with the original service platform receives the domain name resolution request sent by the client, and distributes the domain name resolution request to a node of the original service platform for domain name resolution processing according to the distribution rules, and then forwards the target gateway access address sent by the target service platform to the client. If the target gateway access address is the IP address of the load balancing gateway e', the load balancing gateway e' will distribute the service access request sent by the client to the corresponding node on the original service platform for processing, so that the service container in the node can provide the corresponding service to the user. Among them, the node that processes the domain name resolution and the node that processes the service access may be the same node or different nodes.

[0157] For ease of description, take a service as an example, see Figure 1d The logical diagram shown describes the process of transferring the service configuration from the original service platform to the target service platform.

[0158] like Figure 1d As shown, in the original service platform, multiple service containers with a mirror relationship are created for the application that provides the service. An application instance runs in each service container. In order to ensure high availability of the service and avoid the situation where the service is inaccessible due to a single point failure, each service container is usually configured on a different container unit. Each container unit is scheduled to a different node of the original service platform, and multiple container units running service containers with a mirror relationship can constitute a component.

[0159] Each service container listens to the destination port on its own container unit, where the port numbers of the destination ports are the same; when the destination port of the service access request is consistent with the destination port listened to by the service container, the corresponding service container obtains the service access request, and the application instance in the service container provides the user with corresponding services based on the data to be processed carried in the service access request.

[0160] When the service is transferred from the original service platform to the target service platform, multiple service containers with mirroring relationships will be created in the target service platform for the application that provides the service. An application instance will run in each service container. Each service container will be configured on a different container unit. Each container unit will be scheduled to a different node on the target service platform. Multiple container units running service containers with mirroring relationships can constitute a component.

[0161] However, in the target service platform, the configuration parameters such as the service container, container unit, component, node IP address, access port, etc. associated with the service may change, and the IP address of the domain name resolution load balancing gateway corresponding to the external access service domain name of the service may also change, resulting in the interruption of the access link between the user and the service running on the target service platform. Therefore, before the target service platform obtains the domain name resolution request sent by the client, it is necessary to re-establish the access link between the user and the various services provided by the target service platform.

[0162] See also Figure 2a The flowchart diagram shown shows the process of resetting the load balancing information for the first service after the transfer configuration.

[0163] S201: The target service platform obtains a set of first services provided by the original service platform; wherein each first service is a service that needs to reset load balancing information after the transfer configuration.

[0164] When executing step 201, based on the original load balancing information corresponding to each service before the transfer configuration and the load balancing information screening rule, the services that need to reset the load balancing information after the transfer configuration are screened out from the services, and the process of obtaining the first service set is as follows: Figure 2b shown.

[0165] S2011: The target service platform obtains the original load balancing information of the original load balancing gateway before the transfer configuration.

[0166] The target service platform obtains each original load balancing information of the original load balancing gateway before the transfer configuration in the cloud service system, and pre-processes each original load balancing information to obtain each original load balancing information in a standardized format. Among them, one original load balancing information contains at least the following information: an external access service domain name of a service, the address information of the original load balancing gateway before the transfer configuration, and the node address information of each node before the transfer configuration.

[0167] The address information of the original load balancing gateway specifically includes: the IP address of the original load balancing gateway and the access port of the original load balancing gateway. The address information of a node before the transfer configuration specifically includes: the IP address of the node before the transfer configuration and the access port of the node before the transfer configuration.

[0168] For example, the K8S service platform provides a product recommendation service. The original load balancing information of the product recommendation service is shown in Table 1.

[0169] Table 1

[0170]

[0171] S2012: The target service platform performs at least the following operations based on each piece of original load balancing information and the load balancing information screening rule to obtain a first service set.

[0172] The target service platform sequentially performs the following operations to perform multiple rounds of screening on each original load balancing information to obtain a first service set. For ease of description, a service x is used as an example in the following operations:

[0173] (1) If the target service platform determines, based on the original load balancing information associated with a service x, that the access link of the load balancing gateway associated with the service x has been reconfigured, then the service x is removed from all services.

[0174] The target service platform determines that the access link of the load balancing gateway of service x has been reconfigured in the following manner: if it is determined that the first external access service domain name included in the original load balancing information of service x has been configured with the corresponding target load balancing information, then it is determined that the access link of the load balancing gateway of service x has been reconfigured.

[0175] Specifically, if the access port of the original load balancing gateway in the original load balancing information is port 80, and the node access port before the transfer configuration is also port 80, then the original service access request corresponding to service x is determined to be a request with a seven-layer protocol stack, and the target load balancing information set after the transfer configuration is obtained from the configuration center; if the first external access service domain name and the access port of the original load balancing gateway in the original load balancing information conflict with the external access service domain name and the external access port in the target load balancing information set after the transfer configuration, it means that after service x is transferred to the target service platform, the target service platform has automatically configured the access link of the load balancing gateway for service x. Therefore, service x should be eliminated when screening the first service.

[0176] (2) If the target service platform determines that the original load balancing information associated with a service x indicates that the node running service x before the transfer configuration is located on another service platform, or indicates that service x is running on a component outside the original service platform, then service x is removed from all services.

[0177] The target service platform determines the original load balancing information associated with service x in the following manner, indicating that the node running service x before the transfer configuration is located on other service platforms, or that service x is running on a component outside the original service platform: If no corresponding match is obtained in the node configuration information of the original service platform based on the node address information contained in the original load balancing information of service x, then it is determined that the node running service x before the transfer configuration is located on other service platforms, or that service x is running on a component outside the original service platform.

[0178] In the cloud service system, in addition to the original service platform and the target service platform, other service platforms that provide services to users are also included. The original load balancing device parses the received service access request to obtain the header and body of the service access request, wherein the header is a uniform resource locator (Uniform / Universal ResourceLocator, URL), the URL is composed of the Hypertext Transfer Protocol (Hypertext Transfer Protocol, HTTP), the first external access service domain name and the access port of the original load balancing gateway, and the body is composed of the data to be processed; the original load balancing gateway obtains the corresponding node IP address and node access port according to the first external access service domain name in the URL and the pre-configured original load balancing information, modifies the destination address of the service access request to the node IP address, modifies the destination port of the service access request to the node access port, and sends the service access request to the node of the corresponding service platform.

[0179] The node configuration information is the node address information of all nodes running in the original service platform. Therefore, if the node address information in the original load balancing information of service x does not obtain a corresponding match in the node configuration information of the original service platform, it is determined that the node running service x before the transfer configuration is located on other service platforms, or it is determined that service x runs on a component outside the original service platform.

[0180] Since other service platforms have not transferred and configured the services in their own platforms to the target service platform, there is no need to reconfigure the access link of the load balancing gateway for service x in the target service platform. Service x should be eliminated when screening the first service.

[0181] If a non-containerized application provides service x, service x is running in a component outside the original service platform. Since service x itself runs outside the original service platform, the original service platform will not transfer the configuration of service x to the target service platform. Therefore, there is no need to reconfigure the access link of the load balancing gateway for service x in the target service platform. Service x should be eliminated when screening the first service.

[0182] (3) If the target service platform determines that the original load balancing information associated with a service x indicates that the original service access request corresponding to the service x is a request with a seven-layer protocol stack, then the service x is removed from all services.

[0183] The target service platform determines the original load balancing information associated with service x in the following manner, indicating that the original service access request corresponding to service x is a request with a seven-layer protocol stack: if the access port of the original load balancing gateway included in the original load balancing information of service x and the node access port of the original service platform are both set ports, then it is determined that the original service access request corresponding to service x is a request with a seven-layer protocol stack.

[0184] Specifically, if the access port of the original load balancing gateway in the original load balancing information is port 80, and the node access port before the transfer configuration is also port 80, then it is determined that the original service access request corresponding to service x is a request with a seven-layer protocol stack. In the target service platform, in order to reduce the configuration workload and improve work efficiency, it is pre-defined that if the original service access request is a request with a seven-layer protocol stack, then after the service x is transferred to the target service platform, the target service platform will automatically configure the load balancing information and the seven-layer protocol stack forwarding path information for it. Therefore, when screening the first service, service x should be eliminated.

[0185] After multiple rounds of screening, the first service from the original service platform that needs to reconfigure the load balancing information in the target service platform is obtained. Figure 2c The logical schematic diagram shown screens the various services provided by the original load balancing gateway, eliminates the multiple services mentioned in the previous article that do not meet the load balancing configuration requirements, and uses the remaining services as the first service set. The load balancing information in the OAM service platform is reset for each first service, so that the service access request sent by the user through the client can be distributed to the corresponding node for subsequent processing.

[0186] S202: The target service platform reads a first service i from the first service set.

[0187] S203: The target service platform obtains the first service identifier of the first service i after the transfer configuration.

[0188] Optional, see Figure 2d In the flowchart shown, when executing step 203, the process of the target service platform obtaining the first service identifier of the first service i after the transfer configuration is as follows:

[0189] S2031: The target service platform obtains a first component identifier of the first service i before the transfer configuration.

[0190] Optionally, in an embodiment of the present application, different methods of obtaining the first component identifier of the first service i before the transfer configuration are provided for different types of original service access requests.

[0191] (1) If the original service access request corresponding to the first service i is a request with a seven-layer protocol stack, the target service platform obtains the service address of the first service i before the transfer configuration, and based on the service address before the transfer configuration, obtains the first component identifier of the first service i before the transfer configuration.

[0192] Specifically, the target service platform obtains the seven-layer protocol stack forwarding path information of each service before the transfer configuration, and obtains the service configuration information before the transfer configuration that matches the first external access service domain name from each seven-layer protocol forwarding path information according to the first external access service domain name of the first service i. The target service platform obtains the service address before the transfer configuration from the service configuration information before the transfer configuration, and then determines the first component identifier of the first service i before the transfer configuration based on the service address before the transfer configuration and the component comparison information before the transfer configuration.

[0193] (2) If the original service access request corresponding to the first service i is a request with a four-layer protocol stack, or if the original service access request corresponding to the first service i is a request with a seven-layer protocol stack and the node access port of the first service i before the transfer configuration is a non-set port, the target service platform obtains the node access port of the first service i before the transfer configuration, and based on the node access port before the transfer configuration, obtains the first component identifier of the first service i before the transfer configuration.

[0194] 1) If the access port of the original load balancing gateway in the original load balancing information is port 80, and the node access port before the transfer configuration is a port other than port 80, then it is determined that the original service access request corresponding to the first service i is a request with a four-layer protocol stack.

[0195] Specifically, the target service platform obtains the node access port of the first service i before the transfer configuration, and based on the node access port before the transfer configuration, obtains the first component identifier of the first service i before the transfer configuration.

[0196] 2) If the original service access request is a request with a seven-layer protocol stack, and the node access port of the first service i before the transfer configuration is an access port other than port 80, it is determined that it is currently in the host network working (HostNetWork) mode.

[0197] Specifically, the target service platform obtains the container port (Container Port) of the first service i before the transfer configuration, and then obtains the first component identifier of the first service i before the transfer configuration based on the container port and the container orchestration information before the transfer configuration.

[0198] S2032: The target service platform determines the first component identifier of the first service i after the transfer configuration based on the first component identifier before the transfer configuration and the component change comparison information before and after the transfer configuration.

[0199] S2033: The target service platform determines the first component after the transfer configuration and the first service identifier for the first service i based on the first component identifier after the transfer configuration and the first service port information of the first service i before the transfer configuration.

[0200] When executing step 2033, after the service running in the original service platform is transferred and configured to the target service platform, the service access port, node access port and container port of the service after the transfer configuration are generally the same as the port number before the transfer configuration. Therefore, the corresponding first service identifier can be determined based on the first service port information before the transfer configuration and the first component identifier after the transfer configuration.

[0201] See also Figure 2d , a component is composed of multiple container units running mutually mirrored service containers, one or more service containers can be run in each container unit, one application instance is run on each service container, and each application providing services corresponds to multiple application instances, so a component can correspond to one or more services. Therefore, based on the first service port information before the transfer configuration and the first component identifier after the transfer configuration, the service provided by the component can be determined.

[0202] In addition, the service configuration information before the transfer configuration includes not only the service address before the transfer configuration, but also the service access port before the transfer configuration and the service URL path before the transfer configuration.

[0203] One or more service containers can run in a container unit, and each service container can run application instances of the same or different applications. Therefore, one container unit can run service containers that provide the same or different services. Multiple container units that run service containers that are mirror images of each other are called a component. Therefore, a component can correspond to one or more services.

[0204] Since the service URL path of each service is different, when a component provides multiple services, the service URL path before the transfer configuration can be obtained from the service configuration information before the transfer configuration. When the service running in the original service platform is transferred and configured to the target service platform, the service URL path of the service after the transfer configuration generally still uses the service URL path before the transfer configuration. Therefore, based on the first component identifier after the transfer configuration, the component configuration information after the transfer configuration is obtained; then, based on the service URL path before the transfer configuration and the component configuration information after the transfer configuration, the first component after the transfer configuration is determined, and the first service identifier for the first service i.

[0205] (1) If the original service access request corresponding to the first service i is a request with a seven-layer protocol stack, and a service is provided on the component corresponding to the first component identifier after the transfer configuration, the target service platform obtains the component configuration information after the transfer configuration based on the first component identifier after the transfer configuration of the first service i, and obtains the first service identifier after the transfer configuration based on the service access port before the transfer configuration and the component configuration information after the transfer configuration.

[0206] (2) If the original service access request corresponding to the first service i is a request with a seven-layer protocol stack, and at least two services are provided on the component corresponding to the first component identifier after the transfer configuration, the target service platform obtains the component configuration information after the transfer configuration based on the first component identifier after the transfer configuration of the first service i, and the target service platform then obtains the first service identifier after the transfer configuration based on the service configuration information before the transfer configuration and the component configuration information after the transfer configuration.

[0207] (3) If the original service access request corresponding to the first service i is a request with a four-layer protocol stack, and a service is provided on the component corresponding to the first component identifier after the transfer configuration, the target service platform obtains the component configuration information after the transfer configuration based on the first component identifier after the transfer configuration of the first service i, and obtains the first service identifier after the transfer configuration based on the node access port before the transfer configuration and the component configuration information after the transfer configuration.

[0208] (4) If the original service access request corresponding to the first service i is a request with a four-layer protocol stack, and at least two services are provided on the component corresponding to the first component identifier after the transfer configuration, the target service platform obtains the component configuration information after the transfer configuration based on the first component identifier after the transfer configuration of the first service i, and the target service platform then obtains the first service identifier after the transfer configuration based on the node access port before the transfer configuration, the service configuration information before the transfer configuration, and the component configuration information after the transfer configuration.

[0209] (5) If the original service access request corresponding to the first service i is a request with a seven-layer protocol stack, the node access port of the first service i before the transfer configuration is a non-set port, and a service is provided on the component corresponding to the first component identifier after the transfer configuration, then the target service platform obtains the component configuration information after the transfer configuration based on the first component identifier after the transfer configuration of the first service i, and obtains the first service identifier after the transfer configuration based on the container port before the transfer configuration and the component configuration information after the transfer configuration.

[0210] (6) If the original service access request corresponding to the first service i is a request with a seven-layer protocol stack, the node access port of the first service i before the transfer configuration is a non-set port, and at least two services are provided on the component corresponding to the first component identifier after the transfer configuration, then the target service platform obtains the component configuration information after the transfer configuration based on the first component identifier after the transfer configuration of the first service i, and the target service platform then obtains the first service identifier after the transfer configuration based on the container port before the transfer configuration, the service configuration information before the transfer configuration, and the component configuration information after the transfer configuration.

[0211] S204: The target service platform obtains a first container unit label after the transfer configuration based on the first service identifier; the first container unit label is an identifier of a node running the first service i in the target service platform.

[0212] The target service platform obtains the container unit label after the transfer configuration based on the first service identifier, and then determines the node running in the target service platform that matches the first container unit label based on the container unit label, and then obtains the node IP address and node access port of the node. The reason why the first container unit label after the transfer configuration is obtained instead of the first node address information is that the service address of the first node is dynamically allocated by the target service platform and is dynamic, while the first container unit label is uniquely identifiable, and the container unit labels of multiple container units belonging to the same component are consistent.

[0213] For example, see Figure 2f As shown in the logical schematic diagram, after the transfer configuration, the application instance a of the first service i runs in the nodes a~c of the OAM service platform (the node IP addresses of the nodes a~c are the same, and the node access ports of the nodes a~c are the same). If the nodes a~c stop running the first service i due to a failure, the OAM service platform will schedule the application instance a of the first service i to the nodes d~f (the node IP addresses of the nodes a~c are the same, and the node access ports of the nodes a~c are the same) to continue running.

[0214] Assume that the target load balancing information stores the node IP address. Since the node IP addresses of nodes a~c and nodes d~f are different, if the node IP address in the target load balancing information is not updated, the user cannot access the service in the target service platform; if the node IP address in the target load balancing information is updated, the complexity of the configuration process is increased and the access processing efficiency of the service platform is reduced.

[0215] Assume that the target load balancing information records the container unit label. When the first service i runs in nodes a~c, the container unit label of nodes a~c is infra.tce.io / oam-app:tcloud-yunjing-srv. When the first service i runs in nodes d~f, the container unit label of nodes d~f is still infra.tce.io / oam-app:tcloud-yunjing-srv. In this way, no matter which node the first service i runs on in the OAM service platform, the user can successfully access the first service i without updating the corresponding load balancing information. It can also reduce the workload of configuring load balancing information and improve the work efficiency of service access.

[0216] S205: The target service platform associates the first external access service domain name, the first service identifier and the first container unit tag after the transfer configuration of the first service i to obtain the corresponding first gateway access address after the transfer configuration.

[0217] Specifically, the first external access service domain name, the first service identifier and the first container unit tag after the transfer configuration are registered in the target service platform. The target service platform automatically assigns a first gateway access address after the transfer configuration to the first service i. The user can access the target load balancing gateway by entering the first gateway access address into the client.

[0218] S206: The target service platform performs association processing on the first external access service domain name, the first service identifier, the first container unit tag, and the first gateway access address to obtain load balancing information that is reset for the first service i.

[0219] For example, the product recommendation service is transferred from the K8S service platform to the OAM service platform. The target load balancing information of the product recommendation service is shown in Table 2.

[0220] Table 2

[0221]

[0222] S207: The target service platform determines whether all first services have been read. If so, execute step 208; otherwise, return to step 202.

[0223] S208: The target service platform outputs the load balancing information reset for each first service.

[0224] The target service platform resets the load balancing information for each first service to ensure that users can successfully access the target load balancing gateway using the original external access service domain name, so that the target load balancing gateway can distribute the service access request sent by the user through the client to the corresponding node for subsequent processing.

[0225] Next, see Figure 3a The flowchart diagram shown shows the process of resetting the domain name resolution information for the second service after the transfer configuration.

[0226] S301: The target service platform obtains a set of second services provided by the original service platform; wherein each second service is a service that requires resetting domain name resolution information after the transfer configuration.

[0227] When executing step 301, based on the original domain name resolution information corresponding to each service before the transfer configuration and the domain name resolution information screening rule, the services that need to reset the domain name resolution information after the transfer configuration are screened out from the services, and the process of obtaining the second service set is as follows: Figure 3b shown.

[0228] S3011: The target service platform obtains various services provided by the original service platform and the original domain name resolution information corresponding to each service before the transfer configuration.

[0229] The target service platform obtains the original domain name resolution information of each service provided by the original service platform before the transfer configuration from the cloud service system, and pre-processes each original domain name resolution information to obtain each original domain name resolution information in a standardized format. Among them, an original domain name resolution information contains at least the following information: the external access service domain name of a service, and the gateway access address of the original load balancing gateway before the transfer configuration.

[0230] For example, the K8S service platform provides a product recommendation service. The original domain name resolution information of the product recommendation service is shown in Table 3.

[0231] Table 3

[0232]

[0233] S3012: The target service platform performs at least the following operations for each service provided by the original service platform based on each piece of original domain name resolution information and domain name resolution information screening rule to obtain a second service set.

[0234] The target service platform sequentially performs the following operations to perform multiple rounds of screening on each original domain name resolution information to obtain a second service set. For ease of description, a service y is used as an example in the following operations:

[0235] (1) If the target service platform determines, based on the original domain name resolution information associated with a service y, that the original domain name resolution information associated with the service y has been reconfigured, then the service y is removed from the various services.

[0236] The target service platform obtains the target domain name resolution information set that has been configured in its own platform from the configuration center. If a corresponding match is obtained in the target domain name resolution information set based on the external access service domain name in the original domain name resolution information, it is determined that the original domain name resolution information associated with service y has been reconfigured. Therefore, service y should be eliminated when screening the second service.

[0237] (2) If the target service platform determines the original domain name resolution information associated with a service y, indicating that the access service domain name associated with service y is an internal access service domain name, then service y is removed from various services.

[0238] Specifically, if the access service domain name associated with service y starts with 192.168 and is resolved to the overlay network layer, it means that the access service domain name associated with service y is an internal access service domain name, and service y should be eliminated when screening the second service.

[0239] (3) If the target service platform determines that the original domain name resolution information associated with a service y represents the external access service domain name associated with service y, which is in a region other than the region to which the original service platform belongs, then service y is removed from all services.

[0240] The domain name resolution information template of the external domain name resolution container (Outer-DNS) running on the original service platform is a full domain name template, which means that when resolving domain names, each service corresponds to an external access service domain name representing the local domain, and at least one external access service domain name representing other regions. Since the domain name resolution information template of the external domain name resolution container on the target service platform uses the domain name of the region where the original service platform belongs, combined with the domain name of the entire network, if the external access service domain name of a service is a domain name of another region, the external domain name resolution container in the target service platform cannot perform domain name resolution processing on the external access service domain name of the service, and can only send it to the upstream full-network domain name resolution container for domain name resolution processing.

[0241] After multiple rounds of screening, the second service from the original service platform that needs to reconfigure the domain name resolution information in the target service platform is obtained. Figure 3c The logical schematic diagram shown screens the various services provided by the K8S service platform, eliminates the multiple services mentioned in the previous article that do not meet the domain name resolution configuration requirements, and uses the remaining services as the second service set. The domain name resolution information in the OAM service platform is reset for each second service, so that the domain name resolution request sent by the user through the client can be distributed to the corresponding node for subsequent processing, ensuring that the user can successfully access the services in the target service platform.

[0242] S302: The target service platform reads a second service j from the second service set.

[0243] S303: If the original service access request corresponding to the second service j is a request with a seven-layer protocol stack, the target service platform executes step 304; if the original service access request corresponding to the second service j is a request with a four-layer protocol stack, or if the original service access request corresponding to the second service j is a request with a seven-layer protocol stack and the node access port of the second service j before the transfer configuration is a non-set port, the target service platform executes step 305.

[0244] S304: The target service platform determines the second gateway access address of the second service j after the transfer configuration, and performs domain name registration processing on the second external access service domain name and the second gateway access address of the second service.

[0245] The target service platform obtains the second external access service domain name of the second service j from the original domain name resolution information of the second service j, and determines the node access port of the second service j before the transfer configuration and the access port of the original load balancing gateway based on the second external access service domain name. If the access port of the original load balancing gateway is port 80 and the node access port before the transfer configuration is also port 80, the original service access request corresponding to the second service j is determined to be a request with a seven-layer protocol stack.

[0246] In order to simplify the configuration process, for the second service j whose original service access request is a request with a seven-layer protocol stack, a preset, unified second gateway access address is configured for the second service j in the target service platform, and then the second external access service domain name and the second gateway access address are registered in the target service platform, so as to achieve the purpose of quickly executing domain name registration and improve work efficiency. After the domain name registration is completed, the external domain name resolution container in the target service platform can resolve and obtain the corresponding gateway access address based on the received external access service domain name and the stored target domain name resolution information set, so that the client can obtain the corresponding service by accessing the corresponding load balancing gateway.

[0247] S305: The target service platform obtains the second service identifier of the second service j after the transfer configuration, and based on the second service identifier, obtains the second gateway access address of the second service j after the transfer configuration, and performs domain name registration processing on the second external access service domain name and the second gateway access address of the second service j.

[0248] Specifically, different methods for obtaining the second service identifier of the second service j are provided for different types of original service access requests.

[0249] (1) The target service platform obtains the second external access service domain name of the second service j from the original domain name resolution information of the second service j, and determines the node access port of the second service j before the transfer configuration based on the second external access service domain name. If the node access port before the transfer configuration is a port other than port 80, it is determined that the original service access request corresponding to the second service j is a request with a four-layer protocol stack.

[0250] If the original service access request corresponding to the second service j is a request with a four-layer protocol stack, the target service platform obtains the second node access port of the second service j before the transfer configuration from the original load balancing information of the second service j; the target service platform then determines the second service identifier of the second service j after the transfer configuration based on the second node access port of the second service j before the transfer configuration.

[0251] See also Figure 3d In the flowchart shown, when the original service access request corresponding to the second service j is a request with a four-layer protocol stack, when executing step 305, the target service platform determines the second service identifier based on the second node access port as follows:

[0252] S3051: The target service platform obtains the component identifier of the second service j before the transfer configuration based on the second node access port before the transfer configuration;

[0253] S3052: The target service platform determines the component identifier of the second service j after the transfer configuration based on the component identifier of the second service j before the transfer configuration and the component change comparison information before and after the transfer configuration;

[0254] S3053: The target service platform determines the component after the transfer configuration and the second service identifier for the second service j based on the component identifier after the transfer configuration and the service port information of the second service j before the transfer configuration.

[0255] Among them, the execution process of step 3053 is the same as the execution process of step 2033, which will not be repeated here.

[0256] (2) If the original service access request is a request with a seven-layer protocol stack, and the node access port of the second service j before the transfer configuration is an access port other than port 80, it is determined that the current mode is the host network work (HostNetWork) mode.

[0257] If the original service access request corresponding to the second service j is a request with a seven-layer protocol stack, and the node access port of the second service j before the transfer configuration is a non-set port, then based on the container port of the second service j before the transfer configuration, the second service identifier of the second service j after the transfer configuration is determined. Figure 3e In the flowchart shown, when the original service access request is a request with a seven-layer protocol stack and the node access port of the second service j before the transfer configuration is an access port other than port 80, when executing step 305, the target service platform determines the second service identifier based on the container port before the transfer configuration. The process is as follows:

[0258] S3051': The target service platform obtains the component identifier of the second service j before the transfer configuration based on the container port before the transfer configuration and the container YAML orchestration information before the transfer configuration;

[0259] S3052': The target service platform determines the component identifier of the second service j after the transfer configuration based on the component identifier of the second service j before the transfer configuration and the component change comparison information before and after the transfer configuration;

[0260] S3053': The target service platform determines the component after the transfer configuration and the second service identifier for the second service j based on the component identifier after the transfer configuration and the service port information of the second service j before the transfer configuration.

[0261] Among them, the execution process of step 3053' is the same as the execution process of step 2033, and will not be repeated here.

[0262] After obtaining the second service identifier, the target service platform calls its own service discovery interface, and obtains the second gateway access address after the transfer configuration allocated to the second service j from the service discovery interface according to the second service identifier; the target service platform then calls its own cluster information interface to obtain the current cluster information; finally, the second external access service domain name and the second gateway access address are registered in the current cluster information.

[0263] For example, the product recommendation service is transferred from the K8S service platform to the OAM service platform. The target domain name resolution information of the product recommendation service is shown in Table 4.

[0264] Table 4

[0265]

[0266] S306: The target service platform determines whether all second services have been read. If so, execute step 307; otherwise, return to step 302.

[0267] S307: The target service platform outputs the domain name resolution information reset by each second service.

[0268] The target service platform resets the domain name resolution information for each second service to ensure that the domain name resolution request sent by the user through the client can successfully resolve the corresponding target gateway access address, thereby ensuring that the user can successfully access the corresponding target load balancing device through the client, so that the target load balancing gateway can distribute the service access request sent by the user through the client to the corresponding node for subsequent processing.

[0269] Finally, see Figure 4a The flowchart diagram shown shows the process of resetting the seven-layer protocol stack forwarding path information for the third service after the transfer configuration.

[0270] S401: The target service platform obtains a set of third services provided by the original service platform; wherein each third service is a service that requires resetting the seven-layer protocol stack forwarding path information after the transfer configuration.

[0271] When executing step 401, based on the original seven-layer protocol stack forwarding path information corresponding to each service before the transfer configuration and the forwarding path information screening rule, the services that need to reset the seven-layer protocol stack forwarding path information after the transfer configuration are screened out from the services, and the process of obtaining the third service set is as follows: Figure 4b shown.

[0272] S4011: The target service platform obtains various services provided by the original service platform and the corresponding original seven-layer protocol stack forwarding path information before the transfer configuration.

[0273] The target service platform obtains the services provided by the original service platform from the cloud service system, the original seven-layer protocol stack forwarding path information corresponding to each service before the transfer configuration, and pre-processes each original seven-layer protocol stack forwarding path information to obtain each original seven-layer protocol stack forwarding path information in a standardized format. Among them, an original seven-layer protocol stack forwarding path information at least includes the following information: an external access service domain name of a service, and the service configuration information before the transfer configuration.

[0274] The service configuration information before the transfer configuration specifically includes: the service address before the transfer configuration, the service access port before the transfer configuration, and the service URL path before the transfer configuration.

[0275] For example, the K8S service platform provides a product recommendation service. The original seven-layer protocol stack forwarding path information of the product recommendation service is shown in Table 5.

[0276] Table 5

[0277]

[0278] S4012: The target service platform performs at least the following operations for each service provided by the original service platform based on the forwarding path information of each original seven-layer protocol stack and the forwarding path information screening rule to obtain a third service set. For ease of description, one service is used as an example in the following operations:

[0279] The target service platform obtains the third external access service domain name before the transfer configuration from the original seven-layer protocol stack forwarding path information associated with a service z. If it is determined based on the third external access service domain name that the seven-layer protocol stack forwarding path information associated with service z has been reconfigured, service z is removed from various services.

[0280] Specifically, the target service platform obtains the target seven-layer protocol stack forwarding path information set that has been configured in its own platform from the configuration center. If a corresponding match is obtained in the target seven-layer protocol stack forwarding path information set based on the third external access service domain name, it is determined that the seven-layer protocol stack forwarding path information associated with service z has been reconfigured. Therefore, service z should be eliminated when screening the third service.

[0281] For easier understanding, see Figure 4c The logical schematic diagram shown screens the various services provided by the K8S service platform, eliminates the multiple services mentioned in the previous article that do not meet the forwarding path configuration requirements, and uses the remaining services as the third service set. The seven-layer protocol stack forwarding path information in the OAM service platform is reset for each third service, so that the service access request sent by the user through the client can be forwarded by the node to the corresponding service container for subsequent processing.

[0282] S402: The target service platform reads a third service k from the third service set.

[0283] S403: The target service platform obtains the third service identifier of the third service k after the transfer configuration.

[0284] Optional, see Figure 4d In the flowchart shown, when executing step 403, the process of the target service platform obtaining the third service identifier of the third service k after the transfer configuration is as follows:

[0285] S4031: The target service platform obtains the second component identifier of the third service k before the transfer configuration.

[0286] The target service platform obtains the service address of the third service k before the transfer configuration from the original seven-layer protocol stack forwarding path information of the third service k, and then compares the service address before the transfer configuration with the component information before the transfer configuration to determine the second component identifier of the third service k before the transfer configuration.

[0287] S4032: The target service platform determines the second component identifier of the third service k after the transfer configuration based on the second component identifier before the transfer configuration and the component change comparison information before and after the transfer configuration.

[0288] S4033: The target service platform determines the third service identifier of the third service k after the transfer configuration based on the second component identifier after the transfer configuration.

[0289] Optionally, if a service is provided on the component corresponding to the second component identifier after the transfer configuration, then based on the second component identifier after the transfer configuration, the component configuration information after the transfer configuration is obtained, and based on the component configuration information after the transfer configuration, a third service identifier after the transfer configuration is obtained;

[0290] If the component corresponding to the second component identifier after the transfer configuration provides at least two services, then based on the second component identifier after the transfer configuration and the service configuration information before the transfer configuration, the third service identifier after the transfer configuration is obtained from the component configuration information after the transfer configuration.

[0291] S404: The target service platform obtains the service configuration information after the transfer configuration based on the third service identifier, and maps the third service identifier and the service configuration information after the transfer configuration into a seven-layer protocol stack forwarding path information.

[0292] For example, the product recommendation service is transferred from the K8S service platform to the OAM service platform. The target seven-layer protocol stack forwarding path information of the product recommendation service is shown in Table 6.

[0293] Table 6

[0294]

[0295]

[0296] S405: The target service platform determines whether all third services have been read. If so, execute step 406; otherwise, return to step 402.

[0297] S406: The target service platform outputs the seven-layer protocol stack forwarding path information reset by each third service.

[0298] The target service platform resets the seven-layer protocol stack forwarding path information for each third service to ensure that the service access request sent by the user through the client can be successfully distributed to the corresponding service container of the node for subsequent processing.

[0299] After the target service platform completes the configuration of various network rules, refer to Figure 5 The flowchart shown shows the process of a client accessing a service platform.

[0300] S501: The target service platform receives the domain name resolution request sent by the client, and performs domain name resolution processing on the original external access service domain name of the service to be accessed in the original service platform carried in the domain name resolution request to obtain the target gateway access address of the corresponding target load balancing gateway.

[0301] The cloud service system provided in the embodiment of the present application includes multiple load balancing gateways. According to the request types distributed by the load balancing gateways, the load balancing gateways are divided into two categories: domain name resolution load balancing gateways and service access load balancing gateways. If a load balancing gateway can distribute both domain name resolution requests and service access requests, then the load balancing gateway is both a domain name resolution load balancing gateway and a service access load balancing gateway.

[0302] Before executing step 501, the user first sends a domain name resolution request to the domain name resolution load balancing gateway through the client, and the domain name resolution request carries the original external access service domain name of the service to be accessed in the original service platform; the domain name resolution load balancing gateway then selects a node from the target service platform as the domain name resolution node according to the distribution rule, and performs domain name resolution processing on the original external access service domain name. The destination address of the domain name resolution request is modified to the node IP address of the domain name resolution node, the destination port of the domain name resolution request is modified to the node access port of the domain name resolution node, and the domain name resolution request is distributed to the domain name resolution node.

[0303] When executing step 501, the target service platform obtains the domain name resolution request sent by the client from the domain name resolution load balancing gateway through the locally set domain name resolution node. Since the domain name resolution node and the external domain name resolution container inside the domain name resolution node are located in different network layers and cannot communicate directly, it is necessary to forward the domain name resolution request to the external domain name resolution container through the interception container (iptables) inside the domain name resolution node, and then the external domain name resolution container performs domain name resolution processing on the original external access service domain name to obtain the target gateway access address of the corresponding target load balancing gateway.

[0304] S502: The target service platform returns the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and the data to be processed to the target load balancing gateway based on the target gateway access address.

[0305] The external domain name resolution container returns the target gateway access address to the client through the original domain name resolution request transmission path. In the embodiment of the present application, the service access load balancing gateway associated with the target gateway access address is the target load balancing gateway, and the client sends the first service access request to the target load balancing gateway through the target gateway access address, wherein the first service access request carries the original external access service domain name and the data to be processed.

[0306] The target load balancing gateway sends the first service access request to a node in the target service platform according to the preset distribution rule, so the node is also called a service access node. The distribution rule has been introduced in the previous text and will not be repeated here.

[0307] Specifically, the target load balancing gateway modifies the destination address of the first service access request to the node IP address of the node, modifies the destination port of the first service access request to the node access port of the node, obtains the second service access request, and sends the second service access request to the service access node of the target service platform.

[0308] According to the original external access service domain name and the stored target load balancing information set, the target node address information associated with the original external access service domain name is determined, wherein the target node address information includes the target node IP address and the target node access port.

[0309] S503: The target service platform receives a second service access request sent by the target load balancing gateway. The second service access request carries the data to be processed and the target node address information mapped to the original external access service domain name in the target service platform.

[0310] Optionally, the target service platform and the locally configured service access node obtain a second service access request sent by the target load balancing gateway.

[0311] S504: The target service platform sends the data to be processed to the service container of the corresponding node for processing based on the target node address information.

[0312] Optionally, in an embodiment of the present application, different request transmission paths are provided for different types of original service access requests.

[0313] (1) If the second service access request is a request with a four-layer protocol stack, the service access node determines the target node address information of the target node based on the original external access service domain name, and sends the second service access request to the service container running on the target node. The service container obtains the data to be processed in the second service access request and processes the data to be processed.

[0314] Specifically, when the second service access request enters the interior of the service access node, it is intercepted by the interception container located inside the node. The interception container first determines that the second service access request is a request with a four-layer protocol stack based on the destination port of the second service access request; the interception container then obtains the corresponding target container unit label based on the original external access service domain name carried in the second service access request, and then obtains the node address information of the target node running the container unit based on the target container unit label. In order to ensure the high availability of the service container and prevent the situation where the service cannot be provided due to a single point failure, each service container is usually configured on a different container unit, and each container unit is scheduled to a different node of the original service platform. Therefore, the service to be accessed will correspond to multiple nodes. The interception container selects one of the nodes as the target node, modifies the destination address of the second service access request to the node IP address of the target node, modifies the destination port of the second service access request to the node access port of the target node, and sends the second service access request to the node. In this way, whether the service access node is selected as the target node or other nodes in the target service platform are selected as the target node, the interception container can be used for internal communication of the service platform to send the second service access request to the node running the target container unit.

[0315] 1) If the service access node is selected as the target node, the interception container determines the corresponding service address and service access port based on the original external access service domain name, and then determines the corresponding target container unit address and target container unit access port according to the service address and service access port. The interception container modifies the destination address of the second service access request to the target container unit address, modifies the destination port of the second service access request to the target container unit access port, sends the second service access request to the corresponding container unit, and the service container running on the container unit and listening to the destination port receives the second service access request. Finally, the service container provides the user with corresponding services by processing the data to be processed carried in the second service access request.

[0316] 2) If other nodes are selected as target nodes, the interception container inside the other nodes forwards the second service access request to the corresponding service container according to the original external access service domain name. The specific steps are the same as step 1), please refer to the above, and will not be repeated here.

[0317] (2) If the second service access request is a request with a seven-layer protocol stack, the second service access request is sent to the service container running on the service access node according to the preset target seven-layer protocol stack forwarding path information, and the service container obtains the data to be processed in the second service access request and processes the data to be processed.

[0318] When the second service access request enters the service access node, it is intercepted by the interception container located inside the node. The interception container first determines that the second service access request is a request with a seven-layer protocol stack based on the destination port of the second service access request, and then the interception container forwards the second service access request to the seven-layer request processing container (ingress).

[0319] The seven-layer request processing container matches the configured target seven-layer protocol stack forwarding path information according to the original external access service domain name carried by the second service access request, obtains the corresponding service address and service access port, and the seven-layer request processing container modifies the destination address of the second service access request to the service address, and modifies the destination address of the second service access request to the service access port.

[0320] In the process of the seven-layer request processing container forwarding the second service access request, the request is intercepted again by the interception container. The interception container determines the corresponding container unit address and container unit access port based on the service address and service access port, and modifies the destination address of the second service access request to the container unit address, modifies the destination port of the second service access request to the container unit access port, and sends the second service access request to the corresponding container unit. The service container running on the container unit and listening to the destination port receives the second service access request. Finally, the service container provides the user with corresponding services by processing the data to be processed carried in the second service access request.

[0321] Among them, when the second service access request is a request with a seven-layer protocol stack, no matter whether the service access node is selected as the target node or other nodes in the target service platform are selected as the target node, the interception container can be used for internal communication of the service platform to send the second service access request to the node running the target container unit.

[0322] For ease of understanding, combined Figure 6a The process diagram shown is Figure 6b The logical schematic diagram shown takes a specific embodiment as an example to illustrate the process of a client accessing a service platform.

[0323] S601: The user sends a domain name resolution request to the domain name resolution load balancing gateway through the client;

[0324] S602: The domain name resolution load balancing gateway distributes the domain name resolution request to node a in the OAM service platform according to the distribution rule;

[0325] S603: The interception container inside node a intercepts the domain name resolution request and forwards the domain name resolution request to an external domain name resolution container;

[0326] S604: The external domain name resolution container obtains the original external access service domain name carried in the domain name resolution request, and performs domain name resolution processing on the original external access service domain name to obtain the target gateway access address of the corresponding target load balancing gateway;

[0327] S605: The external domain name resolution container returns the target gateway access address to the client through the original domain name resolution request transmission path;

[0328] S606: The client sends the first service access request to the target load balancing gateway through the target gateway access address;

[0329] S607: The target load balancing gateway uses node b in the target service platform as a service access node, and generates a second service access request according to the target node address information of node b;

[0330] S608: The target load balancing gateway distributes the second service access request to node b;

[0331] S609: The interception container in node b intercepts the second service access request. If the interception container determines that the second service access request is a request with a four-layer protocol stack, the interception container forwards the second service access request to a corresponding service container, and the service container provides subsequent services.

[0332] S610: The interception container in node b intercepts the second service access request. If the interception container determines that the second service access request is a request with a seven-layer protocol stack, the interception container forwards the second service access request to the seven-layer request processing container and executes step 611;

[0333] S611: During the process of the layer-7 request processing container forwarding the second service access request to the corresponding service, the second service access request is intercepted again by the interception container. The interception container obtains the corresponding container unit address and container unit access port according to the destination address and destination port of the request, and forwards the second service access request to the service container running in the container unit, which provides subsequent services.

[0334] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a schematic diagram of the structure of a device for accessing a service platform. Figure 7 As shown, the access device 700 of the service platform may include:

[0335] The domain name resolution unit 701 is used to receive the domain name resolution request sent by the client, and perform domain name resolution processing on the original external access service domain name of the service to be accessed in the original service platform carried in the domain name resolution request to obtain the target gateway access address of the corresponding target load balancing gateway;

[0336] The transmission unit 702 is used to return the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and the data to be processed to the target load balancing gateway based on the target gateway access address;

[0337] The processing unit 703 is used to receive a second service access request sent by the target load balancing gateway, where the second service access request carries the data to be processed and the target node address information mapped by the original external access service domain name in the target service platform;

[0338] Based on the target node address information, the data to be processed is sent to the service container of the corresponding node for processing.

[0339] Optionally, before receiving the domain name resolution request sent by the client, the apparatus further includes a first configuration unit 704, and the first configuration unit 704 is used to:

[0340] Transfer and configure various services provided by the original service platform to the target service platform;

[0341] Obtaining a set of first services provided by the original service platform; wherein each first service is a service that needs to reset load balancing information after the transfer configuration;

[0342] For each first service in the first service set, perform the following operations respectively:

[0343] Obtain a first service identifier of the first service after the transfer configuration;

[0344] Based on the first service identifier, obtaining a first container unit tag after the transfer configuration; the first container unit tag is an identifier of a node running the first service in the target service platform;

[0345] Associating a first external access service domain name, a first service identifier, and a first container unit tag after transfer configuration of a first service to obtain a corresponding first gateway access address after transfer configuration;

[0346] The first external access service domain name, the first service identifier, the first container unit tag, and the first gateway access address are associated to obtain load balancing information reset for a first service.

[0347] Optionally, the first configuration unit 704 is used to:

[0348] Obtain the original load balancing information of the original load balancing gateway before the transfer configuration;

[0349] Based on each original load balancing information and a preset load balancing information screening rule, at least the following operations are performed to obtain a first service set:

[0350] If it is determined based on the original load balancing information associated with a service that the access link of the load balancing gateway associated with a service has been reconfigured, then remove the service from the services;

[0351] If the original load balancing information associated with a service is determined to indicate that the node running the service before the transfer configuration is located on another service platform, or that the service is running on a component outside the original service platform, then remove the service from the services;

[0352] If it is determined that the original load balancing information associated with a service indicates that the original service access request corresponding to the service is a request with a seven-layer protocol stack, then the service is removed from various services.

[0353] Optionally, the first configuration unit 704 determines that the access link of the load balancing gateway of a service has been reconfigured in the following manner:

[0354] If it is determined that the first external access service domain name included in the original load balancing information of a service has been configured with the corresponding target load balancing information, it is determined that the access link of the load balancing gateway of the service has been reconfigured;

[0355] The first configuration unit 704 determines the original load balancing information associated with a service in the following manner, indicating that the node running a service before the transfer configuration is located on another service platform, or indicating that a service is running on a component outside the original service platform:

[0356] If no corresponding match is obtained in the node configuration information of the original service platform based on the node address information included in the original load balancing information of a service, it is determined that the node running the service before the transfer configuration is located on another service platform, or it is determined that the service is running on a component outside the original service platform;

[0357] The first configuration unit 704 determines the original load balancing information associated with a service in the following manner, indicating that the original service access request corresponding to the service is a request with a seven-layer protocol stack:

[0358] If the access port of the original load balancing gateway included in the original load balancing information of a service and the node access port of the original service platform are both set ports, then it is determined that the original service access request corresponding to a service is a request with a seven-layer protocol stack.

[0359] Optionally, the first configuration unit 704 is used to:

[0360] Obtain a first component identifier of a first service before transferring configuration;

[0361] Determine a first component identifier of a first service after the configuration is transferred based on the first component identifier before the configuration is transferred and the component change comparison information before and after the configuration is transferred;

[0362] Based on the first component identifier after the transfer configuration and the first service port information of a first service before the transfer configuration, the first component after the transfer configuration and the first service identifier of the first service are determined.

[0363] Optionally, the first configuration unit 704 is used to:

[0364] If an original service access request corresponding to a first service is a request with a seven-layer protocol stack, a service address of the first service before the transfer configuration is obtained, and based on the service address before the transfer configuration, a first component identifier of the first service before the transfer configuration is obtained;

[0365] If an original service access request corresponding to a first service is a request with a four-layer protocol stack, or if an original service access request corresponding to a first service is a request with a seven-layer protocol stack and a node access port of a first service before transfer configuration is a non-set port, then a node access port of the first service before transfer configuration is obtained, and based on the node access port before transfer configuration, a first component identifier of the first service before transfer configuration is obtained.

[0366] Optionally, before receiving the domain name resolution request sent by the client, the apparatus further includes a second configuration unit 705, and the second configuration unit 705 is used to:

[0367] Transfer and configure various services provided by the original service platform to the target service platform;

[0368] Obtaining a set of second services provided by the original service platform; wherein each second service is a service that requires resetting domain name resolution information after the transfer configuration;

[0369] For each second service in the second service set, perform the following operations respectively:

[0370] If an original service access request corresponding to a second service is a request with a seven-layer protocol stack, a second gateway access address of the second service after the transfer configuration is determined, and a second external access service domain name of the second service and a second gateway access address are registered for the domain name;

[0371] If an original service access request corresponding to a second service is a request with a four-layer protocol stack, or if an original service access request corresponding to a second service is a request with a seven-layer protocol stack and a node access port of a second service before the transfer configuration is a non-set port, then a second service identifier of a second service after the transfer configuration is obtained, and based on the second service identifier, a second gateway access address of the second service after the transfer configuration is obtained, and domain name registration processing is performed on a second external access service domain name and a second gateway access address of a second service.

[0372] Optionally, the second configuration unit 705 is used to:

[0373] Obtain the original domain name resolution information corresponding to each service provided by the original service platform before the transfer configuration;

[0374] Based on each original domain name resolution information and a preset domain name resolution information screening rule, for each service provided by the original service platform, at least the following operations are performed to obtain a second service set:

[0375] If it is determined based on the original domain name resolution information associated with a service that the original domain name resolution information associated with a service has been reconfigured, then the service is removed from the various services;

[0376] If the original domain name resolution information associated with a service is determined, indicating that the access service domain name associated with the service is an internal access service domain name, then the service is removed from the various services;

[0377] If the original domain name resolution information associated with a service is determined, indicating that the external access service domain name associated with a service is in a region other than the region to which the original service platform belongs, then the service is removed from all services.

[0378] Optionally, the second configuration unit 705 is used to:

[0379] If an original service access request corresponding to a second service is a request with a four-layer protocol stack, determining a second service identifier of the second service after the transfer configuration based on a second node access port of the second service before the transfer configuration;

[0380] If an original service access request corresponding to a second service is a request with a seven-layer protocol stack, and a node access port of a second service before the transfer configuration is a non-set port, then based on a container port of the second service before the transfer configuration, a second service identifier of the second service after the transfer configuration is determined.

[0381] Optionally, before obtaining the domain name resolution request sent by the client, the apparatus further includes a third configuration unit 706, and the third configuration unit 706 is used to:

[0382] Transfer and configure various services provided by the original service platform to the target service platform;

[0383] Obtaining a set of third services provided by the original service platform; wherein each third service is a service that requires resetting the seven-layer protocol stack forwarding path information after the transfer configuration;

[0384] For each third service in the third service set, perform the following operations respectively:

[0385] Obtain a third service identifier of the third service after the configuration is transferred;

[0386] Based on the third service identifier, the service configuration information after the transfer configuration is obtained, and a third external access service domain name of a third service, the third service identifier and the service configuration information after the transfer configuration are mapped into a seven-layer protocol stack forwarding path information.

[0387] Optionally, the third configuration unit 706 is used to:

[0388] Obtain the services provided by the original service platform and the corresponding original seven-layer protocol stack forwarding path information before the transfer configuration;

[0389] Based on the forwarding path information of each original seven-layer protocol stack and the preset forwarding path information screening rule, for each service provided by the original service platform, at least the following operations are performed to obtain a third service set:

[0390] Obtaining a third external access service domain name before the transfer configuration from the original seven-layer protocol stack forwarding path information associated with a service;

[0391] If it is determined according to the third external access service domain name that the seven-layer protocol stack forwarding path information associated with a service has been reconfigured, then a service is removed from the services.

[0392] Optionally, the third configuration unit 706 is used to:

[0393] Obtain a second component identifier of a third service before the configuration is transferred;

[0394] Determine a second component identifier of a third service after the transfer configuration based on the second component identifier before the transfer configuration and the component change comparison information before and after the transfer configuration;

[0395] Based on the second component identifier after the transfer configuration, a third service identifier of the third service after the transfer configuration is determined.

[0396] Optionally, the third configuration unit 706 is used to:

[0397] If a service is provided on the component corresponding to the second component identifier after the transfer configuration, then based on the second component identifier after the transfer configuration, the component configuration information after the transfer configuration is obtained, and based on the component configuration information after the transfer configuration, the third service identifier after the transfer configuration is obtained;

[0398] If at least two services are provided on the component corresponding to the second component identifier after the transfer configuration, a third service identifier after the transfer configuration is obtained from the component configuration information after the transfer configuration based on the second component identifier after the transfer configuration and the service configuration information before the transfer configuration.

[0399] Optionally, the domain name resolution unit 701 is used to:

[0400] The target service platform obtains the domain name resolution request sent by the client from the domain name resolution load balancing gateway through the locally set domain name resolution node.

[0401] Optionally, the processing unit 703 is configured to:

[0402] The target service platform obtains the second service access request sent by the target load balancing gateway through the locally set service access node.

[0403] Optionally, the processing unit 703 is configured to:

[0404] If the second service access request is a request with a four-layer protocol stack, the target node address information of the target node is obtained according to the original external access service domain name, and the second service access request is sent to the service container running on the target node. The service container obtains the data to be processed in the second service access request and processes the data to be processed;

[0405] If the second service access request is a request with a seven-layer protocol stack, the second service access request is sent to the service container running on the service access node according to the preset target seven-layer protocol stack forwarding path information. The service container obtains the data to be processed in the second service access request and processes the data to be processed.

[0406] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0407] After introducing the method and apparatus for accessing the service platform according to the exemplary embodiment of the present application, next, a computer device according to another exemplary embodiment of the present application is introduced.

[0408] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0409] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a computer device, see Figure 8 As shown, the computer device 800 may include at least a processor 801 and a memory 802. The memory 802 stores program codes, and when the program codes are executed by the processor 801, the processor 801 executes the steps of any of the above-mentioned methods for accessing the service platform.

[0410] In some possible implementations, the computing device according to the present application may include at least one processor and at least one memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the method for accessing the service platform according to various exemplary implementations of the present application described above in this specification. For example, the processor may execute the following steps: Figure 5 Follow the steps shown in .

[0411] Refer to the following Fig. 9 The computing device 900 according to this embodiment of the present application is described in detail. The computing device 900 in FIG6 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present application.

[0412] like Fig. 9 As shown, the computing device 900 is in the form of a general computing device. The components of the computing device 900 may include but are not limited to: at least one processing unit 901, at least one storage unit 902, and a bus 903 connecting different system components (including the storage unit 902 and the processing unit 901).

[0413] Bus 903 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0414] The storage unit 902 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 9021 and / or a cache memory unit 9022 , and may further include a read-only memory (ROM) 9023 .

[0415] The storage unit 902 may also include a program / utility 9025 having a set (at least one) of program modules 9024, such program modules 9024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0416] The computing device 900 may also communicate with one or more external devices 904 (e.g., keyboards, pointing devices, etc.), one or more devices that enable a user to interact with the computing device 900, and / or any device that enables the computing device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 905. In addition, the computing device 900 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 906. As shown, the network adapter 906 communicates with other modules for the computing device 900 via a bus 903. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computing device 900, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0417] Based on the same inventive concept as the above method embodiment, various aspects of the service platform access method provided by the present application can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the service platform access method according to various exemplary embodiments of the present application described above in this specification. For example, the electronic device can execute the following steps: Figure 5 Follow the steps shown in .

[0418] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0419] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0420] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for accessing a service platform, It is characterized in that include: The target service platform receives the domain name resolution request sent by the client, and performs domain name resolution processing on the original external access service domain name of the service to be accessed in the original service platform carried in the domain name resolution request, and obtains the target gateway access address of the corresponding target load balancing gateway; The target service platform returns the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and the data to be processed to the target load balancing gateway based on the target gateway access address; The target service platform receives a second service access request sent by the target load balancing gateway, wherein the second service access request carries the data to be processed and target node address information mapped by the original external access service domain name in the target service platform; The target service platform sends the data to be processed to the service container of the corresponding node for processing based on the target node address information.

2. The method according to claim 1, It is characterized in that Before the target service platform receives the domain name resolution request sent by the client, the process further includes: Transfer and configure various services provided by the original service platform to the target service platform; Obtaining a first service set provided by the original service platform; wherein each first service is a service that requires resetting load balancing information after the transfer configuration; For each first service in the first service set, perform the following operations respectively: Obtain a first service identifier of the first service after the transfer configuration; Based on the first service identifier, obtaining a first container unit tag after the transfer configuration; the first container unit tag is an identifier of a container unit running the first service in the target service platform; Associating the first external access service domain name of the first service, the first service identifier and the first container unit tag after the transfer configuration to obtain a corresponding first gateway access address after the transfer configuration; The first external access service domain name, the first service identifier, the first container unit tag, and the first gateway access address are associated to obtain load balancing information reset for the one first service.

3. The method according to claim 2, It is characterized in that The obtaining of the first service set provided by the original service platform includes: Obtain the original load balancing information of the original load balancing gateway before the transfer configuration; Based on the respective original load balancing information and the preset load balancing information screening rule, at least the following operations are performed to obtain the first service set: If it is determined according to the original load balancing information associated with a service that the access link of the load balancing gateway associated with the service has been reconfigured, then the service is removed from the services; If it is determined that the original load balancing information associated with a service indicates that the node running the service before the transfer configuration is located on another service platform, or indicates that the service is running on a component outside the original service platform, then the service is removed from the various services; If it is determined that the original load balancing information associated with a service indicates that the original service access request corresponding to the service is a request with a seven-layer protocol stack, then the service is removed from the various services.

4. The method according to claim 3, It is characterized in that Determine that the access link of the load balancing gateway of the service has been reconfigured in the following manner: If it is determined that the first external access service domain name included in the original load balancing information of the service has been correspondingly configured with target load balancing information, it is determined that the access link of the load balancing gateway of the service has been reconfigured; The original load balancing information associated with a service is determined in the following manner, indicating that the node running the service before the transfer configuration is located on another service platform, or indicating that the service is running on a component outside the original service platform: If no corresponding matching item is obtained in the node configuration information of the original service platform based on the node address information included in the original load balancing information of the one service, it is determined that the node running the one service before the transfer configuration is located on the other service platform, or it is determined that the one service is running on a component outside the original service platform; The original load balancing information associated with a service is determined in the following manner, indicating that the original service access request corresponding to the service is a request with a seven-layer protocol stack: If the access port of the original load balancing gateway included in the original load balancing information of the service and the node access port of the original service platform are both set ports, it is determined that the original service access request corresponding to the service is a request with a seven-layer protocol stack.

5. The method according to claim 2, It is characterized in that The obtaining of a first service identifier of a first service after the transfer configuration includes: Obtaining a first component identifier of the first service before the configuration is transferred; Determine a first component identifier of the first service after the transfer configuration based on the first component identifier before the transfer configuration and the component change comparison information before and after the transfer configuration; Based on the first component identifier after the transfer configuration and the first service port information of the first service before the transfer configuration, the first component after the transfer configuration and the first service identifier for the first service are determined.

6. The method according to claim 5, It is characterized in that The obtaining of a first component identifier of a first service before the transfer configuration includes: If the original service access request corresponding to the first service is a request with a seven-layer protocol stack, obtaining a service address of the first service before the transfer configuration, and obtaining a first component identifier of the first service before the transfer configuration based on the service address before the transfer configuration; If the original service access request corresponding to the first service is a request with a four-layer protocol stack, or if the original service access request corresponding to the first service is a request with a seven-layer protocol stack and the node access port of the first service before the transfer configuration is a non-set port, then the node access port of the first service before the transfer configuration is obtained, and based on the node access port before the transfer configuration, the first component identifier of the first service before the transfer configuration is obtained.

7. The method according to claim 1, It is characterized in that Before the target service platform receives the domain name resolution request sent by the client, the process further includes: Transfer and configure various services provided by the original service platform to the target service platform; Obtaining a set of second services provided by the original service platform; wherein each second service is a service that requires resetting domain name resolution information after the transfer configuration; For each second service in the second service set, perform the following operations respectively: If the original service access request corresponding to a second service is a request with a seven-layer protocol stack, determining a second gateway access address of the second service after the transfer configuration, and performing domain name registration processing on a second external access service domain name of the second service and the second gateway access address; If the original service access request corresponding to the second service is a request with a four-layer protocol stack, or if the original service access request corresponding to the second service is a request with a seven-layer protocol stack and the node access port of the second service before the transfer configuration is a non-set port, then the second service identifier of the second service after the transfer configuration is obtained, and based on the second service identifier, the second gateway access address of the second service after the transfer configuration is obtained, and domain name registration processing is performed on the second external access service domain name of the second service and the second gateway access address.

8. The method according to claim 7, It is characterized in that The obtaining of the second service set provided by the original service platform includes: Obtaining the original domain name resolution information corresponding to each of the services provided by the original service platform before the transfer configuration; Based on each original domain name resolution information and a preset domain name resolution information screening rule, for each service provided by the original service platform, at least the following operations are performed to obtain the second service set: If it is determined according to the original domain name resolution information associated with a service that the original domain name resolution information associated with the service has been reconfigured, then the service is removed from the services; If it is determined that the original domain name resolution information associated with a service indicates that the access service domain name associated with the service is an internal access service domain name, then the service is removed from the services; If the original domain name resolution information associated with a service is determined, indicating that the external access service domain name associated with the service is in a region other than the region to which the original service platform belongs, then the service is removed from the various services.

9. The method according to claim 7, It is characterized in that The obtaining of a second service identifier of the second service after the transfer configuration includes: If the original service access request corresponding to the one second service is a request with a four-layer protocol stack, determining a second service identifier of the one second service after the transfer configuration based on the second node access port of the one second service before the transfer configuration; If the original service access request corresponding to the second service is a request with a seven-layer protocol stack, and the node access port of the second service before the transfer configuration is a non-set port, then based on the container port of the second service before the transfer configuration, determine the second service identifier of the second service after the transfer configuration.

10. The method according to claim 1, It is characterized in that Before the target service platform obtains the domain name resolution request sent by the client, it also includes: Transfer and configure various services provided by the original service platform to the target service platform; Obtaining a set of third services provided by the original service platform; wherein each third service is a service that requires resetting the seven-layer protocol stack forwarding path information after the transfer configuration; For each third service in the third service set, the following operations are performed respectively: Obtain a third service identifier of the third service after the configuration is transferred; Based on the third service identifier, the service configuration information after the transfer configuration is obtained, and the third external access service domain name of the third service, the third service identifier and the service configuration information after the transfer configuration are mapped into a seven-layer protocol stack forwarding path information.

11. The method according to claim 10, It is characterized in that The obtaining of a third service set provided by the original service platform includes: Obtaining the original seven-layer protocol stack forwarding path information corresponding to each service provided by the original service platform before the transfer configuration; Based on the forwarding path information of each original seven-layer protocol stack and the preset forwarding path information screening rule, for each service provided by the original service platform, at least the following operations are performed to obtain the third service set: Obtaining a third external access service domain name before the transfer configuration from the original seven-layer protocol stack forwarding path information associated with a service; If it is determined according to the third external access service domain name that the seven-layer protocol stack forwarding path information associated with the service has been reconfigured, the service is removed from the services.

12. The method according to claim 10, It is characterized in that The obtaining of a third service identifier of a third service after the transfer configuration includes: Obtaining a second component identifier of the third service before the transfer configuration; Determine the second component identifier of the third service after the transfer configuration based on the second component identifier before the transfer configuration and the component change comparison information before and after the transfer configuration; Based on the second component identifier after the transfer configuration, a third service identifier of the third service after the transfer configuration is determined.

13. A device for accessing a service platform, It is characterized in that include: A domain name resolution unit is used to receive a domain name resolution request sent by a client, and perform domain name resolution processing on the original external access service domain name of the service to be accessed in the original service platform carried in the domain name resolution request to obtain a target gateway access address of the corresponding target load balancing gateway; A transmission unit, configured to return the target gateway access address to the client, so that the client sends a first service access request carrying the original external access service domain name and the data to be processed to the target load balancing gateway based on the target gateway access address; A processing unit, configured to receive a second service access request sent by the target load balancing gateway, wherein the second service access request carries the data to be processed and target node address information mapped to the original external access service domain name in the target service platform; Based on the target node address information, the data to be processed is sent to the service container of the corresponding node for processing.

14. A focusing device, It is characterized in that It comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, It is characterized in that It includes program codes. When the program product is run on a focusing device, the program codes are used to enable the focusing device to execute the steps of the method according to any one of claims 1 to 12.