Proprietary cloud system and data packet sending method, device, product and storage medium

By configuring process generation and applying service conversion rules in a proprietary cloud system, the problem that public cloud virtual switches do not support the Anycast protocol is solved, and the nearby forwarding effect of the Anycast protocol is achieved, improving the functions and reliability of the proprietary cloud.

CN119383151BActive Publication Date: 2025-04-08ALIBABA CLOUD FEITIAN (HANGZHOU) CLOUD COMPUTING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411997489.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-08
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The virtual switches of public clouds do not support the Anycast protocol, which causes the instances in the user's proprietary cloud system to be unable to use the Anycast protocol, affecting the functions and use of the proprietary cloud.

Method used

In a proprietary cloud system, the cluster virtual IP address and the real IP address of the service instance are obtained by the configuration process, the real IP address of the local or remote service instance is determined, and local or remote service conversion rules are generated to the operating system to realize the destination address conversion of the data packet.

Benefits of technology

The simulation realizes the nearby forwarding effect of the Anycast protocol, ensuring that the data packets of the application process can be automatically forwarded by the operating system to local or remote service instances, improving service efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383151B_ABST
    Figure CN119383151B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a private cloud system and a data packet sending method, device, product and storage medium. The private cloud system includes a virtual private network, in which service instances and ordinary instances run, and a service cluster is pre-configured with a cluster virtual IP address; an application process runs in the ordinary instance, and the application process is used to generate a data packet; the method is applied to a configuration process running in the ordinary instance, and the method includes: obtaining configuration information, the configuration information includes: a cluster virtual IP address and a real IP address of a service instance in the service cluster; based on the configuration information, determining a local real IP address of a local service instance located in the same area as the process; if the local real IP address can be connected, generating a local service conversion rule and providing it to the operating system of the ordinary instance, the local service conversion rule is used to instruct the operating system to convert the destination address in the data packet to the local real IP address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of cloud computing technology, and in particular to a proprietary cloud system and a data packet sending method, device, product and storage medium. Background Art

[0002] At present, some cloud service providers can realize private cloud through some technologies. Private cloud can be equivalent to building the user's private cloud in the data center of the cloud service company, and realizing the cloud platform system on the public cloud architecture in a manner similar to cloud hosting. However, at present, the virtual switch of the public cloud does not support the Anycast protocol, resulting in the inability of the user's private cloud system instance to use the Anycast protocol. Summary of the invention

[0003] To overcome the problems existing in the related art, this specification provides a proprietary cloud system and a data packet sending method, device, product and storage medium.

[0004] According to a first aspect of an embodiment of this specification, a method for sending a data packet in a private cloud system is provided, wherein the private cloud system includes at least one virtual private network, wherein a service instance and a common instance are running in the virtual private network, and the service instance running in the at least one virtual private network is used as a service cluster and is pre-configured with a cluster virtual IP address;

[0005] An application process is running in the common instance, and the application process is used to generate a data packet whose destination address is the cluster virtual IP address to request a service of the service cluster;

[0006] The method is applied to the configuration process running in the common instance, and the method includes:

[0007] Acquire configuration information, the configuration information including: the cluster virtual IP address and the real IP address of the service instance in the service cluster;

[0008] Based on the configuration information, determine the local real IP address of the local service instance located in the same region as the process;

[0009] If the local real IP address can be connected, a local service conversion rule is generated and provided to the operating system of the common instance, wherein the local service conversion rule is used to instruct the operating system to convert the destination address in the data packet to the local real IP address.

[0010] According to a second aspect of the embodiment, there is provided a private cloud system, the private cloud system comprising at least one virtual private network, a common instance running in the virtual private network, and an application process for generating a data packet running in the common instance;

[0011] A service instance serving the application process is also running in the virtual private network, and the service instance running in at least one virtual private network is used as a service cluster and is configured with a cluster virtual IP address;

[0012] A configuration process is running in the common instance, and the configuration process is used to execute the steps of the method described in the first aspect.

[0013] According to a third aspect of an embodiment of this specification, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method embodiment described in the first aspect are implemented.

[0014] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method embodiment described in the first aspect are implemented.

[0015] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method embodiment described in the first aspect are implemented.

[0016] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:

[0017] In the embodiments of this specification, the user's private cloud system simulates and implements the nearest forwarding effect of the Anycast protocol, wherein the private cloud system includes at least one virtual private network, in which a service instance can be run, and a common instance can also be run in the virtual private network. Each service instance running in each virtual private network can be used as a service cluster and pre-configured with a cluster virtual IP address; therefore, the application process running in the common instance can generate a data packet with the destination address being the cluster virtual IP address to request the service of the service cluster. In addition, in this embodiment, a configuration process is also run in the common instance, and the configuration process can obtain configuration information, and the configuration information includes: the cluster virtual IP address and the real IP address of the service instance in the service cluster; based on the configuration information, the local real IP address of the local service instance located in the same area as the process is determined; if the local real IP address can be connected, a local service conversion rule is generated and provided to the operating system of the common instance, and the local service conversion rule is used to instruct the operating system to convert the destination address in the data packet to the local real IP address. In this way, this embodiment automatically configures the local service conversion rules to the operating system through the configuration process, so that the data packets of the application process can be automatically forwarded to the local service instance by the operating system, realizing the local forwarding effect of the Anycast protocol.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the embodiments of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of a cloud environment shown in this specification according to an exemplary embodiment.

[0020] Figure 2A It is a schematic diagram of a private cloud system shown in this specification according to an exemplary embodiment.

[0021] Figure 2B The present specification is a flowchart of a method for sending a data packet in a private cloud system according to an exemplary embodiment.

[0022] Figure 2C It is a schematic diagram of a method for sending data packets in a private cloud system according to an exemplary embodiment of the present specification.

[0023] Figure 3 It is a hardware structure diagram of a computer device where a data packet sending device in a private cloud system is located according to an exemplary embodiment shown in this specification.

[0024] Figure 4It is a block diagram of a data packet sending device in a private cloud system shown in this specification according to an exemplary embodiment. DETAILED DESCRIPTION

