Movatterモバイル変換


[0]ホーム

URL:


CN106790595A - A kind of Docker containers active load balancer and method - Google Patents

A kind of Docker containers active load balancer and method
Download PDF

Info

Publication number
CN106790595A
CN106790595ACN201611241839.XACN201611241839ACN106790595ACN 106790595 ACN106790595 ACN 106790595ACN 201611241839 ACN201611241839 ACN 201611241839ACN 106790595 ACN106790595 ACN 106790595A
Authority
CN
China
Prior art keywords
application
docker
module
distributed coordination
pending 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.)
Granted
Application number
CN201611241839.XA
Other languages
Chinese (zh)
Other versions
CN106790595B (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.)
Shanghai Ideal Information Industry Group Co Ltd
Original Assignee
Shanghai Ideal Information Industry Group 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 Shanghai Ideal Information Industry Group Co LtdfiledCriticalShanghai Ideal Information Industry Group Co Ltd
Priority to CN201611241839.XApriorityCriticalpatent/CN106790595B/en
Publication of CN106790595ApublicationCriticalpatent/CN106790595A/en
Application grantedgrantedCritical
Publication of CN106790595BpublicationCriticalpatent/CN106790595B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of Docker containers active load balancer and method, the method comprises the following steps:Pending application file is received, pending application details are preset;The pending application file is converted into Docker mirror images;Perform in the Docker mirror images and order using starting;Registration request is sent, the application is registered to distributed coordination server;The log-on message is obtained from distributed coordination server, obtain the delta data of application example correspondence container, and parsed the data, by configuration template, more new configuration file is to Universal load balanced device, the present invention is realized and is actively discovered and login mechanism in real time, and uses general load equalizer, for Docker container clusters provide service.

Description

