CN113676564A - Data transmission method, device and storage medium - Google Patents

Data transmission method, device and storage medium Download PDF

Info

Publication number
CN113676564A
CN113676564A CN202111146129.XA CN202111146129A CN113676564A CN 113676564 A CN113676564 A CN 113676564A CN 202111146129 A CN202111146129 A CN 202111146129A CN 113676564 A CN113676564 A CN 113676564A
Authority
CN
China
Prior art keywords
node
domain name
address
service
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111146129.XA
Other languages
Chinese (zh)
Other versions
CN113676564B (en
Inventor
方鹏斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202111146129.XA priority Critical patent/CN113676564B/en
Publication of CN113676564A publication Critical patent/CN113676564A/en
Application granted granted Critical
Publication of CN113676564B publication Critical patent/CN113676564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The application discloses a data transmission method, a device and a storage medium, wherein the data transmission method comprises the following steps: the first controller generates a first domain name and a first address corresponding to the first service based on the first configuration information, and transmits the generated first domain name and first address to the first server. Under the condition that the domain name carried by the first request is matched with the first domain name, the first server sends a first address corresponding to the first domain name to the first node; the first node calls a first component based on the first address, and initiates access to the first service to a second node deployed with the first service; wherein the first component is for transmitting data between the first node and the second node. Therefore, the flow of the first node accessing the first service is introduced into the first component through the first address, and data transmission between the nodes is realized, so that the load performance of the cluster flow is improved. In addition, only the first component needs to be maintained when the cluster system is maintained, and the maintenance difficulty of the cluster system is reduced.

Description

Data transmission method, device and storage medium
Technical Field
The present application relates to the field of network transmission technologies, and in particular, to a data transmission method, an apparatus, and a storage medium.
Background
Business clouds are a current trend, with more and more services being published through micro-service architectures and containerization techniques. At present, a container orchestration system kubenets (i.e., K8S) is commonly used to manage a large number of containers, and the K8S cluster can support the functions of automatically deploying, expanding, and managing containerized applications.
In order to realize traffic load, in the related art, a K8S cluster needs to use a packet-sending filtering mechanism (i.e., iptables rule) under a kube-proxy component, and a cluster system has the problems of poor traffic load performance and difficult maintenance.
Disclosure of Invention
In view of this, embodiments of the present application provide a data transmission method, an apparatus, an electronic device, and a storage medium, so as to solve at least the problems of poor traffic load performance and difficult maintenance of a cluster system in the related art.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a data transmission method, which is applied to a first controller and comprises the following steps:
acquiring first configuration information; the first configuration information is used for describing a first service;
generating a first domain name and a first address corresponding to the first service based on the first configuration information;
sending the generated first domain name and the first address to a first server; the first domain name is used for the first server to match a domain name carried by a first request sent by a first node; and the first address is sent to the first node by the first server under the condition that the domain name carried by the first request is matched with the first domain name, and is used for the first node to access the first service.
In the foregoing solution, the generating a first domain name and a first address corresponding to the first service based on the first configuration information includes:
and generating a first domain name and a first address corresponding to the first service based on the first configuration information when the value of the setting field in the first configuration information is a setting value.
In the foregoing solution, generating the first address corresponding to the first service based on the first configuration information includes:
determining a first address corresponding to the first configuration information from a set network segment; wherein the content of the first and second substances,
the set network segment represents a flow network segment in the east-west direction.
In the foregoing solution, generating a first domain name corresponding to the first service based on the first configuration information includes:
and generating a first domain name corresponding to the first configuration information based on a set rule.
The embodiment of the present application further provides a data transmission method, applied to a first node, including:
sending a first request to a first server; the first request is used for requesting a first address corresponding to a first service;
receiving a first address sent by the first server; the first address represents a first address corresponding to a first domain name matched with the domain name carried by the first request;
initiating access to the first service to a second node by invoking a first component based on the first address; wherein the first component is for transmitting data between the first node and the second node; the second node characterizes a node deployed with the first service; the first domain name and the corresponding first address in the first server are from a first controller.
In the foregoing solution, the sending the first request to the first server includes:
sending the first request to the first server based on second configuration information.
In the foregoing solution, when the first component is called based on the first address and the access to the first service is initiated to the second node, the method includes:
converting a source network address of a first data packet into a second address of the first component, and transmitting the first data packet after source network address conversion to the second node;
receiving that the second node returns a second data packet to the first node based on the second address.
The embodiment of the present application further provides a data transmission method, applied to a first server, including:
receiving a first request sent by a first node; the first request is used for requesting a first address corresponding to a first service;
sending a first address corresponding to a first domain name to the first node under the condition that the domain name carried by the first request is matched with the first domain name; wherein the first domain name and the corresponding first address in the first server are from a first controller; the first address is used for the first node to access the first service.
In the foregoing solution, when the domain name carried in the first request is matched with a first domain name, before sending a first address corresponding to the first domain name to the first node, the method further includes:
verifying the suffix of the domain name carried by the first request to obtain a verification result;
and matching the domain name carried by the first request with the first domain name under the condition that the verification result represents that the suffix of the domain name carried by the first request is a set suffix.
Embodiments of the present application further provide a data transmission system, which includes a first controller, a first server, and at least one first node, wherein,
the first controller is configured to acquire first configuration information, generate a first domain name and a first address corresponding to the first service based on the first configuration information, and send the generated first domain name and the generated first address to the first server; the first configuration information is used for describing a first service;
the first server is configured to receive a first request sent by the first node, and send a first address corresponding to a first domain name to the first node when the domain name carried in the first request is matched with the first domain name;
each first node in the at least one first node is used for sending a first request to the first server, receiving a first address sent by the first server, calling a first component based on the first address and initiating access to the first service to a second node; wherein the first component is for transmitting data between the first node and the second node; the second node characterizes a node on which the first service is deployed.
An embodiment of the present application further provides a data transmission device, including:
a first receiving unit, configured to acquire first configuration information; the first configuration information is used for describing a first service;
a first generating unit, configured to generate a first domain name and a first address corresponding to the first service based on the first configuration information;
a first sending unit configured to send the generated first domain name and the first address to a first server; the first domain name is used for the first server to match a domain name carried by a first request sent by a first node; and the first address is sent to the first node by the first server under the condition that the domain name carried by the first request is matched with the first domain name, and is used for the first node to access the first service.
An embodiment of the present application further provides a data transmission device, including:
a second sending unit, configured to send the first request to the first server; the first request is used for requesting a first address corresponding to a first service;
a second receiving unit, configured to receive the first address sent by the first server; the first address represents a first address corresponding to a first domain name matched with the domain name carried by the first request;
the first access unit is used for calling a first component based on the first address and initiating access to the first service to a second node; wherein the first component is for transmitting data between a first node and the second node; the second node characterizes a node deployed with the first service; the first domain name and the corresponding first address in the first server are from a first controller.
An embodiment of the present application further provides a data transmission device, including:
a third receiving unit, configured to receive a first request sent by a first node; the first request is used for requesting a first address corresponding to a first service;
a third sending unit, configured to send, to the first node, a first address corresponding to the first domain name when the domain name carried in the first request is matched with the first domain name; wherein the first domain name and the corresponding first address in the first server are from a first controller; the first address is used for the first node to access the first service.
An embodiment of the present application further provides a controller, where the controller is a first controller, and includes:
a first processor and a first memory for storing a computer program capable of running on the processor,
the first processor is configured to execute the steps of any data transmission method of the first controller side when the computer program is executed.
An embodiment of the present application further provides a node, where the node is a first node, and the node includes:
a second processor and a second memory for storing a computer program capable of running on the processor,
the second processor is configured to execute the steps of any data transmission method of the first node side when the computer program is executed.
An embodiment of the present application further provides a server, where the server is a first server, and the server includes:
a third processor and a third memory for storing a computer program capable of running on the processor,
the third processor is configured to execute the steps of any data transmission method of the first server side when the computer program is executed.
Embodiments of the present application further provide a storage medium on which a computer program is stored, where the computer program, when executed by a processor, implements at least one of:
a step of any data transmission method of the first controller side;
a step of any data transmission method of the first node side;
the steps of any of the above-described data transmission methods of the first server side.
In the data transmission method, the data transmission device and the storage medium of the embodiment of the application, the first controller acquires first configuration information for describing a first service, generates a first domain name and a first address corresponding to the first service based on the first configuration information, and sends the generated first domain name and the generated first address to the first server. The first server receives a first request which is sent by a first node and used for requesting access to a first service, and sends a first address corresponding to a first domain name to the first node under the condition that the domain name carried by the first request is matched with the first domain name. The first node receives a first address sent by the first server, calls a first component based on the first address, and initiates access to the first service to a second node deployed with the first service, wherein the first component is used for transmitting data between the first node and the second node. Compared with a data transmission mode of issuing an iptables rule through a kube-proxy component, in the embodiment of the application, a first node sends a first request to a first server to obtain a first address corresponding to a domain name carried by the first request, and calls the first component based on the first address to initiate access to a first service, that is, through the first address corresponding to the domain name carried by the first request, flow of the first node accessing the first service is introduced into the first component, and data transmission between nodes is realized through the first component, so that the cluster traffic load performance is improved. In addition, each iptables rule is not required to be maintained when the cluster system is maintained, only the first component is required to be maintained, and the maintenance difficulty of the cluster system is reduced.
And, the first controller may further be configured to generate a first domain name and a first address corresponding to the first service based on the first configuration information when a value of a setting field in the first configuration information is a set value. In this way, the load mode of the traffic of the corresponding first service can be specified by the setting field in the first configuration information.
In addition, the first server can be further configured to screen the first request according to a suffix of the domain name carried by the first request, and screen out part of the first request. Therefore, the matching workload can be reduced based on the matching between the domain name carried by the screened first request and the first domain name.
Drawings
Fig. 1 is a schematic diagram of a data transmission architecture according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a data transmission method according to another embodiment of the present application;
fig. 4 is a schematic flowchart of a data transmission method according to another embodiment of the present application;
fig. 5 is a schematic flowchart of a data transmission method according to yet another embodiment of the present application;
fig. 6 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 7 is a schematic diagram of a data transmission architecture according to an embodiment of the present application;
fig. 8 is a schematic diagram of data packet transmission provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a data transmission device according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of a data transmission device according to another embodiment of the present application;
FIG. 12 is a schematic structural diagram of a first controller provided in the present application;
fig. 13 is a schematic structural diagram of a first node provided in the present application;
fig. 14 is a schematic structural diagram of a first server provided in the present application.
Detailed Description
Business clouds are a current trend, with more and more services being published through micro-service architectures and containerization techniques. A microservice is a software architecture that breaks down applications into small service autonomy. Services are typically only concerned with a particular goal and need to guarantee autonomy between services. Each service is developed, tested, and deployed independently, often using an agreed-upon Application Programming Interface (API) and communicating over the network. Containerization techniques are sometimes referred to as lightweight virtualization techniques. The container and the process in the container are operated in the kernel of the host computer Linux system. But unlike directly running processes, processes running within a container are isolated from other processes.
At present, a container orchestration system kubenets (i.e., K8S) is commonly used to manage a large number of containers, and K8S can support the functions of automatically deploying, extending, and managing containerized applications. In K8S, traffic is divided into east-west traffic and north-south traffic. Northbound traffic refers to traffic communicated between the K8S cluster external and the cluster internal services, and eastern traffic refers to traffic communicated between the K8S cluster internal services.
In order to implement east-west traffic load, in the related art, K8S uses a packet-sending filtering mechanism (i.e. iptables rule) under a kube-proxy component, when a node sends a request to a server, the request will first enter a kernel iptables and then be sent out from the kernel iptables, the kube-proxy component completes the selection and proxy of accessible service endpoints, since traffic enters and exits the kernel, a large amount of performance loss is caused, and if a large amount of accessible service endpoints exist in a K8S cluster, the iptables rule on the node will be very large, the performance will be further reduced, and thus the K8S cluster has the problems of poor traffic load performance and difficult maintenance.
Based on this, in the data transmission method, the data transmission device, and the storage medium according to the embodiments of the present application, the first controller acquires first configuration information for describing the first service, generates a first domain name and a first address corresponding to the first service based on the first configuration information, and sends the generated first domain name and first address to the first server. The first server receives a first request which is sent by a first node and used for requesting access to a first service, and sends a first address corresponding to a first domain name to the first node under the condition that the domain name carried by the first request is matched with the first domain name. The first node receives a first address sent by the first server, calls a first component based on the first address, and initiates access to the first service to a second node deployed with the first service, wherein the first component is used for transmitting data between the first node and the second node. Compared with a data transmission mode of issuing an iptables rule through a kube-proxy component, in the embodiment of the application, a first node sends a first request for requesting access to a first service to a first server to obtain a first address corresponding to a domain name carried by the first request, and calls the first component based on the first address to initiate access to the first service, that is, through the first address corresponding to the domain name carried by the first request, traffic of the first node accessing the first service is introduced into the first component, and traffic transmission between the nodes is realized through the first component, so that the cluster traffic load performance is improved. In addition, each iptables rule is not required to be maintained when the cluster system is maintained, only the first component is required to be maintained, and the maintenance difficulty of the cluster system is reduced.
Fig. 1 is a schematic diagram of a data transmission architecture according to an embodiment of the present application. The data transmission architecture comprises a K8S cluster and a soft load controller, and the K8S cluster comprises an API server, a DNS server and at least two nodes. A node is a bearer of a Pod, which is the smallest deployable computing unit that can be created in K8S. Each node is deployed with Pod1 and Pod2, Pod1 is used for requesting and providing services, Pod2 is used for transmitting data between nodes and realizing soft load function, and Pod2 may be a soft load data plane in one embodiment. The API server is used for receiving the service issued by the user to the cluster. The DNS server may be a DNS server additionally deployed for implementing the data transmission method of the embodiment of the present application. Here, soft loading achieves load balancing by installing corresponding load balancing software on the nodes.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application provides a data transmission method which is applied to a first controller. As shown in fig. 2, the data transmission method includes:
step 201: first configuration information is obtained.
The first configuration information is used to describe a first service.
In this embodiment, a user issues information related to a first service to a cluster, and a first controller may obtain first configuration information for describing the first service through an API provided by the cluster. Here, the cluster may be a K8S cluster. The first service is characterized as an east-west service, i.e., a cluster internal service. The first controller may be a soft load controller.
Step 202: and generating a first domain name and a first address corresponding to the first service based on the first configuration information.
Wherein the first address is used for the first node to access the first service.
Based on the first configuration information, the first controller generates a first domain name and a first address corresponding to the first service. Here, the first Domain Name may be a Fully Qualified Domain Name (FQDN) that can specify a corresponding position in a Domain Name System (DNS) tree. The fully qualified domain name includes the host name and all domain name levels (top level domain name and root domain name). Com is a field, www is the host name in www.abc.com this FQDN. The first address may be a Virtual IP (VIP) address. The VIP address is an IP address that does not correspond to a particular computer or a particular computer network card, and packets addressed to this VIP address will reach the destination process of the destination host via the network card.
Step 203: sending the generated first domain name and the first address to a first server; the first domain name is used for the first server to match a domain name carried by a first request sent by a first node; and the first address is sent to the first node by the first server under the condition that the domain name carried by the first request is matched with the first domain name, and is used for the first node to access the first service.
Here, the first controller sends the generated first domain name and the first address to the first server, and the first server may match the domain name carried by the received first request with the received at least one first domain name. In the case that there is a matching first domain name, the first server sends a corresponding first address to the first node. The first server may be a DNS server.
In the embodiment of the application, the first controller generates a first domain name and a first address corresponding to the first service based on the received first configuration information, and sends the first domain name and the first address to the first server, so that the first node can receive the first address from the first server under the condition of matching the domain names, and the traffic of the first node accessing the first service is introduced into the first component through the first address. In this way, the first node can obtain a first address corresponding to the first service, introduce the traffic into the first component through the first address, realize data transmission between nodes based on the first component, and improve the traffic load performance of the cluster.
In an embodiment, the generating a first domain name and a first address corresponding to the first service based on the first configuration information includes:
and generating a first domain name and a first address corresponding to the first service based on the first configuration information when the value of the setting field in the first configuration information is a setting value.
Here, the user issues the service to the cluster, and the first controller determines whether to generate the first domain name and the first address corresponding to the first service based on the first configuration information based on the received setting field in the first configuration information corresponding to the service. The first controller determines whether to generate a first address by judging whether a value of a setting field in the first configuration information is a setting value, so as to determine whether the first node accesses the first service by calling the first component, that is, determine whether the first component of the first node takes over the flow of the first service. For example, the setting value is 1, and when the value of the setting field of the received first configuration information is 1, the first controller generates a first domain name and a first address corresponding to the first service based on the first configuration information.
In this way, the load mode of the traffic of the corresponding first service can be specified by the setting field in the first configuration information.
In an embodiment, generating a first address corresponding to the first service based on the first configuration information includes:
determining a first address corresponding to the first configuration information from a set network segment; wherein the content of the first and second substances,
the set network segment represents a flow network segment in the east-west direction.
Here, the set network segment may be a network segment of east-west traffic configured by the user to the first controller. Based on the first configuration information, the first controller determines a first address corresponding to the first service from the set network segment. When a first node initiates access to a first service to a second node, data is sent to a first address, and because the first address is in a set network segment, the first node introduces traffic for accessing the first service into a first component and realizes traffic transmission between nodes through the first component.
In an embodiment, generating a first domain name corresponding to the first service based on the first configuration information includes:
and generating a first domain name corresponding to the first configuration information based on a set rule.
Here, the setting rule may be a domain name generation rule configured by the user to the first controller, and the first controller generates the first domain name corresponding to the first configuration information, that is, the first domain name corresponding to the first service, according to the domain name generation rule.
In this way, if the domain name carried by the first request and the first domain name correspond to the same service, the first domain name generated according to the domain name generation rule is consistent with the domain name carried by the first node request, in other words, the first domain name generated by the first controller and corresponding to the first service and the domain name carried by the first node first request for accessing the first service should be consistent. Therefore, under the condition that the first domain name is matched with the domain name carried by the first request, the first server sends the first address corresponding to the first domain name to the first node, so that the first node can access the first service.
Further, when the first controller generates the first domain name, a suffix may be added according to a domain name generation rule, so that the first server performs verification according to the suffix of the domain name carried in the first request, and determines whether the first component of the first node takes over traffic for the first service, thereby determining whether to send the first address.
An embodiment of the present application provides a data transmission method, which is applied to a first node, and as shown in fig. 3, the data transmission method includes:
step 301: a first request is sent to a first server.
Wherein the first request is used for requesting a first address corresponding to a first service
In the present embodiment, a schematic diagram of a data transmission architecture is shown in fig. 1. The first node may include at least two Pod, Pod1 for accessing services, Pod2 for implementing soft-loading.
The Pod1 of the first node sends a first request to the first server requesting a first address corresponding to the first service. Here, the first server may be a DNS server. The first service is characterized as an east-west service, i.e., a cluster internal service. The first request carries a domain name corresponding to the first service of the request.
Here, the Pod1 of the first node may generate the corresponding domain name based on the first service of the request and carry the generated domain name in the first request before sending the first request to the first server.
Step 302: and receiving a first address sent by the first server.
The first address represents a first address corresponding to a first domain name matched with the domain name carried by the first request; the first domain name and the corresponding first address in the first server are from a first controller.
Here, the first server may match the domain name carried by the received first request with the received at least one first domain name. In the case that there is a matching first domain name, the Pod1 of the first node receives the first server sending the corresponding first address.
Step 303: a first component is invoked based on the first address, initiating access to the first service to a second node.
Wherein the first component is for transmitting data between the first node and the second node; the second node characterizes a node on which the first service is deployed.
The Pod1 of the first node sends a packet to a first address, which may be a VIP address determined by the first controller from the set network segment to correspond to the first configuration information. The Pod1 of the first node is configured with routing to redirect packets with destination addresses within the set network segment, and when the Pod1 of the first node initiates access to the first service to the second node, the destination address of the transmitted packet is within the set network segment, and thus the next hop of the packet is designated as the set interface, thereby enabling the first component (i.e., the Pod2 of the first node) to receive the packet through the set interface. The first component may implement traffic load balancing of the cluster through soft loading. In this way, the first node can introduce traffic for accessing the first service to the first component, and data transmission between the nodes is realized through the first component.
In this embodiment of the application, the Pod1 of the first node obtains a first address corresponding to the domain name carried in the first request by sending a first request for requesting access to the first service to the first server, and invokes the first component (i.e., the Pod2 of the first node) based on the first address to initiate access to the first service, that is, the flow for accessing the first service by the Pod1 of the first node is introduced into the first component by the first address corresponding to the domain name carried in the first request, and the flow transmission between the nodes is realized by the first component, thereby improving the cluster flow load performance. In addition, each iptables rule is not required to be maintained when the cluster system is maintained, only the first component is required to be maintained, and the maintenance difficulty of the cluster system is reduced.
In an embodiment, the sending the first request to the first server includes:
sending the first request to the first server based on second configuration information.
The second configuration information may be configured by the user to the first node, and the DNS server address may be directed to the first server by changing the deployment configuration of the node according to the second configuration information using the DNS selector function in the K8S cluster. In this way, the first node can send the first request to the first server.
Here, the first request sent by the first node may add a suffix that matches the domain name generation rule for which the first controller is configured, in other words, the domain name carried by the first request can match the first domain name generated according to the domain name generation rule. The added suffix may be default.
In practical application, the data transmission architecture provided by the embodiment of the application can simultaneously support the data transmission method of the embodiment of the application and a method for realizing data transmission through a kube-proxy component. For the nodes partially realizing east-west traffic load through the kube-proxy component, the deployment configuration of the nodes does not need to be changed, so that the addresses carried by the requests sent by the nodes do not accord with the domain name generation rule, and the addresses are not matched with the first address and can be forwarded to the DNS server of the cluster in the related technology by the first server. It should be noted that the first server supports a forwarding function, and the data transmission architecture further includes a DNS server clustered in the related art.
In one embodiment, when the calling of the first component based on the first address initiates access to the first service to the second node, the method includes:
converting a source network address of a first data packet into a second address of the first component, and transmitting the first data packet after source network address conversion to the second node;
receiving that the second node returns a second data packet to the first node based on the second address.
The first node initiates access to the first service to the second node, which is implemented in the form of sending a first data packet to the second node. Here, the source network address of the first packet is converted into the second address of the set interface of the first component, and the source network address-converted first packet is sent to the second node, and the second node generates the second packet in response to the first packet and sends the second packet to the set interface of the first component of the first node based on the second address, in other words, the first node receives the second packet returned by the second node based on the second address. Therefore, the sending process of the second data packet sent by the node of the deployment service can be simplified, and the flow load of the cluster is reduced.
It should be noted that the K8S cluster can implement communication between different nodes by setting up a portal, and the first packet can perform source network address translation, so that the second packet can return to the first component based on the second address.
An embodiment of the present application provides a data transmission method, which is applied to a first server, and as shown in fig. 4, the data transmission method includes:
step 401: a first request sent by a first node is received.
Step 402: and sending a first address corresponding to the first domain name to the first node under the condition that the domain name carried by the first request is matched with the first domain name.
The first request is used for requesting a first address corresponding to a first service; the first domain name and the corresponding first address in the first server come from a first controller; the first address is used for the first node to access the first service.
Here, the first server stores a first domain name and a corresponding first address corresponding to each of the at least one first service sent by the first controller. The first server may be a DNS server. The first service is characterized as an east-west service, i.e., a cluster internal service. The first server receives the first request, matches the domain name carried in the first request with the first domain name, and sends a first address corresponding to the first domain name matched with the domain name to the first node, where the first address may be a VIP address.
In the embodiment of the application, the first server matches a domain name carried by a received first request of the first node based on a first domain name and a corresponding first address corresponding to each stored first service in at least one first service, so that the first node can receive the first address under the condition of matching the domain names, and introduce the traffic of the first node accessing the first service into the first component through the first address, further, data transmission between the nodes is realized through the first component, and the traffic load performance of the cluster is improved.
In an embodiment, when the domain name carried in the first request matches a first domain name, before sending a first address corresponding to the first domain name to the first node, the method further includes:
verifying the suffix of the domain name carried by the first request to obtain a verification result;
and matching the domain name carried by the first request with the first domain name under the condition that the verification result represents that the suffix of the domain name carried by the first request is a set suffix.
Here, the first server verifies a suffix of the domain name carried by the received first request. And matching the domain name carried by the first request with the first domain name under the condition that the suffix of the domain name is the set suffix. According to a set rule, the first controller may add a suffix to the generated first domain name, and the first server verifies the suffix of the carried domain name after receiving the first request, and determines whether the first component of the first node takes over traffic for the first service. And under the condition that the verification result represents that the suffix of the domain name carried by the first request is the set suffix, determining that the first component takes over the flow of the first service, and matching the domain name carried by the first request with the first domain name. The setting rule may be a domain name generation rule configured to the first controller by a user.
According to the suffix of the domain name carried by the first request, the first server can screen out part of the first requests which are sent by the configured first node, and the flow generated by the first node for accessing the first service is taken over by the first component. Therefore, the matching workload can be reduced based on the matching between the domain name carried by the screened first request and the first domain name.
In practice, the suffix of the domain name may be default.
An embodiment of the present application provides a data transmission method, and as shown in fig. 5, the data transmission method includes:
step 501: the first controller acquires first configuration information and generates a first domain name and a first address corresponding to the first service based on the first configuration information.
Wherein the first configuration information is used to describe a first service.
In this embodiment, a user issues information related to a first service to a cluster, and a first controller obtains first configuration information for describing the first service through an API provided by the cluster. Here, the cluster may be a K8S cluster. The first service is characterized as an east-west service, i.e., a cluster internal service.
Based on the first configuration information, the first controller generates a first domain name and a first address corresponding to the first service. Here, the first address may be a VIP address that the first controller determines from the set network segment to correspond to the first configuration information. The first domain name may be an FQDN that specifies a corresponding location in a DNS tree. The fully qualified domain name includes the host name and all domain name levels (top level domain name and root domain name). Com is a field, www is the host name in www.abc.com this FQDN.
Step 502: the first controller transmits the generated first domain name and first address to the first server.
Step 503: the first server receives a first request sent by a first node.
The first request is used for requesting a first address corresponding to a first service.
Here, the first node may send the first request to the first server based on the second configuration information. The second configuration information may be configured by the user to the first node, and the DNS server address of the Pod is directed to the first server by changing the deployment configuration of the Pod according to the second configuration information by using the DNS selector function of the Pod in the K8S cluster, and modifying the DNS server used by the Pod.
Here, the first server may be a DNS server.
Step 504: and the first server sends a first address corresponding to the first domain name to the first node under the condition that the domain name carried by the first request is matched with the first domain name.
Here, the first server stores a first domain name and a corresponding first address corresponding to each of the at least one first service sent by the first controller. The first server receives the first request, matches the domain name carried by the first request with the first domain name, and sends a first address corresponding to the first domain name matched with the domain name to the first node.
Step 505: and the first node receives the first address sent by the first server, calls a first component based on the first address and initiates access to the first service to the second node.
Wherein the first component is for transmitting data between the first node and the second node; the second node characterizes a node on which the first service is deployed.
Here, the first node sends a data packet to the first address, and the first node is configured with a route and redirects the data packet with a target address in a set network segment. When a first node initiates access to a first service to a second node, the destination address of the transmitted data packet is in a set network segment, so that the next hop of the data packet is designated as a set interface, and the first component receives the data packet through the set interface. The first component may implement traffic load balancing of the cluster through soft loading. In this way, the first node can introduce traffic for accessing the first service to the first component, and data transmission between the nodes is realized through the first component.
Compared with a data transmission mode of issuing an iptables rule through a kube-proxy component, in the embodiment of the application, a first node sends a first request for requesting access to a first service to a first server to obtain a first address corresponding to a domain name carried by the first request, and calls the first component based on the first address to initiate access to the first service, that is, through the first address corresponding to the domain name carried by the first request, traffic of the first node accessing the first service is introduced into the first component, and data transmission between nodes is realized through the first component, so that the cluster traffic load performance is improved. In addition, each iptables rule is not required to be maintained when the cluster system is maintained, only the first component is required to be maintained, and the maintenance difficulty of the cluster system is reduced.
The present embodiment provides a data transmission system, at least for executing the data transmission method shown in fig. 5, the system includes a first controller, a first server and at least one first node, wherein,
the first controller is configured to acquire first configuration information, generate a first domain name and a first address corresponding to the first service based on the first configuration information, and send the generated first domain name and the generated first address to the first server; the first configuration information is used for describing a first service;
the first server is configured to receive a first request sent by the first node, and send a first address corresponding to a first domain name to the first node when the domain name carried in the first request is matched with the first domain name;
each first node in the at least one first node is used for sending a first request to the first server, receiving a first address sent by the first server, calling a first component based on the first address and initiating access to the first service to a second node; wherein the first component is for transmitting data between the first node and the second node; the second node characterizes a node on which the first service is deployed.
The present application will be described in further detail with reference to the following application examples.
With reference to the data transmission method corresponding to fig. 6 and the data transmission architecture corresponding to fig. 7, the data transmission in the data transmission architecture includes the following steps:
step 601: the published service is received.
The second server receives information related to the first service issued by the user to the cluster. Here, the second server may be an API server.
Step 602: the first configuration information is sent.
The first controller obtains the first configuration information of the second server through the API provided by the K8S cluster. Here, the first controller may be a soft load controller.
Step 603: the first controller generates a first domain name and a first address under the condition that a set field in the first configuration information meets a set condition, and sends the first domain name and the first address to the first server.
Here, the first controller determines whether to generate a first domain name and a first address corresponding to the first service based on the first configuration information based on a setting field in the received first configuration information. The first controller determines whether to generate the first address by whether a set field in the first configuration information satisfies a set condition, thereby determining whether the first node accesses the first service by calling the first component, that is, determining whether the first component of the first node takes over traffic for the first service. In this way, the load mode of the traffic of the corresponding first service can be specified by the setting field in the first configuration information.
Here the first domain name is FDQN and the first address is a VIP address. The first server characterizes a DNS server that is deployed in advance.
In one embodiment, the first address may be an IP address of the first component (i.e., Pod 2).
Step 604: the first node initiates a first request carrying a domain name.
The first request is used for requesting a first address corresponding to a first service.
The Pod1 of node 1 in fig. 7 accesses the east-west service, initiating a DNS request to the first server. The Pod1 of node 1 characterizes the Pod that initiated the service access.
Here, the first node may send the first request to the first server based on the second configuration information. The second configuration information may be configured by the user to the first node, and the DNS server address of the Pod is directed to the first server by changing the deployment configuration of the Pod according to the second configuration information by using the DNS selector function of the Pod in the K8S cluster, and modifying the DNS server used by the Pod. Thus, the DNS server address in the Pod points to the first server of the soft load. The Pod will access the service according to the IP set by the soft load controller.
Step 605: and the first server verifies the suffix of the carried domain name and sends a first address corresponding to the first domain name matched with the carried domain name to the first node.
Here, when the suffix of the domain name is the set suffix, the domain name carried in the first request is matched with the first domain name.
Step 606: and introducing the first data packet into the first component, and processing the first data packet based on the second address.
Here, since the first component, Pod2 for node 1 in FIG. 7, is operating in privileged mode, a route will be issued to node 1 where Pod2 is located. In the case where the Pod2 of node 1 sends the first packet to the returned first address, the first component will be invoked to effect the data sending, that is, the first packet is directed from the Pod1 of node 1 to the first component Pod2 to send the first packet in soft payload. And converting the source network address of the first packet to the second address of the first component.
Step 607: the first node sends a first data packet through the first component.
The Pod2 of node 1 assumes the role of payload, loading packets to the Pod1 of node 2 providing the service. Specifically, the first component sends a first data packet to realize data transmission between the first node and the second node. Here, the second node characterizes a node on which the first service is deployed.
Step 608: the second node transmits a second packet based on the second address.
Here, the second node generates a second packet in response to the first packet, and the second packet is transmitted by the Pod1 of the second node to the Pod2 of the first node based on the second address.
Step 609: the first node returns the second data packet to the second component.
Here, the second component, Pod1 of node 1 in fig. 7, characterizes the Pod that initiated the service access.
Compared with a data transmission mode of issuing an iptables rule through a kube-proxy component, the embodiment of the application provides a scheme for realizing K8S cluster east-west traffic load by replacing the kube-proxy component, a first node obtains a first address corresponding to a domain name carried by a first request by sending the first request for requesting access to a first service to a first server, calls the first component based on the first address, and initiates access to the first service, that is, traffic of the first node for accessing the first service is introduced into the first component through the first address corresponding to the domain name carried by the first request, and data transmission among the nodes is realized through the first component, so that cluster traffic load performance is improved. In addition, each iptables rule is not required to be maintained when the cluster system is maintained, only the first component is required to be maintained, and the maintenance difficulty of the cluster system is reduced.
As shown in FIG. 8, which is a schematic diagram of packet transmission when Pod2 takes over east-west traffic, cnad-veth-int and cnad-veth-ext are a pair of veth ports, cnad-veth-ext is bridged at birdge-cnad, and birdge-cnad is a bridge port. Cni0 is the own network of K8S, and communication between different nodes is realized through the internet access. And point 2 virtualizes a macvtap port from cnad-veth-int through macvtap technology, and point 2 takes over the macvtap port, thereby taking over the incoming flow from cnad-veth-int. Eth0 communicates with the exterior Cni 0.
The scheme requires that:
1) one Pod2 is deployed on each node, namely Pod2 is deployed in a daemonset mode in a K8S system.
2) The soft load controller defines a segment of east-west traffic for assigning a first address to the service. Meanwhile, the Pod2 runs in the privilege mode, and issues a route to the node, the route designates the next hop of the first address of the network segment of the east-west flow of the destination address as the address of the c _ path-int in fig. 8, and the outgoing interface is bridge-c _ ad.
3) bridge-cnad and cnad-veth-int need to configure addresses, and the two corresponding addresses need to be in the same network segment.
In conjunction with the schematic diagram of Pod2 shown in fig. 8, when taking over east-west traffic, the steps of the sending process are as follows:
step 1: pod1 initiates an address to access a service, the address of the service being in a network segment that defines east-west traffic.
Step 2: the node 1 kernel stack receives the data packet sent by the Pod1 from Cni 0.
And step 3: because the soft load controller issued the route to the east-west network segment, Pod1 forwarded the packet to the bridge-cnad.
And 4, step 4: bridge-cnad corresponds to a switch, and a query shows that a packet should be sent out from cnad-veth-ext.
And 5: because of the characteristic of the path-pair, the cnad-path-int receives the data packet sent by the cnad-path-ext.
Step 6: cnad-veth-int sends the packet to the macvtap device.
And 7: the Pod2 data processing process receives packets from the macvtap device.
And 8: through the load policy, Pod2 sends the packet back to the macvtap device, starting to the backend server, and at the same time, converts the source network address of the packet to the address of eth0 port on Pod 2. The address of eth0 port is the address of Pod 2.
And step 9: the packet is sent to cnad-veth-int.
Step 10: the data packet is sent from cnad-path-int, and due to the characteristic of path-pair, the cnad-path-ext receives the data packet.
Step 11: because the cnad-veth-ext is bridged to bridge-cnad, the packet is sent to bridge-cnad.
Step 12: the kernel stack receives the packet from the bridge.
Step 13: the kernel stack sends out the data packet by searching the route.
Here, the data packet is transmitted to other nodes according to communication between the nodes of the K8S cluster.
For the packet return flow taken over by the east-west traffic, in step 8, the packet is subjected to source network address translation, and the Pod of each node in the K8S cluster is communicated, so the packet returns to Pod2 according to the network framework of the K8S cluster, and then the Pod2 returns the packet to the Pod1 accessing the service.
The embodiment of the application provides a scheme for replacing a kube-proxy component, and the east-west flow load of a K8S cluster can be realized.
In order to implement the method according to the embodiment of the present application, an embodiment of the present application further provides a data transmission device, as shown in fig. 9, where the data transmission device includes:
a first receiving unit 901, configured to obtain first configuration information; the first configuration information is used for describing a first service;
a first generating unit 902, configured to generate a first domain name and a first address corresponding to the first service based on the first configuration information;
a first sending unit 903, configured to send the generated first domain name and first address to a first server; the first domain name is used for the first server to match a domain name carried by a first request sent by a first node; and the first address is sent to the first node by the first server under the condition that the domain name carried by the first request is matched with the first domain name, and is used for the first node to access the first service.
In one embodiment, the first generating unit 902 is configured to:
and generating a first domain name and a first address corresponding to the first service based on the first configuration information when the value of the setting field in the first configuration information is a setting value.
In one embodiment, the first generating unit 902 is configured to:
determining a first address corresponding to the first configuration information from a set network segment; wherein the content of the first and second substances,
the set network segment represents a flow network segment in the east-west direction.
In one embodiment, the first generating unit 902 is configured to:
and generating a first domain name corresponding to the first configuration information based on a set rule.
In practical applications, the first receiving unit 901 and the first sending unit 903 may be implemented by a communication interface in a data transmission device, and the first generating unit 902 may be implemented by a processor in the data transmission device.
It should be noted that: in the data transmission device provided in the above embodiment, only the division of the program modules is exemplified when data transmission is performed, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules to complete all or part of the processing described above. In addition, the data transmission device and the data transmission method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
In order to implement the method according to the embodiment of the present application, an embodiment of the present application further provides a data transmission device, as shown in fig. 10, where the data transmission device includes:
a second sending unit 1001 configured to send the first request to the first server; the first request is used for requesting a first address corresponding to a first service;
a second receiving unit 1002, configured to receive a first address sent by the first server; the first address represents a first address corresponding to a first domain name matched with the domain name carried by the first request;
a first accessing unit 1003, configured to invoke a first component based on the first address, and initiate access to the first service to a second node; wherein the first component is for transmitting data between a first node and the second node; the second node characterizes a node deployed with the first service; the first domain name and the corresponding first address in the first server are from a first controller.
In one embodiment, the second sending unit 1001 is configured to:
sending the first request to the first server based on second configuration information.
In one embodiment, the first accessing unit 1003 is configured to:
converting a source network address of a first data packet into a second address of the first component, and transmitting the first data packet after source network address conversion to the second node;
receiving that the second node returns a second data packet to the first node based on the second address.
In practical applications, the second sending unit 1001 and the second receiving unit 1002 may be implemented by a communication interface in a data transmission device, and the first accessing unit 1003 may be implemented by a processor in the data transmission device in combination with the communication interface.
It should be noted that: in the data transmission device provided in the above embodiment, only the division of the program modules is exemplified when data transmission is performed, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules to complete all or part of the processing described above. In addition, the data transmission device and the data transmission method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
In order to implement the method according to the embodiment of the present application, an embodiment of the present application further provides a data transmission device, as shown in fig. 11, where the data transmission device includes:
a third receiving unit 1101, configured to receive a first request sent by a first node; the first request is used for requesting a first address corresponding to a first service;
a third sending unit 1102, configured to send, to the first node, a first address corresponding to the first domain name when the domain name carried in the first request is matched with the first domain name; wherein the first domain name and the corresponding first address in the first server are from a first controller; the first address is used for the first node to access the first service.
In one embodiment, the apparatus further comprises:
the verification unit is used for verifying the suffix of the domain name carried by the first request to obtain a verification result;
a matching unit, configured to match the domain name carried by the first request with the first domain name when the verification result indicates that the suffix of the domain name carried by the first request is the set suffix
In practical applications, the third receiving unit 1101 may be implemented by a communication interface in the data transmission device, the verifying unit and the matching unit may be implemented by a processor in the data transmission device, and the third sending unit 1102 may be implemented by the processor in the data transmission device in combination with the communication interface.
It should be noted that: in the data transmission device provided in the above embodiment, only the division of the program modules is exemplified when data transmission is performed, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules to complete all or part of the processing described above. In addition, the data transmission device and the data transmission method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Based on the hardware implementation of the program module, and in order to implement the data transmission method on the first controller side in the embodiment of the present application, an embodiment of the present application further provides a controller, where the controller is a first controller, and as shown in fig. 12, the controller 1200 includes:
a first communication interface 1210 capable of performing information interaction with other devices such as network devices and the like;
the first processor 1220 is connected to the first communication interface 1210 to implement information interaction with other devices, and is configured to execute a method provided by one or more technical solutions of the first controller side when running a computer program. And the computer program is stored on the first memory 1230.
Of course, in practice, the various components in the controller 1200 are coupled together by a first bus system 1240. It is understood that the first bus system 1240 is used to enable communications among the components. The first bus system 1240 includes a first power bus, a first control bus, and a first status signal bus in addition to the first data bus. For clarity of illustration, however, the various buses are labeled as a first bus system 1240 in fig. 12.
The first memory 1230 in the embodiment of the present application is used to store various types of data to support the operation of the controller 1200. Examples of such data include: any computer program for operation on the controller 1200.
It will be appreciated that the first memory 1230 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The first memory 1230 described in embodiments herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiments of the present application may be applied to the first processor 1220, or implemented by the first processor 1220. The first processor 1220 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the first processor 1220. The first processor 1220 may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The first processor 1220 may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the first memory 1230, and the first processor 1220 reads the program in the first memory 1230, and performs the steps of the foregoing method in conjunction with its hardware.
Optionally, when the first processor 1220 executes the program, the corresponding process implemented by the first controller in the methods according to the embodiments of the present application is implemented, and for brevity, no further description is given here.
Based on the hardware implementation of the program module, and in order to implement the data transmission method at the first node side in the embodiment of the present application, an embodiment of the present application further provides a node, where the node is a first node, and as shown in fig. 13, the node 1300 includes:
a second communication interface 1310 capable of interacting with other devices, such as network devices;
the second processor 1320 is connected to the second communication interface 1310 to implement information interaction with other devices, and is configured to execute the method provided by one or more technical solutions of the first node side when running a computer program. And the computer program is stored on the second memory 1330.
Of course, in practice, the various components in node 1300 are coupled together by second bus system 1340. It is understood that the second bus system 1340 is used to enable communications among the components connected. The second bus system 1340 includes a second power bus, a second control bus, and a second status signal bus in addition to a second data bus. For clarity of illustration, however, the various buses are labeled as the second bus system 1340 in FIG. 13.
Second memory 1330 in embodiments of the present application may be used to store various types of data for supporting the operation of node 1300. Examples of such data include: any computer program for operating on node 1300.
It will be appreciated that the second memory 1330 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Wherein the nonvolatile Memory can be ROM, PROM, EPROM, EEPROM, FRAM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM; the magnetic surface storage may be disk storage or tape storage. Volatile memory can be RAM, which acts as external cache memory. By way of example but not limitation, many forms of RAM are available, such as SRAM, SSRAM, DRAM, SDRAM, DDRSDRAM, ESDRAM, SLDRAM, DRRAM. The second memory 1330 described in embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiments of the present application may be applied to the second processor 1320, or implemented by the second processor 1320. The second processor 1320 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the second processor 1320. The second processor 1320 may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The second processor 1320 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium located in the second memory 1330, and the second processor 1320 reads the program in the second memory 1330, and in combination with its hardware, performs the steps of the aforementioned method.
Optionally, when the second processor 1320 executes the program, the corresponding process implemented by the first node in the methods according to the embodiments of the present application is implemented, and for brevity, no further description is given here.
Based on the hardware implementation of the program module, and in order to implement the first server-side data transmission method in the embodiment of the present application, an embodiment of the present application further provides a server, where the server is the first server, and as shown in fig. 14, the server 1400 includes:
a third communication interface 1410 capable of performing information interaction with other devices such as network devices;
the third processor 1420 is connected to the third communication interface 1410 to implement information interaction with other devices, and is configured to execute the method provided by one or more technical solutions of the first server side when running a computer program. And the computer program is stored on the third memory 1430.
Of course, in practice, the various components of the server 1400 are coupled together by a third bus system 1440. It is understood that the third bus system 1440 is used to enable communications among these components. The third bus system 1440 includes, in addition to the third data bus, a third power bus, a third control bus, and a third status signal bus. For clarity of illustration, however, the various buses are labeled as the third bus system 1440 in fig. 14.
The third memory 1430 in the embodiment of the present application is used to store various types of data to support the operation of the server 1400. Examples of such data include: any computer program for operating on server 1400.
It will be appreciated that the third memory 1430 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Wherein the nonvolatile Memory can be ROM, PROM, EPROM, EEPROM, FRAM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM; the magnetic surface storage may be disk storage or tape storage. Volatile memory can be RAM, which acts as external cache memory. By way of example but not limitation, many forms of RAM are available, such as SRAM, SSRAM, DRAM, SDRAM, DDRSDRAM, ESDRAM, SLDRAM, DRRAM. The third memory 1430 described in embodiments herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiments of the present application may be applied to the third processor 1420, or implemented by the third processor 1420. The third processor 1420 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the third processor 1420. The third processor 1420 may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The third processor 1420 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the third memory 1430 and the third processor 1420 reads the programs in the third memory 1430 and in combination with its hardware performs the steps of the method previously described.
Optionally, when the third processor 1420 executes the program, the corresponding process implemented by the first server in the methods according to the embodiments of the present application is implemented, and for brevity, no further description is given here.
In an exemplary embodiment, the present application further provides a storage medium, specifically a computer-readable storage medium, for example, including a first memory 1230, a second memory 1330, and a third memory 1430, which store computer programs, and the computer programs can be executed by the first processor 1220, the second processor 1320, and the third processor 1420 of the electronic device, respectively, to complete the steps of the foregoing data transmission method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, electronic device and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict. Unless otherwise specified and limited, the term "coupled" is to be construed broadly, e.g., as meaning electrical connections, or as meaning communications between two elements, either directly or indirectly through intervening media, as well as the specific meanings of such terms as understood by those skilled in the art.
In addition, in the examples of the present application, "first", "second", and the like are used for distinguishing similar objects, and are not necessarily used for describing a specific order or a sequential order. It should be understood that "first \ second \ third" distinct objects may be interchanged under appropriate circumstances such that the embodiments of the application described herein may be implemented in an order other than those illustrated or described herein.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Various combinations of the specific features in the embodiments described in the detailed description may be made without contradiction, for example, different embodiments may be formed by different combinations of the specific features, and in order to avoid unnecessary repetition, various possible combinations of the specific features in the present application will not be described separately.