[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.

[0026] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0027] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0028] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0029] Public cloud refers to cloud services owned and operated by service providers, which are provided to users through the Internet. Users do not need to own infrastructure or maintain any hardware. Public cloud services can include different levels of services such as Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS).

[0030] Public cloud can meet the computing needs of most users, but for some users, public cloud may not meet the needs, which requires providing customers with dedicated cloud computing services, namely private cloud. Private cloud solutions usually deploy various cloud computing applications provided by cloud computing service providers in the user's own data center. It can be understood that private cloud platforms are platforms that provide virtualized resource services completely for a single organization.

[0031] At present, some cloud service providers can realize private cloud through some technologies. Private cloud is equivalent to building the user's private cloud in the data center of the cloud service company, and realizing the cloud platform system on the public cloud architecture in a manner similar to cloud hosting. Therefore, the design of private cloud provides the same elastic scaling capability as public cloud, so that private cloud can be seamlessly connected with the customer's existing account system and operation and maintenance system, and also solves the strong coupling limitation of private cloud to physical equipment.

[0032] like Figure 1 The figure is a schematic diagram of a cloud environment according to an exemplary embodiment of the present specification. An isolated network area can be constructed on a public cloud using underlying technology, which can be called a virtual private network VPC (Virtual Private Cloud). This virtual network area enables users to control the virtual network environment, including selecting their own IP address range, creating subnets, and configuring routing tables and network gateways.

[0033] Based on the current mainstream tunnel technology, the private network isolates the virtual network. Each VPC can have an independent tunnel number, and one tunnel number corresponds to one virtualized network.

[0034] One or more instances, such as Elastic Compute Service (ECS) instances, can run in a VPC. Data packets transmitted between ECS instances are encapsulated with tunnels and identified with unique tunnel numbers, and then transmitted through the physical network.

[0035] Since ECS instances in different VPCs are located in different tunnel numbers and are in two different routing planes, ECS instances in different VPCs cannot communicate with each other and are naturally isolated.

[0036] Specifically, each ECS instance can run the VXLAN (Virtual eXtensible Local Area Network) component after it is created. VXLAN (Virtual Extensible Local Area Network) is a network virtualization technology based on the UDP protocol, designed to build a virtualized network layer on the existing physical network architecture to achieve the expansion of the Layer 2 network and logical isolation in a multi-tenant environment. VXLAN can provide Layer 2 isolation between different VPCs (Virtual Private Clouds) by encapsulating Ethernet frames in UDP packets and using tunnel traversal technology, while achieving intercommunication at Layer 3, meeting the flexible network configuration and tenant isolation requirements in a cloud computing environment.

[0037] On the public cloud, corresponding private cloud services can be provided to different users. For example, Figure 1 3 VPCs are shown in the figure. Each VPC can be considered as a private cloud environment. Each user can create one or more VPCs. As an example, Figure 1 VPC1 and VPC2 shown in the figure may belong to user C1, and VPC3 may belong to user C2.

[0038] For user C1, the VPC1 and VPC2 created by him can correspond to the computer room environments in two different regions in the actual scenario. According to the needs, the user's different VPCs can be directly connected by dedicated network lines, so that the ECS instances in different VPCs can communicate through the dedicated network lines.

[0039] Some private clouds of some enterprise users, some services, such as DNS service (Domain Name System), YUM (Yellowdog Updater Modified, a package manager), and NTP (Network Time Protocol), require the support of the Anycast protocol to achieve the effect of local forwarding. Anycast is a network communication technology mainly used in Internet Protocol (IP) networks. It allows an IP address to be shared by multiple nodes. When a client accesses an Anycast IP, it will automatically route to the nearest backend IP to achieve the effect of local forwarding and load balancing.

[0040] However, a large number of private cloud environments are deployed in the VXLAN network of the public cloud. Currently, the virtual switches of the public cloud are implemented based on the VXLAN component, which does not support the Anycast protocol. As a result, services that rely on Anycast cannot be deployed normally, affecting the functions and usage of the private cloud.

[0041] Taking DNS service as an example, in some scenarios, some application processes are running in some instances within the VPC, and these application processes need to request DNS services from the DNS server; the working principle of the existing Anycast-DNS is: routers are connected to each other and use protocols to exchange routing information between each other, and DNS servers in multiple geographical locations use routing software (frrouting, bird, etc.) to each announce the same Anycast VIP address to their local gateway (router). When the DNS client initiates a query for the Anycast VIP address, the router will evaluate the available routes and select a subsequent DNS server to receive the request based on its own routing information (routing distance, hop information, ECMP algorithm, etc.).

[0042] In the related technology, the Anycast protocol is implemented at the switch level. However, in the private cloud scenario, due to the particularity of the Vxlan network, the public cloud virtual switch does not support the Anycast protocol. This is because the Anycast protocol requires some special configuration in the underlying hardware switch and needs to interact with the hardware switch. The virtual switch created on the public cloud is based on the VXLAN component and currently does not support requesting the underlying switch to implement the Anycast protocol related functions.

[0043] Based on this, the embodiment of this specification provides a method for sending data packets in a private cloud system, which simulates and implements the nearest forwarding effect of the Anycast protocol for the user's private cloud system, wherein the private cloud system includes at least one virtual private network, and a service instance can be run in the virtual private network, and a common instance can also be run in the virtual private network. Each service instance running in each virtual private network can be used as a service cluster and pre-configured with a cluster virtual IP address; therefore, the application process running in the common instance can generate a data packet with a destination address of the cluster virtual IP address to request the service of the service cluster. In addition, in this embodiment, a configuration process is also run in the common instance, and the configuration process can obtain configuration information, and the configuration information includes: the cluster virtual IP address and the real IP address of the service instance in the service cluster; based on the configuration information, the local real IP address of the local service instance located in the same area as the process is determined; if the local real IP address can be connected, a local service conversion rule is generated and provided to the operating system of the common instance, and the local service conversion rule is used to instruct the operating system to convert the destination address in the data packet to the local real IP address. In this way, this embodiment automatically configures the local service conversion rules to the operating system through the configuration process, so that the data packets of the application process can be automatically forwarded to the local service instance by the operating system, realizing the local forwarding effect of the Anycast protocol.