A kind of Docker containers active load balancer and method
Technical field
The present invention is on Internet technical field, more particularly to a kind of Docker containers active load balancer and sideMethod.
Background technology
Docker is an application container engine increased income, and single example operation Docker containers cannot meet production needs,Typically service can be externally provided using the pattern of Docker clusters in industry, it is more at present to be using increase income container cluster managementSystem such as kubernetes, mesos, swarm simultaneously combine basic network solution such as flannel, weave, pipework etc.,Docker cluster Problems are solved, but the load balancing of Docker container clusters fails have perfect solution always.
Docker containers find that target is that the service that would fit snugly within inside Docker containers shows, and reduce or eliminateCommunicate barrier between Docker containers.
Docker container cluster load balance purposes are to find to unify the container of normal operation to lead to by Docker containersOverload balanced device is forwarded, container transparent unaware of the caller to load equalizer rear end.A kind of Docker containers are actively negativeCarry balanced purpose be when Docker containers start successfully the information such as Apply Names, Docker containers IP address, application port oneselfIt is dynamic to push, and Docker container instances are mounted to load equalizer, so that the Docker container instances provide service energyPower, whole process does not need manual intervention.Caller is comprehended rear end Docker container operation details and is included can completely dispense withDocker containers number, ip and port, also include whether to be run under physical machine or virtual machine, as long as there is a normal fortuneCapable container, just can externally provide service, fully transparent to user.Simultaneously for abnormal service, whole system will in timeResponse is processed, and abnormal Docker examples are picked out from load equalizer list.
At present, a kind of load balancing scheme such as kubernetes of common Docker clusters is provided with the negative of Three modelsCarry balanced:1st, using the mode of host IP+PORT, this mode needs for the IP of host to be exposed to caller, particularlyAfter host delays machine, in addition it is also necessary to which caller is switched to other hosts;2nd, using the primary Service for carrying mode and withPrivate IP externally provide service, and this mode needs the caller must also in kubernetes cluster internals, otherwisePrivateIP cannot be accessed;3rd, using special load balancing under the IaaS environment such as GCE, AWS, this mode most enterprises are allDo not possess, it is all these can not all meet production to High Availabitity the need for.
It should be evident that tending to rely on cluster management system based on common Docker cluster load balance schemes, collectThe change or upgrading of cluster management system can cause former methodical failure;Or to there is multiple delay performance relatively low, not only monitorThe information such as startup, the stopping change of Docker containers, also refresh load equalizer by synchronizing information;Or due to using special negativeBalanced device is carried, it is higher to study, maintenance cost requirement, it is not suitable for technology precipitation, increase entreprise cost;Or when service operation is variousIf Docker environment, vmware, kvm or independent operating are in host environment under environment, it is impossible to the need for meeting isomerous environment.
The content of the invention
To overcome the shortcomings of that above-mentioned prior art is present, the purpose of the present invention is to provide a kind of Docker containers actively to bearBalancer and method are carried, to realize being actively discovered and login mechanism in real time, and general load equalizer is used, is DockerContainer cluster provides service, it is ensured that to application without intrusion, facilitate system to carry out containerization transformation.
It is that, up to above and other purpose, the present invention proposes a kind of Docker containers active load balancer, including:
Mirror image modular converter, for providing the Docker foundation images comprising application manager and being converted to pending applicationDocker mirror images;
Application manager, for starting the Docker mirror images, and according to default application message, parses and performs the pending applicationStartup order, and send registration request, the application is registered to distributed coordination server;
Distributed coordination server, for disposing distributed coordination service;
Detector, for monitoring the application situation of change on the distributed coordination server, will send out using situation of changeDeliver to load balancing proxy server;
Load balancing proxy server, by the application situation of change is according to the configuration data of configuration template conversion certain format and holdsOK, and it is configured to Universal load balanced device;
Universal load balanced device, for disposing Universal load balancing service.
Further, the mirror image modular converter includes:
Foundation image, the Docker that the basic environment needed for depositing the application manager and pending application in advance buildsMirror image, and using this mirror image as the foundation image of pending application, and it is stored in mirror image warehouse;
Order receiver module, the identification information for receiving the pending application;
Mirror image builds module, builds pending application mirror image by Dockerfile, and be uploaded to mirror image warehouse.
Further, the application manager includes:
Parameter analysis of electrochemical module, for parsing default application message;
Command execution module, order is performed for receiving the application that the Parameter analysis of electrochemical module is parsed, and is performed this and is ordered and obtainCommand execution results, if if implementing result is normal, calling and applying Registering modules;
Using Registering modules, for the state letter for obtaining the Parameter analysis of electrochemical module data for parsing and obtaining pending applicationCease, and interim conversation is set up with the distributed coordination server and link, the status details of the application are registered to distribution associationAdjust server;
Health examination module, for the health condition according to default health examination order poll application, and result is notified to be somebody's turn to doUsing Registering modules.
Further, when the Docker containers are registered to the distributed coordination server by this using Registering modules,Judge the distributed coordination server directory whether there is this using corresponding catalogue, if nothing, in distributed coordination server woundBuild new catalogue and simultaneously in one new node of the directory creating.
Further, the detector includes:
Module is monitored, for monitoring the application situation of change on the distributed coordination server, if using correspondingDocker container instance states change, and trigger the first sending module;
First sending module, for that will be sent to load balancing proxy server using situation of change.
Further, the load balancing proxy server includes:
First receiver module, is attached with first sending module and maintains heartbeat, first receiver module receive this firstThe instruction that sending module is sent, and call data resolution module;
Data resolution module, the format analysis instruction according to configuration template module now, and incoming second order performs mouldBlock;
Configuration template module, its masterplate data are different according to the load equalizer that load balancing proxy server is acted on behalf of;
Second command execution module, writes data into the Universal load equalizer configuration file directory, performs the Universal load equalThe reset command of weighing apparatus.
To reach above-mentioned purpose, the present invention also provides a kind of Docker containers active load equalization methods, including following stepSuddenly:
Step one, receives pending application file, presets pending application details;
Step 2, Docker mirror images are converted to by the pending application file;
Step 3, orders in the execution Docker mirror images using startup;
Step 4, sends registration request, and the application is registered into distributed coordination server;
Step 5, obtains the log-on message from distributed coordination server, obtains the change number of application example correspondence containerAccording to, and the data are parsed, by configuration template, more new configuration file to Universal load balanced device.
Further, step 5 is further included:
The directory node in distributed coordination device is applied in monitoring, and the change information of directory node is sent into load balancing agencyDevice;
Change information is synchronized to by Universal load balanced device according to configuration template.
Further, in step 2, the identification information of the pending application file is write according to specificationDockerfile, pending application mirror image is built by pending application foundation mirror image with pending application by Dockerfile.
Further, in step 4, the Docker containers of the pending application are maintained with the distributed coordination serverInterim conversation, when application is abnormal, disconnection immediately is linked with the distributed coordination server, and is automatically exited from.
Compared with prior art, a kind of Docker containers active load balancer of the invention and method, are managed by applicationReason device initiates to connect and carry out to register application container information to distributed coordination server, and real-time to application container health and fitness informationMonitoring, and active synchronization feeds back to distributed coordination server, using detector according to the information master of distributed coordination serverIt is dynamic to update to load equalizer, Docker containers are successfully mounted to load equalizer, make full use of Universal load balanced deviceRipe production and O&M experience, for tradition application Docker containerization transformations, are effectively reduced improvement cost, the present invention byContainer actively initiates to connect and registered to load equalizer, and using mature and stable load equalizer, the process is without pre-First configure equilibrium allocation file and load equalizer need not be restarted, be automatically obtained load balancing, overcome current containerMiddle load-balancing method is difficult in adapt to be used to provide asking for back-end services, dynamic change container cluster in cloud computing systemTopic.
Brief description of the drawings
Fig. 1 is a kind of system architecture diagram of Docker containers active load balancer of first embodiment of the invention;
Fig. 2 is a kind of system architecture diagram of Docker containers active load balancer of second embodiment of the invention;
The step of Fig. 3 is a kind of Docker containers active load equalization methods of third embodiment of the invention flow chart;
A kind of flow chart of Docker containers active load equalization methods that Fig. 4 is provided for the specific embodiment of the invention.
Specific embodiment
Below by way of specific instantiation and embodiments of the present invention are described with reference to the drawings, those skilled in the art canFurther advantage of the invention and effect are understood by content disclosed in the present specification easily.The present invention also can be different by otherInstantiation implemented or applied, the various details in this specification also can based on different viewpoints with application, without departing substantially fromVarious modifications and change are carried out under spirit of the invention.
Fig. 1 is a kind of system architecture diagram of Docker containers active load balancer of first embodiment of the invention.Such asShown in Fig. 1, a kind of Docker containers active load balancer of the invention, including:Mirror image modular converter 101, application manager102nd, distributed coordination server 103, detector 104, load balancing proxy server 105 and Universal load balanced device 106.
Mirror image modular converter 101, for providing the Docker foundation images comprising application manager and by pending applicationBe converted to Docker mirror images.
Specifically, mirror image modular converter 101 is the Docker environment of deployment success, it include foundation image 301,Order receiver module 302 and mirror image build module 303, and application manager has been housed in advance with pending application in the moduleThe Docker mirror images that the basic environment of needs builds, and using this mirror image as pending application foundation image 301, while also depositingIt is placed on mirror image warehouse.Pending application will be stored in mirror image conversion equipment using modes such as ftp, tftp, scp, wget correspondingCatalogue.Order receiver module 302 receives user input by the identification information of pending application, and the mark of the pending application is believedBreath including application name, using starting, cease and desist order, port, using information such as additional information and health examination orders, and parseWith the local Dockerfile masterplates that prestore, new Dockerfile is formed, mirror image is built module 303 and built by DockerfilePending application mirror image, and mirror image warehouse is uploaded to, now this at least includes application manager, pending application using mirror imageAnd corresponding parameter.
Application manager 102, for starting the Docker mirror images, and according to default application message, parses pending answeringStartup order, and the order is performed, and registration request is sent, the application is registered to distributed coordination server.
Specifically, application manager 102 is including Parameter analysis of electrochemical module 311, command execution module 312, using Registering modules313rd, health examination module 314.Wherein Parameter analysis of electrochemical module 311 is responsible for the default application message of parsing, the default application letterBreath includes:Application name, using starting, cease and desist order, port, using additional information etc., will include that application be opened using order is performedIt is dynamic to order, command execution module 312 is passed to using ceasing and desisting order;Command execution module 312, for receiving Parameter analysis of electrochemical module311 applications for parsing perform order, perform this and order and obtain command execution results, if if implementing result is normal, callingUsing Registering modules 313;Got parms the data and obtain pending that parsing module 311 parses using Registering modules 313The status information of application, and set up interim conversation with distributed coordination server 103 and link, by the status details of the application:HoldDevice status information, container IP, port, application name, distributed coordination server 103 is registered to using additional information, when find shouldWith the abnormal phenomenons such as machine of such as delaying, automatic disconnection links with distributed coordination server 103.Wherein, when the Docker shouldDuring with starting, the Parameter analysis of electrochemical module 312 parses the presupposed information of acted on behalf of application, call instruction performing module 312Perform application and start order, and the distributed coordination server 103 is notified by application Registering modules 313, in the file meshRecord is lower to be created and the corresponding file of the pending application.After a Docker container for performing application starts successfully,Using Registering modules 313 will using application message be registered to distributed coordination server 103 correspondence application under file asApplication node example.
In detail, when Docker containers are registered to distributed coordination server 103 by application Registering modules 313, sentenceThe disconnected catalogue of distributed coordination server 103 whether there is this using corresponding catalogue, if nothing, in distributed coordination server 103Create new catalogue and simultaneously in one new node of the directory creating, the IP and application port of container are the name of the nodeClaim.When the application has new Docker examples to produce, new Docker examples will be all registered under the catalogue.When the application certainIndividual Docker examples are delayed machine, then application Registering modules 313 disconnect the connection with distributed coordination server 103, same time-division automaticallyCloth coordination service device 103 deletes the log-on message of the Docker examples.
Health examination module 314 is main and according to the health condition of default health examination order poll application, and will knotFruit notifies to apply Registering modules 313.Health examination module 314 mainly checks for the container that fails, and failure container can beFinger can not provide the container of normal service.For example, when the detection container of health examination module 314 there occurs abnormal such as container and healthCheck module 314 can not healthy heartbeat, container process phenomenon, the i.e. container such as surprisingly stop service can not being provided, now can be withThink that the container is failure container.Optionally, for any one container, the container and health examination module 314 can be monitoredCommunication connection whether disconnect, if health examination module 314 monitor the container for failure container.Health examination module 314 is led toKnow using Registering modules 313 will automatically with the break link of distributed coordination server 103 so that distributed coordination server103 delete the failure container node.
Distributed coordination server 103, for disposing distributed coordination service.In the specific embodiment of the invention, distributionFormula coordination service device 103 can have one or more, when there is multiple distributed coordination servers 103, the plurality of distributed associationAdjusting server 103 is used to form distributed coordination service group, and can be selected from the plurality of distributed coordination server 103One leader (leader), wherein, distributed coordination server 103 is used to dispose distributed coordination service.In the present embodimentZookeeper is used as distributed coordination server for deployment, and zookeeper is a distributed coordination server increased income.It isOne software that Consistency service is provided for Distributed Application, there is provided function include:Configuring maintenance, domain name service, distributionSynchronous, group service etc..It is specifically intended that when the modification of the data stored in zookeeper directory nodes, child node catalogueChange etc., once change can notify to set the client for monitoring, this function is zookeeper most important for applicationCharacteristic, the function that can be realized by this characteristic includes the centralized management of configuration, cluster management, distributed lock etc..Herein,Main configuring maintenance and distributed synchronization this two functions of having used in zookeeper, wherein, in distributed coordination clothesA file directory is safeguarded in business device 103, is existed and the multiple application corresponding file of difference in this document catalogue.That is,There are multiple files under this document catalogue, each file correspondence one is applied, at least one node under each file,Each node one Docker container instance of correspondence.Such that it is able to manage application by the file and node of zookeeperAnd the Docker examples of application, it is possible to realize to Docker container state change managements, that is, realize to Docker containersIt was found that.
For example, default/apps/catalog is the parent directory of all applications, if using entitled in presupposed informationHelloworld, port is 8080, application one Docker example of correspondence, and container IP is 172.17.0.2, then shouldCatalogue with correspondence zookeeper is /apps/catalog/helloworld, the corresponding zookeeper sections of the Docker examplesPoint is /apps/catalog/helloworld/172.17.0.2:8080, if this application again increase newly a Docker example andDocker containers IP is 172.17.0.3, then this is /apps/catalog/helloworld/ using zookeeper nodal directories172.17.0.2:8080 and/apps/catalog/helloworld/172.17.0.3:8080.If the IP is172.17.0.3 Docker containers are delayed machine, then this is changed into/apps/catalog/helloworld/ using corresponding node172.17.0.2:8080.By means of the file directory and node and application and the corresponding relation of Docker examples of zookeeper,Application one catalogue of correspondence, Docker containers one corresponding relation for directory node of correspondence can be realized.
Detector 104, for corresponding all application file folders in monitoring distributed coordination service device 103.This document is pressed from both sidesFolder Name correspondence Apply Names, unique one file with the entitled Folder Name of application of correspondence of each application.Detector 104 includes monitoring the sending module of module 331 and first, in this specific embodiment, is starting pending applicationAfter Docker examples, the Docker example details can be registered to the distributed coordination server 103, monitor module 331 and examineMeasure and there occurs change using catalogue/apps/catalog, and read using the node details of catalogue/apps/catalog, byFirst sending module 332 sends corresponding instruction notification load balancing proxy server 105 and increases an application example information newly, to generalLoad equalizer 106 updates configuration.Alternatively, when one of Docker examples of pending application stop or machine of delaying, healthCheck that module 314 detects the example and exception occurs, notify that application Registering modules 313 disconnect and distributed coordination server 103Link, distributed coordination server 103 deletes this directory node information, now monitors module 331 and is immediately detected and applies meshRecord/apps/catalog catalogues there occurs change, and notification payload equilibrium proxy server 105 deletes one, to Universal load balanced device106 update configuration.
Load balancing proxy server 105, for by configuration template, more new configuration file to Universal load balanced device 106.
Specifically, load balancing proxy server 105 includes the first receiver module 341, data resolution module 342, configuration templateModule 343, the second command execution module 344.Load balancing proxy server 105 and the deployment 106 of Universal load balanced device are in same clothesBusiness device.First receiver module 341 is attached and maintains heartbeat by Transmission Control Protocol and the first sending module 332, and first receives mouldBlock 341 receives the instruction that the first sending module 332 is sent, and calls data resolution module 342.The basis of data resolution module 342The format analysis of the configuration template module 343 now instructions, masterplate data are according to load balancing generation in configuration template module 343The load equalizer acted on behalf of of reason device 105 is different, and masterplate data are had nothing in common with each other, such as nginx applicable configuration and lvs,Keepalived applicable configuration is different, and data resolution module 342 press masterplate data and will be successfully put into and face after instruction parsesWhen region of memory, call the second command execution module 344.Second command execution module 344 is preset Universal load balanced device 106 and is matched somebody with somebodyPut file path, startup, stopping, reset command and assign the control authority of execution Universal load balanced device 106, when data parse mouldAfter incoming second command execution module 344 of data that block 342 will be parsed, the second command execution module 344 reads above-mentioned interimRegion of memory writes data into the configuration file catalogue of Universal load balanced device 106, and perform Universal load balanced device 106 restarts lifeOrder.
Universal load balanced device 106, for disposing Universal load balancing service.In the present embodiment, Universal load is balancedDevice 106 may be located in independent server, it is also possible in the server cluster being made up of some servers.Such asNginx and lvs are the soft load equalizers increased income, and current industry has accumulated more knowhow, research and development, fortune for enterpriseDimension and learning cost are substantially reduced.Nginx and lvs differences, lvs have when four laminar flow amounts is processed significant performance butHigher to network requirement, nginx is usually used in seven layers of load balancing, relatively low to network environment requirement.Because Universal load is balancedDevice 106 is familiar to the person skilled in the art, be will not be repeated here.
In the present invention, application manager can also operate in non-Docker containers environment with pending application, or holdThe load balancing of application cluster is realized under device environment together.A kind of Docker for being illustrated in figure 2 second embodiment of the invention holdsThe system architecture diagram of device active load device in a balanced way, wherein, application manager 203 pre-sets application message:Application name, shouldWith starting, cease and desist order, port, using additional information etc., after application manager 203 starts, should by the parsing of Parameter analysis of electrochemical moduleWith details, and start it is pending apply 204, after pending application 204 starts successfully, will be using reality by application manager 203The status information of example, host IP, port, application name, distributed coordination server 205 is registered to using additional information.It is differentBe:1st, application example becomes host IP by container IP, and 2, the application example port of same host operation can not be identical,The processing procedure of each module is basically identical with first embodiment afterwards, repeats no more.
The step of Fig. 3 is a kind of Docker containers active load equalization methods of third embodiment of the invention flow chart.Such asShown in Fig. 3, a kind of Docker containers active load equalization methods of the invention comprise the following steps:
Step 301, receives pending application file, presets pending application details.Wherein described pending application details includeUsing start order, cease and desist order, Apply Names, version number, using additional information(TCP/HTTP), and application end messageBreath.
Step 302, Docker mirror images are converted to by the pending application file.Specifically, by pending application fileIdentification information, such as Apply Names, using start order, cease and desist order, port, using additional information and health examination lifeOrder etc. writes Dockerfile according to specification, and pending application foundation mirror image is built with pending application by DockerfilePending application mirror image, i.e. Docker mirror images.
Step 303, orders in the execution Docker mirror images using startup.That is, when pending application has succeededWhen being configured to Docker mirror images, start the mirror image, and according to default application message, parse the startup order of pending application,And perform the order.
Step 304, sends registration request, and the application is registered into distributed coordination server.Taken in the registration requestWith the container IP of application message in the Docker containers, application port information, Apply Names, using additional information etc..In the specific embodiment of the invention, now distributed coordination server creates a catalogue with application name as title, and in the meshRecord is lower to create a node, the wherein entitled container IP of the node and port, such as 172.17.0.2:8080, other information is as answeredStored in the node with additional information.The Docker containers of pending application remain interim with distributed coordination serverSession sessions, when application is abnormal, disconnection immediately is linked with distributed coordination server, and is automatically exited from.Due to pointCloth coordination service uses interim session sessions, the interim conversation once disconnecting, and distributed coordination server is simultaneously deleted at onceExcept all information of the node.
Step 305, obtains the log-on message, the i.e. change of application example correspondence container from distributed coordination serverData, and the data are parsed, by configuration template, more new configuration file to load equalizer.Specifically, step 305Further include:
The directory node in distributed coordination device is applied in step S1, monitoring, and the change information of node is sent into load balancingProxy server.Learnt according to above-mentioned steps S304, it is a catalogue that newly-increased application has succeeded in distributed coordination server registration, mainThe dynamic nodal information read under the catalogue, once having newly-increased Node registry under detecting the catalogue, sends instructions to downstream module i.e.Load balancing proxy server, the instruction carries directory name(That is to say application name), all nodenames under the catalogue(That is to say sectionPoint instance address)And additional information;
Step S2, load equalizer, such as nginx, lvs are synchronized to according to configuration template by change information.According to above-mentioned steps S1Learn, the instruction that load equalizer proxy server receiving step S1 sends is included applies lower all nodal informations, then load balancingProxy server is the parameter for being converted into load equalizer identification according to configuration template relevant parameter, and writes corresponding configuration file,Wherein load balancing proxy server should preset load equalizer configuration file path, startup, stopping, reset command.Have in the present inventionIn body embodiment, the configuration template respectively has difference according to the load equalizer selected.
A kind of flow chart of Docker containers active load equalization methods that Fig. 4 is provided for the specific embodiment of the invention, such asShown in Fig. 4, the method can include:
Step S401, presets application message, is a new mirror image by pending application build.Specifically, by pending applicationIdentification information:Application name, using starting, cease and desist order, port, using additional information and health examination order according to specificationWrite-in Dockerfile, pending application mirror is built by pending application foundation mirror image with pending application by DockerfilePicture.
Step S402, disposes distributed coordination server, such as zookeeper in distributed coordination server.It is distributedCoordination service device can be single node or cluster mode.Especially, when such as catalogue, son once occurs in distributed coordination serverNode, data etc. change, and can monitor client with proactive notification, can realize occurring when application example node by this characteristicChange can immediately notify that downstream module is processed in time.
Step S403, described in above-mentioned steps S401, pending application is successfully configured to Docker mirror images, starts the mirrorPicture, and according to default application message, the startup order of pending application is parsed, and the order is performed, then answered according to defaultInspected periodically with health examination sentence and apply health degree.
Step S404, after pending application success starts, the status details of the application is included:Container state information,Container IP, port, application name, distributed coordination service that above-mentioned steps S402 deployment success is registered to using additional informationDevice, now distributed coordination server creates a catalogue with application name as title, and a node is created under the catalogue, itsIn the node entitled container IP and port, such as 172.17.0.2:8080, other information such as application additional information storage is at thisIn node.The Docker containers of pending application maintain interim session sessions with distributed coordination server, when application is differentChang Shi, immediately disconnection is linked with distributed coordination server, and is automatically exited from.Due to using interim with distributed coordination serviceSession sessions, once disconnecting, distributed coordination server simultaneously deletes all information of the node to the interim conversation at once.
Step S405, in the deployment load balancing service of Universal load balanced device such as nginx, lvs.Load equalizer and eachNode, each node container network ensure interconnect, the network plan based on container intercommunication can using port mapping, directlyPath or the mode of overlay network, the network plan is familiar to the person skilled in the art, be will not be repeated here.
The directory node in distributed coordination device is applied in step S406, monitoring, and the change information of node is sent to negativeCarry balanced proxy server.Learnt according to above-mentioned steps S404, it is one that newly-increased application has succeeded in distributed coordination server registrationCatalogue, actively reads the nodal information under the catalogue, once having newly-increased Node registry under detecting the catalogue, sends instructions to downstreamModule is load balancing proxy server, and the instruction carries directory name(That is to say application name), all nodenames under the catalogue(It is node instance address)And additional information.
Step S407, load equalizer such as nginx, lvs are synchronized to according to configuration template by change information.According to above-mentioned stepRapid S406 learns that the instruction that load equalizer proxy server receiving step S406 sends is included applies lower all nodal informations, thenLoad balancing proxy server is to be converted into the parameter that load equalizer is recognized according to configuration template relevant parameter, and write-in is matched somebody with somebody accordinglyPut file.Wherein load balancing proxy server should preset load equalizer configuration file path, startup, stopping, reset command.
The above method makes to apply the ruuning situation moment under Docker environment to feed back on SiteServer LBS, by adoptingWith the mechanism of general load equalizer and Active Registration, so as to by application call person from changeable, complicated Docker containers groundLocation is converted to and accesses fixed load equalizer address, whole-process automatic discovery, automatic registration, to caller unaware, Er QieyingCan also apply equally applicable under host or virtual machine environment with pending simultaneously with manager.
Relative and above-described embodiment, further, in the present embodiment in S401 in the device in advance by Program ManagerWith pending application need basic environment be configured to new Docker mirror images as pending application foundation image step itIt is preceding also to include:The basic environment that pending application needs is obtained from mirror image warehouse.Specifically, mirror image warehouse is used for memory imageFile, including basic environment, the foundation image of pending application, the pending application mirror image that pending application needs are new to buildMirror image is unifiedly stored to mirror image warehouse.In the present embodiment, mirror image conversion equipment, each node are connected with the communication of mirror image Warehouse Establishing.
In sum, a kind of Docker containers active load balancer of the invention and method, using application manager masterIt is dynamic to register container change information, while interim conversation mechanism is used using detector and distributed coordination server, without logicalHeartbeat mode is crossed in real time to monitor distributed coordination server, once container finds change, by using load balancing generationThe change information of the container is write Universal load balanced device by reason device, application containerization transformation is present invention can be suitably applied to, to existingHave using without constraint and limitation;Container situation of change can in time be monitored without using heartbeat mechanism, so as to avoid heartbeatThe timeout issue for causing;From the soft load equalizer of universal industrialization, to study, relatively low using the cost requirement of, O&M, saveThe research and development of enterprise and O&M cost, also illustrate under non-container environment in the embodiment of the present invention, will be treated by application managerThe situation of change for performing application is synchronized on load equalizer, and satisfaction is applied the need for isomerous environment is run.
The above-described embodiments merely illustrate the principles and effects of the present invention, not for the limitation present invention.AnyArt personnel can be modified above-described embodiment and are changed under without prejudice to spirit and scope of the invention.Therefore,The scope of the present invention, should be as listed by claims.