Claims (17)

1. A data transmission method, applied to a first controller, the method comprising:
acquiring first configuration information; the first configuration information is used for describing a first service;
generating a first domain name and a first address corresponding to the first service based on the first configuration information;
sending the generated first domain name and the first address to a first server; the first domain name is used for the first server to match a domain name carried by a first request sent by a first node; and the first address is sent to the first node by the first server under the condition that the domain name carried by the first request is matched with the first domain name, and is used for the first node to access the first service.
2. The data transmission method according to claim 1, wherein the generating a first domain name and a first address corresponding to the first service based on the first configuration information includes:
and generating a first domain name and a first address corresponding to the first service based on the first configuration information when the value of the setting field in the first configuration information is a setting value.
3. The data transmission method according to claim 1 or 2, wherein generating the first address corresponding to the first service based on the first configuration information comprises:
determining a first address corresponding to the first configuration information from a set network segment; wherein the content of the first and second substances,
the set network segment represents a flow network segment in the east-west direction.
4. The data transmission method according to claim 1 or 2, wherein generating a first domain name corresponding to the first service based on the first configuration information comprises:
and generating a first domain name corresponding to the first configuration information based on a set rule.
5. A data transmission method, applied to a first node, comprising:
sending a first request to a first server; the first request is used for requesting a first address corresponding to a first service;
receiving a first address sent by the first server; the first address represents a first address corresponding to a first domain name matched with the domain name carried by the first request;
calling a first component based on the first address, and initiating access to the first service to a second node; wherein the first component is for transmitting data between the first node and the second node; the second node characterizes a node deployed with the first service; the first domain name and the corresponding first address in the first server are from a first controller.
6. The data transmission method of claim 5, wherein sending the first request to the first server comprises:
sending the first request to the first server based on second configuration information.
7. The data transmission method according to claim 5 or 6, wherein when the first component is invoked based on the first address to initiate access to the first service to a second node, the method comprises:
converting a source network address of a first data packet into a second address of the first component, and transmitting the first data packet after source network address conversion to the second node;
receiving that the second node returns a second data packet to the first node based on the second address.
8. A data transmission method is applied to a first server and comprises the following steps:
receiving a first request sent by a first node; the first request is used for requesting a first address corresponding to a first service;
sending a first address corresponding to a first domain name to the first node under the condition that the domain name carried by the first request is matched with the first domain name; wherein the first domain name and the corresponding first address in the first server are from a first controller; the first address is used for the first node to access the first service.
9. The data transmission method according to claim 8, wherein when the domain name carried in the first request matches a first domain name, before sending a first address corresponding to the first domain name to the first node, the method further includes:
verifying the suffix of the domain name carried by the first request to obtain a verification result;
and matching the domain name carried by the first request with the first domain name under the condition that the verification result represents that the suffix of the domain name carried by the first request is a set suffix.
10. A data transmission system, comprising a first controller, a first server and at least one first node, wherein,
the first controller is configured to acquire first configuration information, generate a first domain name and a first address corresponding to the first service based on the first configuration information, and send the generated first domain name and the generated first address to the first server; the first configuration information is used for describing a first service;
the first server is configured to receive a first request sent by the first node, and send a first address corresponding to a first domain name to the first node when the domain name carried in the first request is matched with the first domain name;
each first node in the at least one first node is used for sending a first request to the first server, receiving a first address sent by the first server, calling a first component based on the first address and initiating access to the first service to a second node; wherein the first component is for transmitting data between the first node and the second node; the second node characterizes a node on which the first service is deployed.
11. A data transmission apparatus, comprising:
a first receiving unit, configured to acquire first configuration information; the first configuration information is used for describing a first service;
a first generating unit, configured to generate a first domain name and a first address corresponding to the first service based on the first configuration information;
a first sending unit configured to send the generated first domain name and the first address to a first server; the first domain name is used for the first server to match a domain name carried by a first request sent by a first node; and the first address is sent to the first node by the first server under the condition that the domain name carried by the first request is matched with the first domain name, and is used for the first node to access the first service.
12. A data transmission apparatus, comprising:
a second sending unit, configured to send the first request to the first server; the first request is used for requesting a first address corresponding to a first service;
a second receiving unit, configured to receive the first address sent by the first server; the first address represents a first address corresponding to a first domain name matched with the domain name carried by the first request;
the first access unit is used for calling a first component based on the first address and initiating access to the first service to a second node; wherein the first component is for transmitting data between a first node and the second node; the second node characterizes a node deployed with the first service; the first domain name and the corresponding first address in the first server are from a first controller.
13. A data transmission apparatus, comprising:
a third receiving unit, configured to receive a first request sent by a first node; the first request is used for requesting a first address corresponding to a first service;
a third sending unit, configured to send, to the first node, a first address corresponding to the first domain name when the domain name carried in the first request is matched with the first domain name; wherein the first domain name and the corresponding first address in the first server are from a first controller; the first address is used for the first node to access the first service.
14. A controller, wherein the controller is a first controller, comprising: a first processor and a first memory for storing a computer program capable of running on the processor,
wherein the first processor is configured to execute the steps of the data transmission method according to any one of claims 1 to 4 when running the computer program.
15. A node, wherein the node is a first node, comprising: a second processor and a second memory for storing a computer program capable of running on the processor,
wherein the second processor is configured to execute the steps of the data transmission method according to any one of claims 5 to 7 when running the computer program.
16. A server, wherein the server is a first server, comprising: a third processor and a third memory for storing a computer program capable of running on the processor,
wherein the third processor is adapted to perform the steps of the data transmission method according to claim 8 or 9 when running the computer program.
17. A storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements at least one of:
the steps of the data transmission method of any one of claims 1 to 4;
the steps of the data transmission method of any one of claims 5 to 7;
the steps of the data transmission method of claim 8 or 9.
CN202111146129.XA 2021-09-28 2021-09-28 Data transmission method, device and storage medium Active CN113676564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111146129.XA CN113676564B (en) 2021-09-28 2021-09-28 Data transmission method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111146129.XA CN113676564B (en) 2021-09-28 2021-09-28 Data transmission method, device and storage medium