[0044] like Figure 2A FIG. 1 is a schematic diagram of a private cloud system according to an exemplary embodiment of the present specification. The private cloud system includes at least one virtual private network VPC. Figure 2A In the example, two VPCs (VPC1 and VPC2) are used. Service instances and common instances are running in the virtual private networks. The service instance running in at least one virtual private network is used as a service cluster and is pre-configured with a cluster virtual IP address. Figure 2A In VPC1, two common instances 11 and 12, and service instance 13 are run as an example. Optionally, other instances, such as ECS_14, can also be run in VPC1. In VPC2, one common instance 11, service instance 12, and service instance 13 are run as an example. Optionally, other instances, such as ECS_24, can also be run in VPC1.

[0045] An application process is running in the common instance, and the application process is used to generate a data packet whose destination address is the cluster virtual IP address to request a service of the service cluster;

[0046] A configuration process may also be run in a common instance, and the method is applied to the configuration process, such as Figure 2BAs shown, the steps of a method for sending a data packet in a private cloud according to an exemplary embodiment of the present specification may include the following steps:

[0047] In step 202, configuration information is obtained. The configuration information includes: the cluster virtual IP address and the real IP address of the service instance in the service cluster.

[0048] In step 204, based on the configuration information, a local real IP address of a local service instance located in the same area as the process is determined.

[0049] In step 206, if the local real IP address can be connected, a local service conversion rule is generated and provided to the operating system of the common instance, wherein the local service conversion rule is used to instruct the operating system to convert the destination address in the data packet into the local real IP address.

[0050] As an example, the number of VPCs in a private cloud system can be arbitrary, and the underlying hardware devices under the same VPC are configured in the same region. Different VPCs can be configured in different regions, such as in different computer rooms. For different VPCs, these VPCs can be connected by dedicated lines so that different VPCs can communicate with each other.

[0051] As an example, the number of instances running in the VPC can be arbitrary, and this embodiment does not limit this. As an example, the instance can be an instance of the ECS type.

[0052] As an example, the number of common instances and service instances in a VPC can be arbitrary, and this embodiment does not limit this. In addition, in actual applications, in addition to common instances and service instances, other instances can also be run in a VPC, and this embodiment does not limit this.

[0053] As an example, a common instance can be a program running in a VPC, and a service instance can be a program running in a VPC. A service instance can provide services for common instances. Therefore, from the perspective of the relationship between the two, a common instance can be considered a client, and a service instance can be considered a server that provides services to a client.

[0054] As an example, the number of application processes running in the common example for generating data packets may be arbitrary, and this embodiment does not limit this.

[0055] As an example, in this embodiment, the configuration process in the common instance is a process for configuring conversion rules. Optionally, the configuration process can also be started and run after the common instance is running.

[0056] As an example, all service instances in the private cloud system can form a service cluster, and the service cluster can provide services to all application processes. In this embodiment, in order to simulate the effect of Anycast, the service cluster can be pre-configured with a cluster virtual IP address, and each service instance also has a corresponding real IP address.

[0057] In this way, when the application process needs the service of the service cluster, it can generate a data packet sent to the cluster virtual IP address, that is, the destination address of the data packet is the cluster virtual IP address, so that the service cluster can provide services for the application process.

[0058] As an example, configuration information may be generated in advance, the configuration information including: a cluster virtual IP address and a real IP address of each service instance in the service cluster. The generated configuration information may be stored in a storage location as long as the configuration process can access it.

[0059] As an example, a configuration center may be provided, and the configuration center may specifically be a storage instance in a private cloud system, etc., for storing configuration information; or a configuration center may be provided in each VPC, and the configuration process running in each common instance may access the configuration center based on the access address of the configuration center. For example, upon receiving a request to create a private cloud system from a user, the cloud service provider may automatically create a private cloud system for the user through a preset automation program, and may create a configuration center in each VPC when creating a private cloud system for the user, so as to store configuration information in the configuration center. In actual applications, there are few cases where configuration information is updated. Of course, the configuration information may also be updated as needed, and various update methods such as manual update, semi-automatic update or automatic update may be adopted. For example, when the virtual IP address of the cluster changes, or when the service instance in the cluster changes, the configuration information may be updated in the configuration center, so the configuration process may access the configuration center according to a preset period to obtain the latest configuration information. In other examples, the service cluster may not change in actual applications, and it is also optional to pre-set the configuration information in the configuration process.

[0060] As an example, the process of determining whether the real IP addresses of each service instance in the service cluster can be connected can be executed by the configuration process, or by other processes in the common instance, or by some processes in other instances in the VPC, which is not limited in this embodiment. In the case where it is not executed by the configuration process, the configuration process can obtain the determination result of other processes executing to determine whether the real IP addresses of the service instances can be connected.

[0061] In this way, when the configuration process is able to know the cluster virtual IP address and the real IP address of the service instance in the service cluster, the configuration process can determine the local real IP address of the local service instance in the same area as the process; thus, when the configuration process determines that the local real IP address can be connected, it can generate a local service conversion rule and provide it to the operating system of the common instance. The local service conversion rule is used to instruct the operating system to convert the destination address in the data packet sent to the cluster virtual IP address to the local real IP address. Therefore, the data packet generated by the application process can be converted by the operating system based on the local service conversion rule, and the destination of the data packet can be converted to the local real IP address, and the data packet can be redirected to the service instance in the same VPC, thereby achieving the effect of simulating Anycast's nearby forwarding, so that the data packet of the application process can be processed nearby, improving service efficiency.

[0062] In this embodiment, considering that the local service instance may fail to provide services, in order to ensure that the application process can obtain stable services, in some examples, the private cloud system includes multiple virtual private networks set in different areas, and the method may further include:

[0063] Based on the configuration information, determine the remote real IP address of the remote service instance located in a different region from the current process;

[0064] If the local real IP address cannot be connected, determine a remote real IP address that can be connected, generate a remote service conversion rule and provide it to the operating system, the remote service conversion rule is used to instruct the operating system to convert the destination address in the data packet to the remote real IP address that can be connected.