Claims (10)

CN201611241839.XA2016-12-292016-12-29Docker container active load balancing device and methodActiveCN106790595B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201611241839.XACN106790595B (en)2016-12-292016-12-29Docker container active load balancing device and method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201611241839.XACN106790595B (en)2016-12-292016-12-29Docker container active load balancing device and method

Publications (2)

Publication NumberPublication Date
CN106790595Atrue CN106790595A (en)2017-05-31
CN106790595B CN106790595B (en)2020-12-22

Family

ID=58923590

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201611241839.XAActiveCN106790595B (en)2016-12-292016-12-29Docker container active load balancing device and method

Country Status (1)

CountryLink
CN (1)CN106790595B (en)

Cited By (37)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107248986A (en)*2017-06-082017-10-13医惠科技有限公司A kind of service tray method
CN107294785A (en)*2017-07-112017-10-24上海帝联信息科技股份有限公司The automatic deployment method and device, computer-readable recording medium of CDN node service
CN107360018A (en)*2017-06-052017-11-17小草数语(北京)科技有限公司Config update method and device
CN107635002A (en)*2017-09-212018-01-26浪潮软件股份有限公司 A containerized application access method and device
CN107766052A (en)*2017-09-182018-03-06网宿科技股份有限公司A kind of method and apparatus for building mirror image
CN107885547A (en)*2017-11-082018-04-06江苏国泰新点软件有限公司A kind of collocation method of application program, device, configuration equipment and storage medium
CN108021428A (en)*2017-12-052018-05-11华迪计算机集团有限公司A kind of method and system that network target range is realized based on Docker
CN108446326A (en)*2018-02-112018-08-24江苏微锐超算科技有限公司A kind of isomeric data management method and system based on container
CN108551488A (en)*2018-05-032018-09-18山东汇贸电子口岸有限公司Distributed container cluster load balancing method based on domestic CPU and OS
CN108616599A (en)*2018-05-112018-10-02北京辰森世纪科技股份有限公司Application service registration, newer method and device
CN108874549A (en)*2018-07-192018-11-23北京百度网讯科技有限公司resource multiplexing method, device, terminal and computer readable storage medium
CN108920153A (en)*2018-05-292018-11-30华南理工大学A kind of Docker container dynamic dispatching method based on load estimation
CN109120481A (en)*2018-09-272019-01-01上海新炬网络信息技术股份有限公司Method based on Zabbix open source monitor component DCOS container and bosom part
CN109309693A (en)*2017-07-262019-02-05财付通支付科技有限公司Services system, dispositions method and device, equipment and storage medium based on docker
CN109343963A (en)*2018-10-302019-02-15杭州数梦工场科技有限公司A kind of the application access method, apparatus and relevant device of container cluster
CN109451065A (en)*2018-12-262019-03-08中电福富信息科技有限公司A kind of soft load balancing shunts automated system and its operation method
CN110087107A (en)*2019-04-252019-08-02视联动力信息技术股份有限公司A kind of method and view networked system of raising system self-adaption ability
CN110134455A (en)*2019-04-122019-08-16平安医疗健康管理股份有限公司 An application management system and method
CN110224860A (en)*2019-05-172019-09-10平安科技(深圳)有限公司Load balancing application creation method, device, computer equipment and storage medium
CN110569056A (en)*2019-09-112019-12-13北京奇艺世纪科技有限公司Method and device for updating rule service information
CN110618821A (en)*2018-06-192019-12-27普天信息技术有限公司Container cluster system based on Docker and rapid building method
CN110750592A (en)*2019-09-062020-02-04中国平安财产保险股份有限公司Data synchronization method, device and terminal equipment
CN110764875A (en)*2019-10-252020-02-07北京威晟艾德尔科技有限公司Docker container creating method based on competition mechanism
CN110830289A (en)*2019-10-212020-02-21华中科技大学Container abnormity monitoring method and monitoring system
CN110830574A (en)*2019-11-052020-02-21浪潮云信息技术有限公司Method for realizing intranet load balance based on docker container
CN110912953A (en)*2018-09-172020-03-24深圳市优必选科技有限公司 A file storage system and method
CN111163122A (en)*2019-11-212020-05-15江苏艾佳家居用品有限公司TCP configuration method based on Nginx self-research extension module and for automatically pulling service registration center
CN111680288A (en)*2020-06-102020-09-18深圳前海微众银行股份有限公司 Container command execution method, device, device and storage medium
CN112099915A (en)*2020-09-072020-12-18紫光云(南京)数字技术有限公司Soft load balancing dynamic issuing configuration method and system
CN112527319A (en)*2020-12-162021-03-19浙江大学德清先进技术与产业研究院Management method of Docker-based remote sensing intelligent processing algorithm
CN112764825A (en)*2020-12-302021-05-07望海康信(北京)科技股份公司Service integration system, corresponding device and storage medium
CN113127435A (en)*2021-03-302021-07-16杭州当虹科技股份有限公司Intelligent synchronization method and system for files of main and standby systems
CN113127145A (en)*2020-01-152021-07-16中移(苏州)软件技术有限公司Information processing method, device and storage medium
CN113778613A (en)*2021-07-152021-12-10上海浦东发展银行股份有限公司Unified management method for multi-data center double-stack container cloud platform
CN114003368A (en)*2020-07-272022-02-01北京金山云网络技术有限公司Load balancing method and device
CN114640633A (en)*2022-03-292022-06-17京东科技信息技术有限公司Load balancer, implementation method thereof, load balancing method and gateway system
CN115190015A (en)*2022-07-122022-10-14中国工商银行股份有限公司Soft load system configuration method and device, computer equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140149489A1 (en)*2012-11-262014-05-29Facebook. Inc.On-demand session upgrade in a coordination service
CN104503882A (en)*2014-12-252015-04-08北京京东尚科信息技术有限公司Container management method and device
US20150256481A1 (en)*2014-03-062015-09-10Jisto Inc.Elastic Compute Cloud Based On Underutilized Server Resources Using A Distributed Container System
CN105187499A (en)*2015-08-072015-12-23北京思特奇信息技术股份有限公司Distributed scheduling method and system based on zookeeper biplanar data architecture
CN105376303A (en)*2015-10-232016-03-02深圳前海达闼云端智能科技有限公司Docker implementation system and communication method thereof
CN105389243A (en)*2015-10-262016-03-09华为技术有限公司Container monitoring method and apparatus
CN105610972A (en)*2016-02-012016-05-25中博信息技术研究院有限公司Clustered task dispatching system
CN105824614A (en)*2015-12-152016-08-03广东亿迅科技有限公司Building method and device for distributed development environment based on Docker
CN105979009A (en)*2016-07-062016-09-28乾云众创(北京)信息科技研究院有限公司Method for automatically balancing increased load of cloud application container

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140149489A1 (en)*2012-11-262014-05-29Facebook. Inc.On-demand session upgrade in a coordination service
US20150256481A1 (en)*2014-03-062015-09-10Jisto Inc.Elastic Compute Cloud Based On Underutilized Server Resources Using A Distributed Container System
CN104503882A (en)*2014-12-252015-04-08北京京东尚科信息技术有限公司Container management method and device
CN105187499A (en)*2015-08-072015-12-23北京思特奇信息技术股份有限公司Distributed scheduling method and system based on zookeeper biplanar data architecture
CN105376303A (en)*2015-10-232016-03-02深圳前海达闼云端智能科技有限公司Docker implementation system and communication method thereof
CN105389243A (en)*2015-10-262016-03-09华为技术有限公司Container monitoring method and apparatus
CN105824614A (en)*2015-12-152016-08-03广东亿迅科技有限公司Building method and device for distributed development environment based on Docker
CN105610972A (en)*2016-02-012016-05-25中博信息技术研究院有限公司Clustered task dispatching system
CN105979009A (en)*2016-07-062016-09-28乾云众创(北京)信息科技研究院有限公司Method for automatically balancing increased load of cloud application container