Publications (2)

Publication Number Publication Date
CN113676564A true CN113676564A (en) 2021-11-19
CN113676564B CN113676564B (en) 2022-11-22

Family

ID=78550486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111146129.XA Active CN113676564B (en) 2021-09-28 2021-09-28 Data transmission method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113676564B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114884880A (en) * 2022-04-06 2022-08-09 阿里巴巴(中国)有限公司 Data transmission method and system
CN115086321A (en) * 2022-06-14 2022-09-20 京东科技信息技术有限公司 Multi-cluster traffic forwarding method and device, and electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108696452A (en) * 2018-05-16 2018-10-23 腾讯科技(深圳)有限公司 A kind of container levels network flow acquisition, network quality identification method, device, system
CN109347947A (en) * 2018-10-15 2019-02-15 郑州云海信息技术有限公司 A kind of method of load balancing, name server and cluster nas server
US20200007495A1 (en) * 2018-06-27 2020-01-02 Cisco Technology, Inc. Address translation for external network appliance
CN111324361A (en) * 2018-12-14 2020-06-23 中国移动通信集团北京有限公司 Application upgrading method and device
EP3716533A1 (en) * 2019-03-29 2020-09-30 Juniper Networks, Inc. Configuring service load balancers with specified backend virtual networks
US20200403911A1 (en) * 2019-06-18 2020-12-24 Nutanix, Inc. Dynamic distributed service location discovery
US20200412716A1 (en) * 2019-06-27 2020-12-31 Vmware, Inc. Location-aware service request handling
CN113094182A (en) * 2021-05-18 2021-07-09 联想(北京)有限公司 Load balancing processing method and device for service and cloud server
CN113141405A (en) * 2021-04-23 2021-07-20 北京奇艺世纪科技有限公司 Service access method, middleware system, electronic device, and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108696452A (en) * 2018-05-16 2018-10-23 腾讯科技(深圳)有限公司 A kind of container levels network flow acquisition, network quality identification method, device, system
US20200007495A1 (en) * 2018-06-27 2020-01-02 Cisco Technology, Inc. Address translation for external network appliance
CN109347947A (en) * 2018-10-15 2019-02-15 郑州云海信息技术有限公司 A kind of method of load balancing, name server and cluster nas server
CN111324361A (en) * 2018-12-14 2020-06-23 中国移动通信集团北京有限公司 Application upgrading method and device
EP3716533A1 (en) * 2019-03-29 2020-09-30 Juniper Networks, Inc. Configuring service load balancers with specified backend virtual networks
US20200403911A1 (en) * 2019-06-18 2020-12-24 Nutanix, Inc. Dynamic distributed service location discovery
US20200412716A1 (en) * 2019-06-27 2020-12-31 Vmware, Inc. Location-aware service request handling
CN113141405A (en) * 2021-04-23 2021-07-20 北京奇艺世纪科技有限公司 Service access method, middleware system, electronic device, and storage medium
CN113094182A (en) * 2021-05-18 2021-07-09 联想(北京)有限公司 Load balancing processing method and device for service and cloud server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114884880A (en) * 2022-04-06 2022-08-09 阿里巴巴(中国)有限公司 Data transmission method and system
CN114884880B (en) * 2022-04-06 2024-03-08 阿里巴巴(中国)有限公司 Data transmission method and system
CN115086321A (en) * 2022-06-14 2022-09-20 京东科技信息技术有限公司 Multi-cluster traffic forwarding method and device, and electronic device
CN115086321B (en) * 2022-06-14 2024-04-05 京东科技信息技术有限公司 Multi-cluster traffic forwarding method and device and electronic equipment