[0065] In this embodiment, the private cloud system can also set up multiple VPCs. The number of VPCs is determined according to user needs. Each VPC is connected by a private network line, so that data packets between VPCs can be transmitted through the private network line to achieve communication between VPCs. Through this embodiment, the remote real IP addresses of remote service instances in different regions can be obtained from the configuration information. When the local real IP address cannot be connected, a remote service conversion rule can be generated and sent to the operating system. The remote service conversion rule is used to instruct the operating system to convert the destination address in the data packet to a remote real IP address that can be connected. In this way, this embodiment also simulates the multi-machine service effect of the Anycast protocol, so that when the local service instance cannot provide services, the remote service instance can provide services, ensuring that the application process can obtain stable services.

[0066] In some examples, in order to enable each configuration process to determine the region to which it belongs and the region where each service instance is located, the configuration information includes an identifier of the region to which the service instance belongs;

[0067] Determining the local real IP address of the local service instance located in the same area as the current process may include:

[0068] Get the region ID to which this process belongs;

[0069] Based on the region identifier to which the current process belongs, a local IP physical address of a local server located in the same region as the current process is determined from the configuration information.

[0070] In this embodiment, since the region identifier of the region to which each service instance belongs is configured in the configuration information, the configuration process can determine the region to which each service instance belongs from the configuration information. In addition, the configuration process can also obtain the region identifier to which the current process belongs, so based on the region identifier to which the current process belongs, the local IP physical address of the local server located in the same region as the current process can be quickly and accurately determined from the configuration information.

[0071] As an example, the configuration information may specifically be:

[0072] Anycast VIP: 10.8.*.8;

[0073] RIP Zone1: 10.202.*.1;

[0074] RIP Zone2: 10.203.*.1;

[0075] The above "Anycast VIP" is an identifier used to indicate the cluster virtual IP address, that is, "10.8.*.8";

[0076] "RIP" is an identifier that represents the real IP address, and "Zone1" is the zone identifier. Together, they indicate that there is a service instance in Zone 1 with a real IP address of "10.202.*.1".

[0077] Similarly, "RIP Zone2" indicates that there is a service instance in the zone "Zone 2" whose real IP address is "10.203.*.1".

[0078] Of course, in actual applications, the specific implementation method of the configuration information can be flexible and diverse, and can also be implemented in other ways according to actual needs, which is not limited in this embodiment.

[0079] In order to ensure that the configuration process can accurately determine that each real IP address can be connected, in some examples, the method may also include:

[0080] A live detection instruction is sent to the real IP address of the service instance, and based on a response result of the real IP address to the live detection instruction, it is determined whether the real IP address can be connected.

[0081] As an example, there are many ways to implement the live detection instruction here, for example, it can be a heartbeat detection-based instruction or a ping instruction, and the service instance can make a corresponding response result based on the live detection instruction, so as to detect whether the service of the local service instance is available. Therefore, by sending the live detection instruction, it is possible to accurately determine whether the local real IP address can be connected.

[0082] As an example, a live detection instruction may be sent to the local real IP address first, and based on the response result of the local real IP address to the live detection instruction, it is determined whether the local real IP address can be connected. If the local real IP address cannot be connected, a remote service conversion rule may be generated and sent to the operating system.

[0083] As an example, the configuration process may also send a liveness detection instruction to the remote real IP address to determine whether the remote real IP address can be connected.

[0084] In some examples, the configuration process can send a liveness command to the real IP addresses of all service instances in the cluster, so as to determine at one time the service instances that can be connected and the service instances that cannot be connected, thereby determining how to generate subsequent conversion rules.

[0085] Alternatively, the configuration process first sends a live detection instruction to the real IP address of the local service instance, and when it is determined that the local service instance cannot be connected, the configuration process then sends the live detection instruction to the remote local service instance.

[0086] Optionally, there can be multiple local service instances, and the configuration process can be to send a liveness detection instruction to all local service instances. Of course, other methods are also optional, such as sending a liveness detection instruction to one of the local service instances first, and stopping sending if it can be connected. If it cannot be connected, continue to select the next local service instance to send the liveness detection instruction.

[0087] Optionally, there may be multiple remote local service instances. Similarly, the configuration process may be to send a liveness detection instruction to all remote service instances. Of course, other methods are also optional, such as first sending a liveness detection instruction to one of the remote service instances, and stopping sending if it can be connected. If it cannot be connected, continue to select the next remote service instance to send the liveness detection instruction.

[0088] Based on this, this embodiment can accurately and quickly determine which service instances can be connected by sending a live detection instruction to the real IP address.

[0089] In actual applications, one or more common instances can run in a VPC. In the case of multiple common instances, the configuration process of each common instance can send a liveness detection instruction to the same local service instance. Therefore, there is a situation where a local service instance can receive multiple liveness detection instructions at the same time. If the number of common instances is small, the service instance usually has a certain processing capacity and will not affect the service instance.

[0090] Of course, in actual applications, there may be a large number of common instances. In some examples, a plurality of the common instances are running in the virtual private network; the plurality of the common instances include: a common instance running a main configuration process and a common instance running an auxiliary configuration process;

[0091] The sending of a live detection instruction to the real IP address of the service instance, and determining whether the real IP address can be connected based on a response result of the real IP address to the live detection instruction, includes:

[0092] If the configuration process is the main configuration process, send a live detection instruction to the real IP address, determine whether the real IP address can be connected based on the response result of the real IP address to the live detection instruction, and send a message indicating whether the real IP address can be connected to each of the auxiliary configuration processes;

[0093] If the configuration process is the auxiliary configuration process, a message indicating whether the real IP address can be connected is received from the main configuration process to determine whether the real IP address can be connected.

[0094] In this embodiment, when multiple common instances are running in a VPC, each common instance runs a configuration process, and the multiple configuration processes can be divided into a main configuration process and an auxiliary configuration process, wherein the main configuration process is used to perform a live operation and determine whether each service instance can be connected, and send a message of whether the real IP address can be connected to each auxiliary configuration process. As an example, the number of main configuration processes can be one, and of course two or more is also optional, and this embodiment does not limit this.