Cited By (53)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107360018A (en)*2017-06-052017-11-17小草数语(北京)科技有限公司Config update method and device
CN107248986A (en)*2017-06-082017-10-13医惠科技有限公司A kind of service tray method
CN107294785A (en)*2017-07-112017-10-24上海帝联信息科技股份有限公司The automatic deployment method and device, computer-readable recording medium of CDN node service
CN107294785B (en)*2017-07-112020-07-28上海帝联信息科技股份有限公司Automatic deployment method and device for CDN node service and computer readable storage medium
CN109309693A (en)*2017-07-262019-02-05财付通支付科技有限公司Services system, dispositions method and device, equipment and storage medium based on docker
CN109309693B (en)*2017-07-262022-04-29财付通支付科技有限公司Multi-service system based on docker, deployment method, device, equipment and storage medium
CN107766052A (en)*2017-09-182018-03-06网宿科技股份有限公司A kind of method and apparatus for building mirror image
CN107766052B (en)*2017-09-182020-09-25网宿科技股份有限公司 A method and apparatus for building a container image
CN107635002A (en)*2017-09-212018-01-26浪潮软件股份有限公司 A containerized application access method and device
CN107885547A (en)*2017-11-082018-04-06江苏国泰新点软件有限公司A kind of collocation method of application program, device, configuration equipment and storage medium
CN108021428A (en)*2017-12-052018-05-11华迪计算机集团有限公司A kind of method and system that network target range is realized based on Docker
CN108446326A (en)*2018-02-112018-08-24江苏微锐超算科技有限公司A kind of isomeric data management method and system based on container
CN108446326B (en)*2018-02-112019-01-29江苏微锐超算科技有限公司A kind of isomeric data management method and system based on container
CN108551488A (en)*2018-05-032018-09-18山东汇贸电子口岸有限公司Distributed container cluster load balancing method based on domestic CPU and OS
CN108616599B (en)*2018-05-112021-10-29北京辰森世纪科技股份有限公司Method and device for registering and updating application service
CN108616599A (en)*2018-05-112018-10-02北京辰森世纪科技股份有限公司Application service registration, newer method and device
CN108920153B (en)*2018-05-292022-04-22华南理工大学 A Dynamic Scheduling Method for Docker Containers Based on Load Prediction
CN108920153A (en)*2018-05-292018-11-30华南理工大学A kind of Docker container dynamic dispatching method based on load estimation
CN110618821A (en)*2018-06-192019-12-27普天信息技术有限公司Container cluster system based on Docker and rapid building method
CN108874549A (en)*2018-07-192018-11-23北京百度网讯科技有限公司resource multiplexing method, device, terminal and computer readable storage medium
CN110912953A (en)*2018-09-172020-03-24深圳市优必选科技有限公司 A file storage system and method
CN109120481A (en)*2018-09-272019-01-01上海新炬网络信息技术股份有限公司Method based on Zabbix open source monitor component DCOS container and bosom part
CN109120481B (en)*2018-09-272021-06-04上海新炬网络信息技术股份有限公司Method for monitoring DCOS container and internal middleware based on Zabbix open source component
CN109343963B (en)*2018-10-302021-12-07杭州数梦工场科技有限公司Application access method and device for container cluster and related equipment
CN109343963A (en)*2018-10-302019-02-15杭州数梦工场科技有限公司A kind of the application access method, apparatus and relevant device of container cluster
CN109451065A (en)*2018-12-262019-03-08中电福富信息科技有限公司A kind of soft load balancing shunts automated system and its operation method
CN110134455A (en)*2019-04-122019-08-16平安医疗健康管理股份有限公司 An application management system and method
CN110087107A (en)*2019-04-252019-08-02视联动力信息技术股份有限公司A kind of method and view networked system of raising system self-adaption ability
CN110224860A (en)*2019-05-172019-09-10平安科技(深圳)有限公司Load balancing application creation method, device, computer equipment and storage medium
CN110750592A (en)*2019-09-062020-02-04中国平安财产保险股份有限公司Data synchronization method, device and terminal equipment
CN110750592B (en)*2019-09-062023-10-20中国平安财产保险股份有限公司Data synchronization method, device and terminal equipment
CN110569056A (en)*2019-09-112019-12-13北京奇艺世纪科技有限公司Method and device for updating rule service information
CN110830289A (en)*2019-10-212020-02-21华中科技大学Container abnormity monitoring method and monitoring system
CN110830289B (en)*2019-10-212021-06-11华中科技大学Container abnormity monitoring method and monitoring system
CN110764875A (en)*2019-10-252020-02-07北京威晟艾德尔科技有限公司Docker container creating method based on competition mechanism
CN110830574A (en)*2019-11-052020-02-21浪潮云信息技术有限公司Method for realizing intranet load balance based on docker container
CN111163122A (en)*2019-11-212020-05-15江苏艾佳家居用品有限公司TCP configuration method based on Nginx self-research extension module and for automatically pulling service registration center
CN113127145B (en)*2020-01-152022-12-13中移(苏州)软件技术有限公司 Information processing method, device and storage medium
CN113127145A (en)*2020-01-152021-07-16中移(苏州)软件技术有限公司Information processing method, device and storage medium
CN111680288A (en)*2020-06-102020-09-18深圳前海微众银行股份有限公司 Container command execution method, device, device and storage medium
CN114003368A (en)*2020-07-272022-02-01北京金山云网络技术有限公司Load balancing method and device
CN112099915A (en)*2020-09-072020-12-18紫光云(南京)数字技术有限公司Soft load balancing dynamic issuing configuration method and system
CN112527319A (en)*2020-12-162021-03-19浙江大学德清先进技术与产业研究院Management method of Docker-based remote sensing intelligent processing algorithm
CN112764825A (en)*2020-12-302021-05-07望海康信(北京)科技股份公司Service integration system, corresponding device and storage medium
CN112764825B (en)*2020-12-302023-12-29望海康信(北京)科技股份公司Service integration system, corresponding device and storage medium
CN113127435A (en)*2021-03-302021-07-16杭州当虹科技股份有限公司Intelligent synchronization method and system for files of main and standby systems
CN113778613A (en)*2021-07-152021-12-10上海浦东发展银行股份有限公司Unified management method for multi-data center double-stack container cloud platform
CN113778613B (en)*2021-07-152024-04-26上海浦东发展银行股份有限公司Unified management method for dual-stack container cloud platform of multiple data centers
CN114640633A (en)*2022-03-292022-06-17京东科技信息技术有限公司Load balancer, implementation method thereof, load balancing method and gateway system
WO2023184925A1 (en)*2022-03-292023-10-05京东科技信息技术有限公司Load balancer and implementation method therefor, load balancing method, and gateway system
CN114640633B (en)*2022-03-292024-04-05京东科技信息技术有限公司Load balancer, realization method thereof, load balancing method and gateway system
CN115190015A (en)*2022-07-122022-10-14中国工商银行股份有限公司Soft load system configuration method and device, computer equipment and storage medium
CN115190015B (en)*2022-07-122025-05-06中国工商银行股份有限公司 Soft load system configuration method, device, computer equipment and storage medium