Also Published As

Publication number Publication date
CN113676564B (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN111885075B (en) Container communication method, device, network equipment and storage medium
US10931574B2 (en) Universal customer premise equipment
US8743894B2 (en) Bridge port between hardware LAN and virtual switch
JP4897927B2 (en) Method, system, and program for failover in a host that simultaneously supports multiple virtual IP addresses across multiple adapters
KR101912073B1 (en) Virtualization gateway between virtualized and non-virtualized networks
US9515988B2 (en) Device and method for split DNS communications
CN113572838B (en) Network access method, device, equipment and medium based on Kubernetes
US9961021B2 (en) Enabling applications in a multi-transport stack environment
CN113676564B (en) Data transmission method, device and storage medium
CN109495596B (en) Method and device for realizing address conversion
US11777897B2 (en) Cloud infrastructure resources for connecting a service provider private network to a customer private network
CN108551488A (en) Distributed container cluster load balancing method based on domestic CPU and OS
CN114301868B (en) Method for quickly generating virtual container floating IP and method and device for network direct connection
CN112333017B (en) Service configuration method, device, equipment and storage medium
CN114501593B (en) Network slice access method, device, system and storage medium
CN113765801B (en) Message processing method and device applied to data center, electronic equipment and medium
CN116248595B (en) Method, device, equipment and medium for communication between cloud intranet and physical network
CN116016448A (en) Service network access method, device, equipment and storage medium
CN111800340B (en) Data packet forwarding method and device
US20230396579A1 (en) Cloud infrastructure resources for connecting a service provider private network to a customer private network
CN113973086B (en) Data transmission method, device and storage medium
US20230123734A1 (en) Proxy-Less Private Connectivity Across VPC Networks With Overlapping Addresses
CN115065730A (en) Data processing method, first container, electronic device and storage medium
CN116781625A (en) Load balancing method, device, equipment and computer readable storage medium
CN117278395A (en) Network configuration method and server in container cloud platform environment

Legal Events

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