[0095] Therefore, the main configuration process is used to execute the steps of sending a live detection instruction to the real IP address, determining whether the real IP address can be connected based on the response result of the real IP address to the live detection instruction, and sending a message indicating whether the real IP address can be connected to each of the auxiliary configuration processes. The auxiliary configuration process executes the step of receiving the message indicating whether the real IP address can be connected sent by the main configuration process to determine whether the real IP address can be connected.

[0096] Based on this, in this embodiment, the local service instance can only face the detection instructions of the main configuration process, and there will be no situation where multiple configuration processes issue a large number of detection instructions, thereby preventing the service instance from being disturbed by a large number of detection instructions.

[0097] As an example, the above local service conversion rule / remote service conversion rule is used to instruct the operating system to modify the destination address of the data packet sent to the cluster virtual IP address for the data packet generated in the local machine to the real IP address specified by the conversion rule. In actual implementation, it can be flexibly implemented as needed, for example, by developing a corresponding data packet destination address modification function at the operating system level.

[0098] As an example, the existing network processing module of the operating system has a destination address conversion function for data packets, and the implementation can be based on this function. For example, the local service conversion rule includes the cluster virtual IP address and the local real IP address that replaces the cluster virtual IP address; the remote service conversion rule includes the cluster virtual IP address and the remote real IP address that replaces the cluster virtual IP address;

[0099] The operating system includes a network processing module, and the network processing module maintains a destination address translation table;

[0100] Among them, the local service conversion rules or remote service conversion rules generated by the configuration process are written into the destination address conversion table, so that the network processing module reads the service conversion rules stored in the destination address conversion table, and for each data packet generated in the common instance, when it is determined that the destination address carried by the data packet is the cluster virtual IP address, the destination address is converted into the real IP address recorded in the read service conversion rule.

[0101] As an example, the network processing module may be a firewall tool of the operating system, and a firewall tool capable of performing data packet destination address conversion may be run in the operating system of a common instance. As an example, it may be a packet filtering firewall in the operating system, such as an iptables (name of a firewall tool) tool, etc., which is a tool used to manage network data packet filtering in the Linux system, and it may allow or deny data packets to pass according to various rules.

[0102] As an example, the destination address translation table (Network Address Translation Table, NAT table) is usually used to store the mapping relationship in the network address translation process, which records the correspondence between the internal private IP address and the external public IP address. In this embodiment, the existing function of the NAT table is used to configure the local service conversion rule / remote service conversion rule in the table, so that the effect of the Anycast protocol can be simulated and realized.

[0103] As an example, the conversion rule may be:

[0104] iptables -t nat -A OUTPUT -d 10.8.*.8 -j DNAT --to-destination10.202.*.1.

[0105] The meaning of each field in this rule is as follows:

[0106] -t nat: Specifies to use the NAT table, which is used to process network address translation.

[0107] -A OUTPUT: Add the rule to the OUTPUT chain of the NAT table. The OUTPUT chain processes packets sent from the local machine.

[0108] -d 10.8.*.8: matches packets with a destination IP address of 10.8.*.8.

[0109] -j DNAT: Jump to the DNAT target, that is, perform destination address translation.

[0110] --to-destination 10.202.*.1: Change the destination address of the data packet to 10.202.*.1.

[0111] The effect of this rule is: for all data packets sent from this machine with a destination address of 10.8.*.8, the destination address will be changed to 10.202.*.1 after the routing decision is made.

[0112] It can be seen from the above embodiments that this embodiment simulates and implements the effect of the Anycast protocol in a proprietary cloud scenario based on the network processing module of the operating system.

[0113] In some examples, there may be multiple local service instances running in a VPC. To achieve a load balancing effect, the generating of the local service conversion rule and providing it to the operating system of the common instance may include:

[0114] Generate local service conversion rules corresponding to each local real IP address of the local service instance that can be connected, and provide each local service conversion rule to the operating system of the common instance so that the operating system adopts a load balancing strategy to convert the destination address in the data packet into any one of the multiple local real IP addresses that can be connected.

[0115] As an example, suppose there are n local service instances running in a VPC. If the number of these n local service instances that can be connected is m, m≤n, then m local service conversion rules can be generated, each of which corresponds to the local real IP address of a local service instance. Thus, the operating system can receive these m local service conversion rules, and thus, for each data packet sent by each application process, the operating system can use a load balancing strategy to convert the destination address in each data packet into any of multiple local real IP addresses, thereby achieving a load balancing effect based on these m local service instances.

[0116] For example, the aforementioned iptables tool can set the selection probability of the m real IP addresses recorded in the m configured conversion rules. By setting the selection probability of each real IP address in the m real IP addresses to be equal for the iptables tool, the iptables tool can select any of the m real IP addresses with equal probability and convert the destination address in the data packet to the selected real IP address, so that the m local service instances can receive the data packet with equal probability, thereby achieving load balancing.

[0117] For example, in a network packet filtering tool, such as iptables, when matching conversion rules, if the rules are matched in order, the rule that is matched first will be processed first. Therefore, the first rule will process a part of the traffic first, and the remaining traffic will enter the second rule, and so on. The tool can use the random mode (--mode random) of the statistical module (-m statistic). Based on this, this embodiment can also include a probability parameter in the conversion rule to guide the network packet filtering tool to select any address among the m real IP addresses with equal probability.

[0118] For example, for m real IP addresses, you can sort each real IP address and generate m conversion rules in order. The order of these m conversion rules in the tool is the same as the order of each real IP address, and the specific order can be configured as needed. Each conversion rule contains a probability parameter, and each probability parameter is used to indicate the probability of selecting a real IP address contained in the rule from the m real IP addresses. Among the m conversion rules, the probability of the real IP address in the i-th rule is: 1 / (m-i+1).

[0119] For the tool, for these m conversion rules, when the destination address of the data packet needs to be converted, the first of the m conversion rules will be matched in order. At this time, the number of real IP addresses that can be selected is: m-i+1, that is, m; a real IP address is randomly selected from the m real IP addresses according to the probability specified by the probability parameter in the first rule. If the selected real IP address is the real IP address in the first conversion rule, the destination address of the data packet is converted.