Also Published As

Publication numberPublication date
CN106790595B (en)2020-12-22

Similar Documents

PublicationPublication DateTitle
CN106790595A (en)A kind of Docker containers active load balancer and method
US11706102B2 (en)Dynamically deployable self configuring distributed network management system
US11429369B2 (en)Distributed upgrade in virtualized computing environments
CN100479456C (en)Method and system for remote dynamic configuration of web servers to facilitate required capabilities
Lee et al.High-performance software load balancer for cloud-native architecture
JP4616159B2 (en) Cluster system, load balancer, node transfer method, and node transfer program
CN109274707A (en)A kind of load dispatching method and device
GB2407887A (en)Automatically modifying fail-over configuration of back-up devices
CN108551488A (en)Distributed container cluster load balancing method based on domestic CPU and OS
CN112134866A (en)Service access control method, device, system and computer readable storage medium
CN106790059A (en)Intelligent television Launcher cloud systems service calling method and system
CN107707644A (en)Processing method, device, storage medium, processor and the terminal of request message
CN112698838B (en)Multi-cloud container deployment system and container deployment method thereof
US11792287B2 (en)Broker cell for distributed message system
CN113949631B (en) Client disaster recovery processing method, system and electronic equipment
US9804907B2 (en)Remote procedure call for a distributed system
CN116633993B (en)Cross-network micro-service calling method, device, equipment and storage medium
US12120203B2 (en)UDP message distribution method, UDP message distribution apparatus, electronic device and computer readable storage medium
CN107395766A (en)Decentralization communication system and implementation method based on HazelCast
CN117596248A (en) A traffic switching method, device, electronic equipment, chip and medium across availability zones
CN115242791B (en) Service platform access method, device, equipment and storage medium
CN114650214B (en)Disaster recovery switching method and device, computer equipment and storage medium
EP1130873A2 (en)A method of setting up data communication with a communication means and furthermore program modules and means therefor
CN115766687B (en)Home gateway ipv6 file system and interaction method thereof
CN111857761A (en) A method and device for upgrading a container cluster service application

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp