CN107465765B - Intelligent application gateway implementation method based on container cloud - Google Patents

Intelligent application gateway implementation method based on container cloud Download PDF

Info

Publication number
CN107465765B
CN107465765B CN201710858053.0A CN201710858053A CN107465765B CN 107465765 B CN107465765 B CN 107465765B CN 201710858053 A CN201710858053 A CN 201710858053A CN 107465765 B CN107465765 B CN 107465765B
Authority
CN
China
Prior art keywords
etcd
application gateway
server
docker
intelligent application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710858053.0A
Other languages
Chinese (zh)
Other versions
CN107465765A (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.)
Shenzhen Chaoyue Electronics Co.,Ltd.
Original Assignee
Shenzhen Svi Technology 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 Shenzhen Svi Technology Co ltd filed Critical Shenzhen Svi Technology Co ltd
Priority to CN201710858053.0A priority Critical patent/CN107465765B/en
Publication of CN107465765A publication Critical patent/CN107465765A/en
Application granted granted Critical
Publication of CN107465765B publication Critical patent/CN107465765B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

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

Abstract

The invention discloses an intelligent application gateway implementation method based on a container cloud, which comprises a distributed data storage and high-availability cluster (etcd), a DNS (skyDNS), a configuration generator (confd), a tag acquirer (tagColector), a policy selector (policySector) and a task executor (taskExecutor), wherein the application gateway cluster can be dynamically expanded according to scale, each port can be multiplexed, and the utilization rate of IP resources is greatly improved; load balancing and dynamic allocation of the outlet can be realized through a self-defined scheduling algorithm, and the overall availability and performance of the cloud platform are improved.

Description