[0120] If it is not selected, continue to match the second conversion rule. At this time, the number of real IP addresses that can be selected is m-i+1, that is, m-1, because the real IP address in the first conversion rule has not been selected and is no longer a selectable real IP address; similarly, according to the probability specified by the probability parameter in the second rule, a real IP address is randomly selected from the m-1 real IP addresses. If the selected real IP address is the real IP address in the second conversion rule, the destination address of the data packet is converted. If it is not selected, similarly, perform the above processing.

[0121] Assume there are three rules as follows:

[0122] iptables -t nat -A OUTPUT -d 10.8.*.8 -m statistic --mode random --probability 0.3333333 -j DNAT --to-destination 10.202.*.1

[0123] iptables -t nat -A OUTPUT -d 10.8.*.8 -m statistic --mode random --probability 0.5 -j DNAT --to-destination 10.202.*.2

[0124] iptables -t nat -A OUTPUT -d 10.8.*.8 -j DNAT --to-destination10.202.*.3

[0125] The "-m statistic --mode random --probability 0.3333333" represents the probability parameter. The probability parameter included in each conversion rule is used to instruct the network processing module of the operating system, such as the packet filtering tool, to select the probability of the real IP address included in the rule from multiple real IP addresses.

[0126] For example, since there are m real IP addresses to choose from, among the above three conversion rules, taking m as 3 as an example, in rule 1, for data packets sent to the destination address 10.8.*.8, there is a 1 / 3 probability of selecting the real IP address 10.202.*.1 in rule 1 among the m real IP addresses. The probability of 1 / 3 is 33.333333%.

[0127] For the second rule, the probability contained in the probability parameter is 1 / (m-1), because among the m real IP addresses that can be selected, the real IP address 10.202.*.1 in the first rule has not been selected, and there are only m-1 real IP addresses that can be selected. Therefore, the probability contained in the probability parameter is 1 / 2.

[0128] Similarly, for the third rule, the probability contained in the probability parameter is 1 / (m-2), because among the m real IP addresses that can be selected, the real IP addresses contained in the first and second rules respectively have not been selected, and there are only m-2 real IP addresses that can be selected. Therefore, the probability contained in the probability parameter is 1. When the probability parameter is 1, the rule does not need to contain the probability parameter. Of course, it is also possible to contain a probability parameter that represents a probability of 1.

[0129] In other examples, the dedicated cloud runs multiple remote service instances set in different regions, and generating a remote service conversion rule and sending it to the operating system may include:

[0130] Generate remote service conversion rules corresponding to each remote real IP address of the remote service instance that can be connected, and provide each remote service conversion rule to the operating system of the common instance so that the operating system adopts a load balancing strategy to convert the destination address in the data packet into any one of the multiple remote real IP addresses that can be connected.

[0131] Similar to the above example, when it is necessary to configure remote service conversion rules, if there are multiple remote service instances, multiple remote service conversion rules can also be generated so that the operating system adopts a load balancing strategy to convert the destination address in the data packet into any of multiple remote real IP addresses, thereby achieving a load balancing effect based on these multiple remote service instances.

[0132] As an example, suppose there are k remote service instances in total, and if the number of these k remote service instances that can be connected is t, t≤k; then t remote service conversion rules can be generated, and each remote service conversion rule corresponds to the remote real IP address of a remote service instance. Thus, the operating system can receive these t remote service conversion rules, and thus, for each data packet sent by each application process, the operating system can use a load balancing strategy to convert the destination address in each data packet into any of multiple remote real IP addresses, thereby achieving a load balancing effect based on these t remote service instances. Specifically, the implementation method of the load balancing strategy can refer to the aforementioned embodiment.

[0133] Next, an example will be used to illustrate the invention. Figure 2C FIG. 1 is a schematic diagram of another method for sending data packets in a private cloud system according to an exemplary embodiment of the present specification. In this embodiment, two VPCs set in two zones (Zone 1 and Zone 2) are taken as an example. Zone 1 includes a common instance 1, a service instance 1, and a configuration center 1, and Zone 2 includes a common instance 2, a service instance 2, and a configuration center 2. The process of this embodiment may include:

[0134] Step ①: Ordinary instance 1 in zone1 can obtain configuration information from configuration center 1. The configuration information records the cluster virtual IP address (VIP for short) as 10.8.*.8, and it mounts two real IP addresses (RIP for short), that is, the RIP in zone1 (server 1) is 10.202.*.1, and the RIP in zone2 (server 2) is 10.203.*.1.

[0135] Step ②: Ordinary instance 2 in zone2 can obtain configuration information from configuration center 2, the same as step 1.

[0136] Step 3: The configuration process in common instance 1 can read the local configuration and obtain the local zone information, that is, zone1.

[0137] Step ④: The configuration process in common instance 2 reads the local configuration and obtains the local zone information, namely zone2.

[0138] Step ⑤: The configuration process in the common example 1 performs data packet redirection configuration of the local machine according to the read configuration information and the zone information of the local machine; specifically, all RIPs may be probed first, and different conversion rules may be written according to the probe results; optionally, the probe may be performed and the rules may be updated according to a period.

[0139] Among them, if 10.202.*.1 is connectable, the conversion rule 1 (i.e. the local service conversion rule) is written to the operating system:

[0140] iptables -t nat -A OUTPUT -d 10.8.8.8 -j DNAT --to-destination10.202.*.1

[0141] Rule 1 means: modify the data packets with the destination address 10.8.*.8 and set the new destination address to the RIP address 10.202.*.1 of the zone (zone1)

[0142] If 10.202.*.1 is not connected, write rule 2 (i.e. remote service conversion rule) to the operating system:

[0143] iptables -t nat -A OUTPUT -d 10.8.*.8 -j DNAT --to-destination10.203.*.1

[0144] Rule 2 means: modify the data packets with the destination address 10.8.*.8 and set the new destination address to the RIP address 10.203.*.1 of zone2.

[0145] Step ⑥: The configuration process in the common example 2 performs network configuration according to the read information, which is the same as step 5;

[0146] When 10.202.*.1 is reachable, write rule 1 to the operating system:

[0147] iptables -t nat -A OUTPUT -d 10.8.*.8 -j DNAT --to-destination10.203.*.1