Intelligent application gateway implementation method based on container cloud
Technical Field
The invention relates to the technical field of gateways, in particular to a method for realizing an intelligent application gateway based on a container cloud.
Background
With the popularization of network, cloud computing and container technologies, cloud applications show explosive growth, the shortage of public network IP resources is gradually shown, although the IPv6 technology has appeared for many years, the limitation is limited to hardware and technology, most data centers still adopt a public network IPv4 scheme at present, and one-to-one binding of applications and ports is realized through NAT. Although the existing scheme can improve the utilization rate of the IP, the problems of incapability of multiplexing ports, complex management, low availability and the like still exist,
for the current application, one external network IP port can only point to one internal network server, most applications need to pass through http or http standard 80, 443 ports, if not reusable, resource waste is generated, utilization rate is low, in addition, the whole data center passes through one gateway outlet, if the gateway has no intelligent fault recovery and automatic load balancing mechanism, great influence is generated on service provision, and the gateway availability problem is caused: moreover, the NAT needs to be mapped manually, so that for an administrator, the maintenance workload is huge, and meanwhile, errors are possible. Particularly, in the container platform, the IP address of the container can be changed as required, and the maintenance workload can be increased.
Disclosure of Invention
The invention aims to overcome the problems in the prior art, provides an efficient, simple and highly-available intelligent application gateway and solves the problem of external network export of cloud services.
In order to achieve the technical purpose and achieve the technical effect, the invention is realized by the following technical scheme:
an implementation method of an intelligent application gateway based on a container cloud comprises a distributed data storage and high availability cluster (etcd), a DNS (sky DNS), a configuration generator (config), a tag acquirer (tagCollector), a policy selector (policySector) and a task executor (tasExecutor), and comprises the following steps:
1) deploying etcd, confd, tagCollector and taskExecutor services on at least one server, and deploying a sky DNS service on any external network server;
2) and adding a new external network IP resource list to/etcd/docker/publicIP in the etcd.
3) Changing NAMESERVER of the domain name to a cloud platform extranet DNS address in the domain name setting;
4) each server judges whether the server is an etcdeleader or not by acquiring an etcd state, if so, a tagCollector is started, and all container tag data taglist.json are acquired from metadata information of a periodical pull container cloud platform;
5) the Taskexecutor analyzes taglist.json and compares the taglist with/etc/docker/allocator, if the newly added domain name is found, the request is sent to the policySector to acquire an external network service address, and the policySector returns an IP address in/etcd/docker/public IP according to policy configuration;
6) the TaskExecutor calls a confd of a host where the IP is located, the host template regenerates the configuration of nginx and reloads the instance, if the configuration is successful, the/etc/docker/allocator in the etcd is updated, and finally the direction of the domain name and the IP in the skyDNS is updated;
7) the TaskExecutor regularly scans/etc/docker/allocator in the cloud platform etcd to ensure that the resources recorded in the allocator are consistent with the actual resources, and performs performance statistics by calling the performance API on nginx.
Preferably, the policy selector (policySelector) is a load balancing method selected when the service is routed, and the load balancing method measures the load condition of each server through the network (systemload/tcpcselect) and preferentially allocates the load condition to the host with the lowest load.
Preferably, the policy selector (policySelector) is a weight-based method selected when routing a service, the weight-based method being assigned by manually specifying a weight setting in an IP address, the weight being represented by a number of 1 to 100, the larger the number the larger the weight.
Preferably, the policy selector (policySelector) is a parent-master-based scheduling method selected during service routing, and the parent-master scheduling method schedules the same root domain name to the same server first.
Preferably, the policy selector (policySelector) is a label-based method selected during service routing, and the label-based method directly designates and schedules a user in a label to a host where a specific IP is located.
The invention has the beneficial effects that:
the application gateway cluster can be dynamically expanded according to the scale, each port can be multiplexed, and the utilization rate of IP resources is greatly improved; load balancing and dynamic allocation of the outlet can be realized through a self-defined scheduling algorithm, and the overall availability and performance of the cloud platform are improved.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of the system architecture design of the present invention;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present embodiment is an implementation method of an intelligent application gateway based on a container cloud, including a distributed data storage and high availability cluster (etcd), a DNS server (sky DNS), a configuration generator (config d), a tag acquirer (tag collector), a policy selector (policy selector), and a task executor (task executor), and the implementation method of the intelligent application gateway is as follows:
1) deploying services such as etcd, confd, tagCollector, taskExecutor and the like on at least one server, and deploying a sky DNS service on any external network server;
2) and adding a new external network IP resource list to/etcd/docker/publicIP in the etcd.
3) Changing NAMESERVER of the domain name to a cloud platform extranet DNS address in the domain name setting;
4) each server judges whether the server is an etcdeleader or not by acquiring an etcd state, if so, a tagCollector is started, and all container tag data taglist.json are acquired from metadata information of a periodical pull container cloud platform;
5) the Taskexecutor analyzes taglist.json and compares the taglist with/etc/docker/allocator (a distributor before), if a newly added domain name is found, the request is sent to the policySector to acquire an external network service address, and the policySector returns an IP address in/etcd/docker/public IP according to policy configuration;
6) the TaskExecutor calls a confd of a host where the IP is located, the host template regenerates the configuration of nginx and reloads the instance, if the configuration is successful, the/etc/docker/allocator in the etcd is updated, and finally the direction of the domain name and the IP in the skyDNS is updated;
7) the TaskExecutor regularly scans/etc/docker/allocator in the cloud platform etcd to ensure that the resources recorded in the allocator are consistent with the actual resources, and performs performance statistics by calling the performance API on nginx.
The policy selector (policySelector) is a load balancing method selected when a service is routed, and the load balancing method measures the load condition of each server through the network (systemload/TCPcollection), and preferentially allocates the load condition to the host with the lowest load.
The policy selector (policySelector) is a weight-based method selected when routing a service, the weight-based method being assigned by manually specifying a weight setting in an IP address, the weight being represented by a number of 1 to 100, the larger the number, the larger the weight.
As mentioned above, the policy selector (policySelector) is a parent-master scheduling method based on service routing, and the parent-master scheduling method schedules the same root domain name to the same server first.
As mentioned above, the policy selector (policysector) is a label-based method selected during service routing, and the label-based method directly assigns and schedules a user in a label to a host where a specific IP is located.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (5)

1. An intelligent application gateway implementation method based on a container cloud comprises a distributed data storage and high availability cluster (etcd), a DNS (sky DNS), a configuration generator (config), a tag acquirer (tagCollector), a policy selector (policySector) and a task executor (tasExecutor), and is characterized in that:
1) deploying etcd, confd, tagCollector and taskExecutor services on at least one server, and deploying a sky DNS service on any external network server;
2) adding a new external network IP resource list to the/etcd/docker/public IP in the etcd;
3) changing NAMESERVER of the domain name to a cloud platform extranet DNS address in the domain name setting;
4) each server judges whether the server is an etcd leader or not by acquiring an etcd state, if so, a tagCollector is started, and all container tag data taglist.json are acquired from metadata information of a periodical pull container cloud platform;
5) the Taskexecutor analyzes taglist.json and compares the taglist with/etc/docker/allocator, if the newly added domain name is found, the request is sent to the policySector to acquire an external network service address, and the policySector returns an IP address in/etcd/docker/public IP according to policy configuration;
6) the TaskExecutor calls a confd of a host where the IP is located, the host template regenerates the configuration of nginx and reloads the instance, if the configuration is successful, the/etc/docker/allocator in the etcd is updated, and finally the direction of the domain name and the IP in the skyDNS is updated;
7) the TaskExecutor regularly scans/etc/docker/allocator in the cloud platform etcd to ensure that the resources recorded in the allocator are consistent with the actual resources, and performs performance statistics by calling the performance API on nginx.
2. The method of claim 1 for implementing a container cloud based intelligent application gateway: the policy selector (policySelector) is a load balancing method selected when a service is routed, and the load balancing method measures the load condition (system load/TCP collection) of each server through a network and preferentially distributes the load condition to a host with the lowest load.
3. The method for implementing the intelligent application gateway based on the container cloud according to any one of claims 1 to 2, wherein the method comprises the following steps: the policy selector (policySelector) is a weight-based method selected at the time of service routing, the weight-based method being assigned by manually specifying weight setting in an IP address, the weight being represented by a number of 1-100, the larger the number the larger the weight.
4. The method for implementing the intelligent application gateway based on the container cloud according to any one of claims 1 to 2, wherein the method comprises the following steps: the policy selector (policySelector) is a parent-master-based scheduling method selected during service routing, and the parent-master scheduling method schedules the same server for the same root domain name first.
5. The method for implementing the intelligent application gateway based on the container cloud according to any one of claims 1 to 2, wherein the method comprises the following steps: the policy selector (policySelector) is a label-based method selected during service routing, and the label-based method directly assigns and schedules a user in a label to a host where a specific IP is located.
CN201710858053.0A 2017-09-21 2017-09-21 Intelligent application gateway implementation method based on container cloud Active CN107465765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710858053.0A CN107465765B (en) 2017-09-21 2017-09-21 Intelligent application gateway implementation method based on container cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710858053.0A CN107465765B (en) 2017-09-21 2017-09-21 Intelligent application gateway implementation method based on container cloud

Publications (2)

Publication Number Publication Date
CN107465765A CN107465765A (en) 2017-12-12
CN107465765B true CN107465765B (en) 2020-07-14

Family

ID=60552849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710858053.0A Active CN107465765B (en) 2017-09-21 2017-09-21 Intelligent application gateway implementation method based on container cloud

Country Status (1)

Country Link
CN (1) CN107465765B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10484979B2 (en) * 2015-02-27 2019-11-19 Qualcomm Incorporated Fast enhanced component carrier activation
CN108551488A (en) * 2018-05-03 2018-09-18 山东汇贸电子口岸有限公司 Distributed container cluster load balancing method based on domestic CPU and OS
CN110881007B (en) * 2018-09-05 2023-03-07 北京京东尚科信息技术有限公司 Container cluster network access method and device
CN109842559B (en) * 2018-12-28 2021-04-09 中兴通讯股份有限公司 Network communication method and system
CN110471683B (en) * 2019-08-06 2023-11-24 上海浦东发展银行股份有限公司信用卡中心 Intelligent DNS-based container cloud application blue-green publishing method
CN111163074B (en) * 2019-12-25 2022-11-25 腾讯云计算(北京)有限责任公司 Gateway service control method and device
CN111800458B (en) * 2020-05-22 2021-04-23 浙商银行股份有限公司 Dynamic load balancing method and system for Kubernetes container cloud platform
CN111935312B (en) * 2020-09-21 2021-02-02 深圳蜂巢互联(南京)科技研究院有限公司 Industrial Internet container cloud platform and flow access control method thereof
CN112905114B (en) * 2021-02-10 2022-09-20 山东英信计算机技术有限公司 Performance adjusting method, system and medium for distributed storage
CN113992681A (en) * 2021-09-18 2022-01-28 上海金仕达软件科技有限公司 Method for ensuring strong consistency of data in distributed system
CN115001904A (en) * 2022-05-30 2022-09-02 紫光建筑云科技(重庆)有限公司 High-availability NAT gateway design method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897946A (en) * 2016-04-08 2016-08-24 北京搜狐新媒体信息技术有限公司 Obtaining method and system of access address
CN106126347A (en) * 2016-08-17 2016-11-16 浪潮电子信息产业股份有限公司 A kind of method effectively realizing mainframe cluster scheduling of resource under cloud platform
CN106302771A (en) * 2016-08-23 2017-01-04 浪潮电子信息产业股份有限公司 A kind of method for configuring domain name of the application created based on Docker container

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897946A (en) * 2016-04-08 2016-08-24 北京搜狐新媒体信息技术有限公司 Obtaining method and system of access address
CN106126347A (en) * 2016-08-17 2016-11-16 浪潮电子信息产业股份有限公司 A kind of method effectively realizing mainframe cluster scheduling of resource under cloud platform
CN106302771A (en) * 2016-08-23 2017-01-04 浪潮电子信息产业股份有限公司 A kind of method for configuring domain name of the application created based on Docker container

Also Published As

Publication number Publication date
CN107465765A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN107465765B (en) Intelligent application gateway implementation method based on container cloud
US11842207B2 (en) Centralized networking configuration in distributed systems
CN108924268B (en) Container cloud service system and pod creation method and device
CN109547517B (en) Method and device for scheduling bandwidth resources
CN107465708B (en) CDN bandwidth scheduling system and method
CN109618002B (en) Micro-service gateway optimization method, device and storage medium
CN103703724B (en) Resource payment method
US11928514B2 (en) Systems and methods providing serverless DNS integration
CN112099938A (en) Determining resource allocation in a distributed computing environment using multi-dimensional metadata tag sets
CN105159775A (en) Load balancer based management system and management method for cloud computing data center
CN110737508A (en) cloud container service network system based on wave cloud and implementation method
CN111431881B (en) Method and device for trapping nodes based on windows operating system
CN110311948B (en) Communication method between container groups and container cloud network system based on same
WO2014114097A1 (en) Load sharing method and apparatus
CN110071965B (en) Data center management system based on cloud platform
CN113452806B (en) Container adaptation SDN network management method and system based on Kubernets system
CN105262703A (en) Routing bandwidth allocation method based on double priorities
CN110266822A (en) A kind of shared implementation of load balancing based on nginx
US11178217B2 (en) DNS-based in-packet service version tagging
CN111092921A (en) Data acquisition method, device and storage medium
CN109525590A (en) The transmission method and device of data packet
Vdovin et al. Comparing various approaches to resource allocation in data centers
CN111010459A (en) Method for solving IP address conflict when SLB is used as SNAT
CN110636072B (en) Target domain name scheduling method, device, equipment and storage medium
CN114338670B (en) Edge cloud platform and network-connected traffic three-level cloud control platform with same

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210519

Address after: 1403a, building B, innovation building, 198 Daxin Road, majialong community, Nantou street, Nanshan District, Shenzhen, Guangdong 518000

Patentee after: Shenzhen xiaoxiliu Technology Co.,Ltd.

Address before: 518000 East, 7th floor, Yizhe building, Yuquan Road, Nanshan District, Shenzhen City, Guangdong Province (office only)

Patentee before: SHENZHEN SVI TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220125

Address after: No. 202, block B, Huafeng Baoan Zhigu science and Technology Innovation Park, No. 4, Yintian Road, Yantian community, Xixiang street, Bao'an District, Shenzhen, Guangdong 518000

Patentee after: Shenzhen Chaoyue Electronics Co.,Ltd.

Address before: 1403a, building B, innovation building, 198 Daxin Road, majialong community, Nantou street, Nanshan District, Shenzhen, Guangdong 518000

Patentee before: Shenzhen xiaoxiliu Technology Co.,Ltd.