[0148] Rule 1 means: modify the data packets with the destination address 10.8.*.8 and set the new destination address to the server address 10.203.*.1 of this zone (zone2)

[0149] When 10.202.*.1 is not connected, write rule 2 to the operating system:

[0150] iptables -t nat -A OUTPUT -d 10.8.*.8 -j DNAT --to-destination10.202.*.1

[0151] Rule 2 means: modify the data packets with the destination address 10.8.*.8 and set the new destination address to the server address 10.202.*.1 of zone1

[0152] Step 7: When the application process in common instance 1 accesses VIP (10.8.*.8), the operating system redirects the data packet to service instance 1 (10.202.*.1) of the zone (zone1) based on the conversion rule, thus achieving the Anycast routing effect.

[0153] Step ⑧: Ordinary instance 2 accesses anycast VIP (10.8.*.8). Based on the conversion rules, the operating system redirects the data packet to service instance 2 (10.203.*.1) of the zone (zone2), thus achieving the Anycast routing effect.

[0154] Optionally, the above embodiment may be repeatedly executed according to a preset time period, so that the latest conversion rules can be configured in the operating system.

[0155] Corresponding to the embodiment of the data packet sending method in the aforementioned proprietary cloud system, this specification also provides an embodiment of a data packet sending device in a proprietary cloud system and a computer device used therein.

[0156] The embodiments of the data packet sending device in the proprietary cloud system of this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented by software, hardware, or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 3 The figure is a hardware structure diagram of the computer device where the data packet sending device in the proprietary cloud system of this specification is located, except Figure 3 In addition to the processor 310, network interface 320, memory 330, and non-volatile memory 340 shown, the computer device where the data packet sending device in the proprietary cloud system in the embodiment is located may also include other hardware, usually according to the actual function of the computer device, which will not be described in detail.

[0157] like Figure 4 As shown, Figure 4This is a block diagram of a data packet sending device in a private cloud system according to an exemplary embodiment of the present specification, wherein the private cloud system includes at least one virtual private network, wherein service instances and common instances are running in the virtual private network, and the service instances running in the at least one virtual private network are used as service clusters and are pre-configured with cluster virtual IP addresses;

[0158] An application process is running in the common instance, and the application process is used to generate a data packet whose destination address is the cluster virtual IP address to request a service of the service cluster;

[0159] The device is applied to the configuration process running in the common instance, and the device includes:

[0160] The acquisition module 41 is used to: acquire configuration information, wherein the configuration information includes: the cluster virtual IP address and the real IP address of the service instance in the service cluster;

[0161] The determination module 42 is used to: determine the local real IP address of the local service instance located in the same area as the process based on the configuration information;

[0162] The configuration module 43 is used to: if the local real IP address can be connected, generate a local service conversion rule and provide it to the operating system of the common instance, wherein the local service conversion rule is used to instruct the operating system to convert the destination address in the data packet into the local real IP address.

[0163] In some examples, the private cloud system includes a plurality of virtual private networks located in different regions, the virtual private networks are connected via dedicated lines, and the configuration module 43 is used to:

[0164] Based on the configuration information, determine the remote real IP address of the remote service instance located in a different region from the current process;

[0165] If the local real IP address cannot be connected, determine a remote real IP address that can be connected, generate a remote service conversion rule and provide it to the operating system, the remote service conversion rule is used to instruct the operating system to convert the destination address in the data packet to the remote real IP address that can be connected.

[0166] In some examples, the configuration information includes an identifier of a region to which the service instance belongs;

[0167] The determining module 42 is further used for:

[0168] Get the region ID to which this process belongs;

[0169] Based on the region identifier to which the current process belongs, a local IP physical address of a local server located in the same region as the current process is determined from the configuration information.

[0170] In some examples, the determining module 42 is further configured to:

[0171] A live detection instruction is sent to the real IP address of the service instance, and based on a response result of the real IP address to the live detection instruction, it is determined whether the real IP address can be connected.

[0172] In some examples, a plurality of the common instances are running in the virtual private network; the plurality of the common instances include: a common instance running a main configuration process and a common instance running an auxiliary configuration process;

[0173] If the configuration process is the main configuration process, send a live detection instruction to the real IP address, determine whether the real IP address can be connected based on the response result of the real IP address to the live detection instruction, and send a message indicating whether the real IP address can be connected to each of the auxiliary configuration processes;

[0174] If the configuration process is the auxiliary configuration process, a message indicating whether the real IP address can be connected is received from the main configuration process to determine whether the real IP address can be connected.

[0175] In some examples, there are multiple local service instances;

[0176] The determination module 42 is also used to generate local service conversion rules corresponding to each local real IP address of the local service instance that can be connected, and provide each local service conversion rule to the operating system of the common instance so that the operating system adopts a load balancing strategy to convert the destination address in the data packet into any one of the multiple local real IP addresses that can be connected.

[0177] In some examples, the dedicated cloud runs multiple remote service instances in different regions, and the determination module 42 is further used to:

[0178] Generate remote service conversion rules corresponding to each remote real IP address of the remote service instance that can be connected, and provide each remote service conversion rule to the operating system of the common instance so that the operating system adopts a load balancing strategy to convert the destination address in the data packet into any one of the multiple remote real IP addresses that can be connected.

[0179] In some examples, the local service conversion rule includes the cluster virtual IP address and a local real IP address replacing the cluster virtual IP address; the remote service conversion rule includes the cluster virtual IP address and a remote real IP address replacing the cluster virtual IP address;

[0180] The operating system includes a network processing module, and the network processing module maintains a destination address translation table;

[0181] Among them, the local service conversion rules or remote service conversion rules generated by the configuration process are written into the destination address conversion table, so that the network processing module reads the service conversion rules stored in the destination address conversion table, and for each data packet generated in the common instance, when it is determined that the destination address carried by the data packet is the cluster virtual IP address, the destination address is converted into the real IP address recorded in the read service conversion rule.

[0182] The implementation process of the functions and effects of each module in the data packet sending device in the above-mentioned proprietary cloud system is specifically described in the implementation process of the corresponding steps in the data packet sending method in the above-mentioned proprietary cloud system, and will not be repeated here.

[0183] Accordingly, the embodiments of this specification also provide a proprietary cloud system, such as Figure 2A As shown, the private cloud system includes at least one virtual private network, a common instance is running in the virtual private network, and an application process for generating a data packet is running in the common instance;

[0184] A service instance serving the application process is also running in the virtual private network, and the service instance running in at least one virtual private network is used as a service cluster and is configured with a cluster virtual IP address;

[0185] A configuration process is running in the common instance, and the configuration process is used to execute the steps of the aforementioned method embodiment.

[0186] The implementation process of the functions and effects of each module in the data packet sending device in the above-mentioned proprietary cloud system is specifically described in the implementation process of the corresponding steps in the data packet sending method in the above-mentioned proprietary cloud system, and will not be repeated here.

[0187] Accordingly, an embodiment of the present specification also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the aforementioned embodiment of the method for sending a data packet in a proprietary cloud system.

[0188] Correspondingly, an embodiment of the present specification also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of an embodiment of a method for sending a data packet in a private cloud system are implemented.

[0189] Accordingly, an embodiment of the present specification also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of an embodiment of a method for sending a data packet in a private cloud system are implemented.

[0190] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0191] The above embodiments can be applied to one or more computer devices, where the computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. The hardware of the computer device includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.

[0192] The computer device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.

[0193] The computer device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.

[0194] The network where the computer device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0195] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0196] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the protection scope of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the protection scope of this application.

[0197] Although this specification includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments in this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claim protection, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.

[0198] The description of "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0199] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.

[0200] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0201] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A method for sending a data packet in a private cloud system, wherein the private cloud system comprises at least one virtual private network, wherein a service instance and a common instance are running in the virtual private network, and wherein the service instance running in the at least one virtual private network is used as a service cluster and is pre-configured with a cluster virtual IP address; An application process is running in the common instance, and the application process is used to generate a data packet whose destination address is the cluster virtual IP address to request a service of the service cluster; The method is applied to the configuration process running in the common instance, and the method includes: Acquire configuration information, the configuration information including: the cluster virtual IP address and the real IP address of the service instance in the service cluster; Based on the configuration information, determine the local real IP address of the local service instance located in the same region as the process; If the local real IP address can be connected, a local service conversion rule is generated and provided to the operating system of the common instance, wherein the local service conversion rule is used to instruct the operating system to convert the destination address in the data packet to the local real IP address.

2. The method according to claim 1, wherein the private cloud system includes a plurality of virtual private networks arranged in different areas, and the method further comprises: Based on the configuration information, determine the remote real IP address of the remote service instance located in a different region from the current process; If the local real IP address cannot be connected, determine a remote real IP address that can be connected, generate a remote service conversion rule and provide it to the operating system, the remote service conversion rule is used to instruct the operating system to convert the destination address in the data packet to the remote real IP address that can be connected.

3. The method according to claim 1 or 2, wherein the configuration information includes an identification of the region to which the service instance belongs; The determining of the local real IP address of the local service instance located in the same area as the process includes: Get the region ID to which this process belongs; Based on the region identifier to which the current process belongs, a local IP physical address of a local server located in the same region as the current process is determined from the configuration information.

4. The method according to claim 1, further comprising: A live detection instruction is sent to the real IP address of the service instance, and based on a response result of the real IP address to the live detection instruction, it is determined whether the real IP address can be connected.

5. According to the method of claim 4, a plurality of the common instances are running in the virtual private network; The plurality of common instances include: a common instance running a main configuration process and a common instance running an auxiliary configuration process; The sending of a live detection instruction to the real IP address of the service instance, and determining whether the real IP address can be connected based on a response result of the real IP address to the live detection instruction, includes: If the configuration process is the main configuration process, send a live detection instruction to the real IP address, determine whether the real IP address can be connected based on the response result of the real IP address to the live detection instruction, and send a message indicating whether the real IP address can be connected to each of the auxiliary configuration processes; If the configuration process is the auxiliary configuration process, a message indicating whether the real IP address can be connected is received from the main configuration process to determine whether the real IP address can be connected.

6. According to the method of claim 1, there are multiple local service instances; The generating of the local service conversion rule and providing it to the operating system of the common instance includes: Generate local service conversion rules corresponding to each local real IP address of the local service instance that can be connected, and provide each local service conversion rule to the operating system of the common instance so that the operating system adopts a load balancing strategy to convert the destination address in the data packet into any one of the multiple local real IP addresses that can be connected.

7. The method according to claim 2, wherein the dedicated cloud runs multiple remote service instances set in different regions, and the generating remote service conversion rules and providing them to the operating system comprises: Generate remote service conversion rules corresponding to each remote real IP address of the remote service instance that can be connected, and provide each remote service conversion rule to the operating system of the common instance so that the operating system adopts a load balancing strategy to convert the destination address in the data packet into any one of the multiple remote real IP addresses that can be connected.

8. The method according to claim 2 or 7, wherein the local service conversion rule includes the cluster virtual IP address and a local real IP address replacing the cluster virtual IP address; the remote service conversion rule includes the cluster virtual IP address and a remote real IP address replacing the cluster virtual IP address; The operating system includes a network processing module, and the network processing module maintains a destination address translation table; in, The local service conversion rules or remote service conversion rules generated by the configuration process are written into the destination address conversion table, so that the network processing module reads the service conversion rules stored in the destination address conversion table, and for each data packet generated in the common instance, when it is determined that the destination address carried by the data packet is the cluster virtual IP address, the destination address is converted into the real IP address recorded in the read service conversion rule.

9. A private cloud system, comprising at least one virtual private network, wherein a common instance runs in the virtual private network, and an application process for generating a data packet runs in the common instance; A service instance serving the application process is also running in the virtual private network, and the service instance running in at least one virtual private network is used as a service cluster and is configured with a cluster virtual IP address; A configuration process is running in the common instance, and the configuration process is used to execute the steps of the method according to any one of claims 1 to 8.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Patent Citations

  • Data transmission method and device, and hybrid cloud system

    CN107959654A

  • Database instance access method, device and system, storage medium and equipment

    CN108093094A