CN109992415A - A kind of container dispatching method and scheduling system - Google Patents

A kind of container dispatching method and scheduling system Download PDF

Info

Publication number
CN109992415A
CN109992415A CN201910198327.7A CN201910198327A CN109992415A CN 109992415 A CN109992415 A CN 109992415A CN 201910198327 A CN201910198327 A CN 201910198327A CN 109992415 A CN109992415 A CN 109992415A
Authority
CN
China
Prior art keywords
container
scheduler task
status information
scheduling system
database
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
CN201910198327.7A
Other languages
Chinese (zh)
Other versions
CN109992415B (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 PPDAI FINANCE INFORMATION SERVICE Co Ltd
Original Assignee
SHANGHAI PPDAI FINANCE INFORMATION SERVICE 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 PPDAI FINANCE INFORMATION SERVICE Co Ltd filed Critical SHANGHAI PPDAI FINANCE INFORMATION SERVICE Co Ltd
Priority to CN201910198327.7A priority Critical patent/CN109992415B/en
Publication of CN109992415A publication Critical patent/CN109992415A/en
Application granted granted Critical
Publication of CN109992415B publication Critical patent/CN109992415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Abstract

The embodiment of the invention provides a kind of container dispatching method and scheduling systems, it is related to technical field of data transmission, this method comprises: the container scheduler task that server cluster is sent according to scheduling system, the state for distributing resource construction container and monitoring of containers, is then sent to scheduling system for the status information of container scheduler task.Scheduling system is when the status information of the container scheduler task for the status information preservation corresponding with database for determining received container scheduler task is inconsistent, the status information of the corresponding container scheduler task saved in more new database.Since scheduling system saves the status information of container scheduler task in the database, rather than it relies on zookeeper and carries out data storage, to improve Information Security, secondly, scheduling system is when the status information of container scheduler task has update, just correspondence updates in the database, rather than the just more new database in receiving status information, is repeated update so as to avoid same status information.

Description

A kind of container dispatching method and scheduling system
Technical field
The present embodiments relate to technical field of data transmission more particularly to a kind of container dispatching method and scheduling systems.
Background technique
Mesos is the open source distributed resource management frame under Apache, it is known as the kernel of distributed system. Before Mesos results from container technique, with the development of technology, Mesos also supports the publication of container technique now.But Mesos only provides the management function of resource, and user oneself realization is given in the scheduling and layout as resource.
The open source container scheduling system realized currently based on mesos technology has marathon and singularity, both The storage of realization relies on zookeeper, and as data storage, there are resource disclosure risks using zookeeper.Secondly, container Scheduling system using mesos provide message synchronization new mechanism task status when, there are same task status be updated it is more Secondary situation, to influence the efficiency of container scheduling.
Summary of the invention
Due to the scheduling of container in the prior art system use zookeeper as data storage there are resource disclosure risk with And in container scheduling system to there is a situation where that same task status is updated multiple, the embodiment of the invention provides a kind of containers Dispatching method and scheduling system.
On the one hand, the embodiment of the invention provides a kind of container dispatching methods, suitable for being provided with the scheduling system of database System, which comprises
The scheduling system receives the status information of the container scheduler task of server set pocket transmission, the server cluster The container scheduler task for being sent according to the scheduling system, the state of distribution resource construction container and monitoring of containers;
The scheduling system is corresponding with the database in the status information for determining the received container scheduler task When the status information of the container scheduler task saved is inconsistent, the corresponding container tune saved in the database is updated The status information of degree task.
Optionally, before the status information of the container scheduler task of the scheduling system reception server set pocket transmission, also Include:
The scheduling system receives the container posting request that user terminal is sent and by the initial shape of the container posting request For state information preservation to the database, the container posting request includes number of containers to be released and corresponding container attribute;
The scheduling system constructs container scheduler task according to the number of containers to be released and corresponding container attribute And the initial state information of the container scheduler task is saved to the database;
The container scheduler task is sent to the server cluster by the scheduling system, so that the server cluster Resource construction is distributed according to the container scheduler task and starts container.
Optionally, the corresponding container scheduler task of each container to be released.
Optionally, the scheduling system constructs container tune according to the number of containers to be released and corresponding container attribute Degree task, comprising:
For each container to be released, the resource need of the container to be released are determined according to the attribute of the container to be released It asks;
The resource that the scheduling system is reported according to the resource requirement and the server cluster of the container to be released Information determines the container scheduler task of the container to be released.
Optionally, further includes:
The scheduling system is according to the state information updatings of the corresponding all container scheduler tasks of the container posting request The status information of container posting request described in the database.
Optionally, the scheduling system is in the status information and the database for determining the received container scheduler task When the status information of the middle corresponding container scheduler task saved is inconsistent, updates and correspond to the described of preservation in the database The status information of container scheduler task, comprising:
The scheduling system is corresponding with the database in the status information for determining the received container scheduler task When the status information of the container scheduler task saved is inconsistent, the status information of the received container scheduler task is protected It deposits into event queue;
The scheduling system obtains the status information of the received container scheduler task from the event queue, updates The status information of the corresponding container scheduler task saved in the database.
On the one hand, the embodiment of the invention provides a kind of scheduling systems, comprising:
Receiving module, the status information of the container scheduler task for receiving server set pocket transmission, the server set The container scheduler task of the group for being sent according to the scheduling system, the shape of distribution resource construction container and monitoring of containers State;
Database, for saving the status information of container scheduler task;
Processing module, for corresponding with the database in the status information for determining the received container scheduler task When the status information of the container scheduler task saved is inconsistent, the corresponding container tune saved in the database is updated The status information of degree task.
It optionally, further include sending module;
The receiving module is also used to:
Before the status information for receiving the container scheduler task of server set pocket transmission, the container hair that user terminal is sent is received Cloth requests and saves the initial state information of the container posting request to the database, and the container posting request includes Number of containers to be released and corresponding container attribute;
The processing module is also used to:
According to the number of containers to be released and corresponding container attribute building container scheduler task and by the container The initial state information of scheduler task is saved to the database;
The sending module is specifically used for:
The container scheduler task is sent to the server cluster, so that the server cluster is according to the container Scheduler task distribution resource construction simultaneously starts container.
Optionally, the corresponding container scheduler task of each container to be released.
Optionally, the processing module is specifically used for:
For each container to be released, the resource need of the container to be released are determined according to the attribute of the container to be released It asks;
Described in the resource information reported according to the resource requirement of the container to be released and the server cluster determines The container scheduler task of container to be released.
Optionally, the processing module is also used to:
According in database described in the state information updating of the corresponding all container scheduler tasks of the container posting request The status information of the container posting request.
Optionally, the processing module is specifically used for:
In the appearance for the status information preservation corresponding with the database for determining the received container scheduler task When the status information of device scheduler task is inconsistent, the status information of the received container scheduler task is saved to event queue In;
The status information that the received container scheduler task is obtained from the event queue, updates in the database The status information of the corresponding container scheduler task saved.
On the one hand, the embodiment of the invention provides a kind of terminal devices, including at least one processing unit and at least one A storage unit, wherein the storage unit is stored with computer program, when described program is executed by the processing unit, So that the processing unit executes the step of container dispatching method.
On the one hand, the embodiment of the invention provides a kind of computer-readable medium, being stored with can be executed by terminal device Computer program, when described program is run on the terminal device, so that the terminal device executes container dispatching method Step.
In the embodiment of the present invention, the container scheduler task that server cluster is sent according to scheduling system distributes resource construction The state of container and monitoring of containers, is then sent to scheduling system for the status information of container scheduler task.Scheduling system is true The status information of the container scheduler task of the status information preservation corresponding with database of fixed received container scheduler task is different When cause, the status information of the corresponding container scheduler task saved in more new database.Since scheduling system is receiving container scheduling The status information of container scheduler task is saved in the database after the status information of task, rather than is relied in Mesos Zookeeper carries out data storage, so that Information Security is improved, secondly, scheduling system is determining received container scheduling times When the status information of the container scheduler task of the status information of business preservation corresponding with database is inconsistent, just more in new database The status information of the corresponding container scheduler task saved, rather than just updated when receiving the status information of container scheduler task Database is repeated update so as to avoid same status information, improves the efficiency of container scheduling.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without any creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is a kind of application scenarios schematic diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of container dispatching method provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of method for constructing container scheduler task provided in an embodiment of the present invention;
Fig. 4 is a kind of flow diagram of container dispatching method provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of scheduling system provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In order to which the purpose of the present invention, technical solution and beneficial effect is more clearly understood, below in conjunction with attached drawing and implementation Example, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used to explain this hair It is bright, it is not intended to limit the present invention.
Container dispatching method in the embodiment of the present invention can be applied to application scenarios as shown in Figure 1, in the applied field It include scheduling system 101, server cluster 102 and user terminal 103 in scape.
It include multiple Scheduling instances in scheduling system 101, Scheduling instances use master-slave mode, and only homophony takes example Container scheduling can be initiated, other Scheduling instances can only receive the container posting request of the transmission of user terminal 103, and user terminal 103 is logical Cross (portal website) interface portal or application programming interface (Application Programming Interface, letter Claim API) submit container scheduling request.When master scheduling example breaks down, master scheduling example is selected from other from Scheduling instances Initiate container scheduling.
Server cluster 102 is made of multiple servers, and for collecting server resource, resource includes central processing unit (Central Processing Unit, abbreviation CPU), memory, disk, port etc..Server in server cluster 102 Using hypotactic mode.Respectively it can periodically report resource information to primary server from server, primary server is by all from clothes The resource information that business device reports is summarized, and the resource information for then periodically summarizing these pushes to scheduling system 101.
Scheduling system 101 initiates container scheduler task to server cluster 102 using the interface of scheduling of resource.Server set Group 102 in primary server by container scheduler task be sent to it is corresponding from server execute, primary server pass through calling state The status information of container scheduler task is periodically sent to scheduling system 101 by more new interface.Scheduling system 101 judges container tune Whether the status information of degree task has altered, if so, saving the status information of container scheduler task into scheduling system 101 Database.
Based on application scenario diagram shown in FIG. 1, the embodiment of the invention provides a kind of process of container dispatching method, the party The process of method can be executed by scheduling system and server cluster interaction, as shown in Figure 2, comprising the following steps:
Step S201, scheduling system receive the status information of the container scheduler task of server set pocket transmission.
Specifically, container scheduler task is constructed by scheduling system and is sent to server cluster, and container scheduler task is used for Instruction building container and monitoring of containers succeeding state.The container scheduling that server cluster is used to be sent according to scheduling system is appointed Business, the state of distribution resource construction container and monitoring of containers.The status information of container scheduler task is numbered by container scheduler task And the state composition of container scheduler task, the status information of container scheduler task can be the starting state information of container, event Hinder status information, timeout mode information, terminate status information etc., server cluster can be Mesos cluster.
Step S202, scheduling system is in the status information preservation corresponding with database for determining received container scheduler task Container scheduler task status information it is inconsistent when, the state letter of the corresponding container scheduler task saved in more new database Breath.
It specifically, include database in scheduling system, which can be relevant database, such as Oracle data Library, MySQL database etc..The database is also possible to non-relational database, such as Memcached database, Redis data Library etc..When the system of scheduling building container scheduler task, the status information of container scheduler task is saved to database.Server Cluster periodically calls state more new interface, and the status information of container scheduler task is sent to scheduling system.Scheduling system receives To the container scheduler task of server set pocket transmission status information when, if the shape with the container scheduler task saved in database State information is inconsistent, then the status information of the container scheduler task saved is corresponded to more in new database.
Since scheduling system protects the status information of container scheduler task after the status information for receiving container scheduler task It deposits in the database, rather than relies on the zookeeper in Mesos and carry out data storage, so that Information Security is improved, It is secondary, container scheduler task of the scheduling system in the status information preservation corresponding with database for determining received container scheduler task Status information it is inconsistent when, just more in new database the corresponding container scheduler task saved status information, rather than connecing Just more new database when receiving the status information of container scheduler task, is repeated update so as to avoid same status information, Improve the efficiency of container scheduling.
Optionally, before the status information for the container scheduler task that scheduling system receives server set pocket transmission, scheduling system System needs to construct container scheduler task and is sent to server cluster, specifically includes following steps, as shown in Figure 3:
Step S301, scheduling system receive the container posting request that user terminal is sent.
Scheduling system saves the initial state information of container posting request to database, and container posting request includes pending The number of containers of cloth and corresponding container attribute, wherein container attribute can be containers size.
Step S302, scheduling system are appointed according to number of containers to be released and the building container scheduling of corresponding container attribute Business.
Optionally, the corresponding container scheduler task of each container to be released, the container scheduler task are based on container category Property building.For example, number of containers to be released is 2, container 1 and container to be released 2 respectively to be released, wherein pending The attribute of cloth container 1 is memory 100M, and the attribute of container 2 to be released is memory 200M, then for container 1 to be released and pending The attribute of cloth container 1 constructs container scheduler task A, constructs container tune for the attribute of container 2 to be released and container to be released 2 Degree task B.After scheduling system constructs container scheduler task, the initial state information of container scheduler task is saved to database.
Container scheduler task is sent to server cluster by step S303, scheduling system.
In a kind of possible embodiment, for each container to be released, system is dispatched according to the category of container to be released Property determine the container scheduler task of container to be released, the resource requirement of container scheduler task and server cluster are periodically reported Resource information is compared.When the resource in server cluster meets the resource requirement of container scheduler task, dispatched for container Resource in task match server cluster, is then sent to server cluster for container scheduler task.
In a kind of possible embodiment, when constructing container scheduler task, for each container to be released, scheduling system System determines the resource requirement of container to be released according to the attribute of container to be released, then according to the resource requirement of container to be released with And the resource information that reports of server cluster determines the container scheduler task of container to be released, then sends container scheduler task To server cluster.
In specific implementation, server cluster monitors the resources idle situation of each server in cluster, then periodically reports money For source information to the system of dispatching, resource includes CPU, memory, disk, port etc..Illustratively, the resource of container A to be released is set Demand is memory 100M, includes server 1 and server 2 in server cluster, and server cluster is by server 1 and server 2 Resource information report to scheduling system, wherein the resource information of server 1 is freememory 500M, and the resource of server 2 is believed Breath is that port 8 is idle.The resource information of server 1 and server 2 that scheduling system is reported according to server cluster and pending The resource requirement of cloth container A determines the scheduling of resource task of container A to be released, which is specially using service 100M memory in device 1 constructs container A to be released.
Step S304, server cluster distribute resource construction according to container scheduler task and start container.
Specifically, including primary server and from server in server cluster, primary server receives what scheduling system was sent Then container scheduler task is sent to and corresponding executes from server by container scheduler task.From server according to container tune Degree task is container allocation resource to be released, then constructs container to be released and starts container, when container successfully starts up, is determined The status information of container scheduler task is starting state information.
Step S305, the status information of server set pocket transmission container scheduler task to the system of dispatching.
Illustratively, after container starts successfully in server cluster, server cluster is by the starting of container scheduler task Status information is sent to scheduling system, and scheduling system opens the initial state information of container scheduler task in database with received Dynamic status information is compared, since the initial state information and reception starting state information of preservation are inconsistent, then by database The initial state information of middle container scheduler task is revised as starting state information.Since scheduling system is initiating container scheduler task Afterwards, the initial state information of container scheduler task is saved in the database, then according to from the received container of server cluster The initial state information of container scheduler task in the state information updating database of scheduler task appoints container scheduling to realize The real-time tracking of business.
Further, when scheduling system receives the container posting request that user terminal is sent, a container posting request may Corresponding multiple containers scheduler task, therefore when the state to container posting request is updated, it can be according to container posting request The status information of container posting request in the state information updating database of corresponding all container scheduler tasks.
In specific implementation, container can all be dispatched and be appointed after handling each container scheduler task by server cluster The status information of business is sent to scheduling system, when the state of the corresponding all container scheduler tasks of a container posting request is When starting state, the initial state information of container posting request is updated to starting state information by scheduling system.
Optionally, scheduling system is in the status information preservation corresponding with database for determining received container scheduler task When the status information of container scheduler task is inconsistent, the status information of received container scheduler task is saved to event queue In, scheduling system obtains the status information of received container scheduler task, corresponding preservation in more new database from event queue Container scheduler task status information.
Specifically, since the status information that server cluster is sent to the container scheduler task of scheduling system may be not have The status information of update, if scheduling system after receiving the status information of container scheduler task of server set pocket transmission, Direct more new database will lead to that data base read-write is excessively frequent when container scheduler task is more, influence the property of database Energy.For this purpose, in the embodiment of the present invention, status information of the scheduling system in the container scheduler task for receiving server set pocket transmission Afterwards, the status information of container scheduler task is stored in heap caching.Then judgement caches the state of container scheduler task in heap Whether the status information of the corresponding container scheduler task saved is consistent in information and date library, if inconsistent, container is dispatched The status information of task is saved into event queue, therefore in more new database, container can be successively obtained from event queue Simultaneously database is written in the status information of scheduler task, multiple situation is updated so as to avoid same task status, simultaneously Avoid loss of data.
Optionally, when the state of container scheduler task is end state, scheduling system recycles the container scheduler task and exists Corresponding IP address in server cluster can be by the IP address of recycling when scheduling system constructs new container scheduler task Container scheduler task is distributed to, to realize the management to IP address.
Embodiment in order to preferably explain the present invention describes the embodiment of the present invention below with reference to specific implement scene and provides A kind of container dispatching method, this method by scheduling system and server cluster interaction execute, wherein server cluster be Mesos Cluster, Mesos cluster use master-slave mode, and scheduling system includes mysql database, as shown in figure 4, this method includes following Step:
Step S401, scheduling system receive the container posting request that user terminal is sent.
Step S402, scheduling system save the initial state information of container posting request to mysql database.
Container posting request includes number of containers to be released and corresponding container attribute.
Step S403, scheduling system construct container scheduler task according to container posting request.
Step S404, scheduling system save the initial state information of container scheduler task to mysql database.
Step S405, Mesos cluster periodically reports resource information to scheduling system.
Specifically, the resource information that Mesos cluster periodically reports is the information of the idling-resource in Mesos cluster, Mesos Cluster includes primary server and from server, and each information that idling-resource is periodically collected from server simultaneously reports to main service The information of the idling-resource summarized is periodically sent to scheduling system by device, primary server.
Step S406, scheduling system is in the idling-resource for determining Mesos cluster and the resource requirement of container scheduler task Timing matches the idling-resource of Mesos cluster for container scheduler task.
Container scheduler task is sent to Mesos cluster by step S407, scheduling system.
Step S408, Mesos cluster constructs according to container scheduler task and starts container.
The status information of container scheduler task is periodically sent to scheduling system by step S409, Mesos cluster.
The status information of received container scheduler task is stored in heap caching by step S410, scheduling system.
Step S411, scheduling system is in the status information and mysql database for determining the container scheduler task in heap caching When the initial state information of middle container scheduler task is inconsistent, by heap cache in container scheduler task status information save to Event queue.
Step S412, scheduling system obtain the state information updating mysql data of container scheduler task from event queue The initial state information of container scheduler task in library.
Specifically, when the state of container scheduler task is starting state, by container scheduler task in mysql database Initial state information is updated to starting state.When the state of container scheduler task is status of fail, and pre-set again When scheduling, scheduling system re-initiates container scheduler task.
Step S413 dispatches system according to the state information updating of the corresponding all container scheduler tasks of container posting request The initial state information of container posting request in mysql database.
Specifically, when the state of the corresponding all container scheduler tasks of container posting request is updated in preset duration When starting state, the original state of container posting request in mysql database is revised as completion status.When container posting request In corresponding all container scheduler tasks, it is not updated in preset duration in the presence of the state of a container scheduler task at least When starting state, the original state of container posting request in mysql database is revised as status of fail.
It should be noted that the status information of container scheduler task is periodically sent to scheduling system by Mesos cluster, therefore after When continuous scheduling system receives the status information of container scheduler task every time, by the status information of received container scheduler task with The status information of the corresponding container scheduler task saved compares in database, if inconsistent, by received container scheduler task Status information save into event queue.Scheduling system obtains the state letter of received container scheduler task from event queue It ceases, the status information of the corresponding container scheduler task saved in more new database.Since scheduling system is receiving container scheduling times The status information of container scheduler task is saved in the database after the status information of business, rather than is relied in Mesos Zookeeper carries out data storage, so that Information Security is improved, secondly, scheduling system is determining received container scheduling times When the status information of the container scheduler task of the status information of business preservation corresponding with database is inconsistent, just more in new database The status information of the corresponding container scheduler task saved, rather than just updated when receiving the status information of container scheduler task Database is repeated update so as to avoid same status information, improves the efficiency of container scheduling.
Based on the same technical idea, the embodiment of the invention provides a kind of scheduling systems, as shown in figure 5, the scheduling system System 500 includes:
Receiving module 501, the status information of the container scheduler task for receiving server set pocket transmission, the server Cluster is used for the container scheduler task sent according to the scheduling system, the shape of distribution resource construction container and monitoring of containers State;
Database 502, for saving the status information of container scheduler task;
Processing module 503, in the status information and the database for determining the received container scheduler task When the status information of the corresponding container scheduler task saved is inconsistent, the corresponding appearance saved in the database is updated The status information of device scheduler task.
It optionally, further include sending module 504;
The receiving module 501 is also used to:
Before the status information for receiving the container scheduler task of server set pocket transmission, the container hair that user terminal is sent is received Cloth requests and saves the initial state information of the container posting request to the database, and the container posting request includes Number of containers to be released and corresponding container attribute;
The processing module 503 is also used to:
According to the number of containers to be released and corresponding container attribute building container scheduler task and by the container The initial state information of scheduler task is saved to the database;
The sending module 504 is specifically used for:
The container scheduler task is sent to the server cluster, so that the server cluster is according to the container Scheduler task distribution resource construction simultaneously starts container.
Optionally, the corresponding container scheduler task of each container to be released.
Optionally, the processing module 503 is specifically used for:
For each container to be released, the resource need of the container to be released are determined according to the attribute of the container to be released It asks;
Described in the resource information reported according to the resource requirement of the container to be released and the server cluster determines The container scheduler task of container to be released.
Optionally, the processing module 503 is also used to:
According in database described in the state information updating of the corresponding all container scheduler tasks of the container posting request The status information of the container posting request.
Optionally, the processing module 503 is specifically used for:
In the appearance for the status information preservation corresponding with the database for determining the received container scheduler task When the status information of device scheduler task is inconsistent, the status information of the received container scheduler task is saved to event queue In;
The status information that the received container scheduler task is obtained from the event queue, updates in the database The status information of the corresponding container scheduler task saved.
Based on the same technical idea, the embodiment of the invention provides a kind of terminal devices, as shown in fig. 6, including at least One processor 601, and the memory 602 connecting at least one processor do not limit processor in the embodiment of the present invention Specific connection medium between 601 and memory 602 is connected as in Fig. 6 by bus between processor 601 and memory 602 Example.Bus can be divided into address bus, data/address bus, control bus etc..
In embodiments of the present invention, memory 602 is stored with the instruction that can be executed by least one processor 601, at least The instruction that one processor 601 is stored by executing memory 602 can execute included in container dispatching method above-mentioned Step.
Wherein, processor 601 is the control centre of terminal device, can use various interfaces and connection terminal device Various pieces, by running or executing the instruction being stored in memory 602 and calling is stored in number in memory 602 According to carry out container scheduling.Optionally, processor 601 may include one or more processing units, and processor 601 can integrate Application processor and modem processor, wherein the main processing operation system of application processor, user interface and application program Deng modem processor mainly handles wireless communication.It is understood that above-mentioned modem processor can not also integrate Into processor 601.In some embodiments, processor 601 and memory 602 can be realized on the same chip, some In embodiment, they can also be realized respectively on independent chip.
Processor 601 can be general processor, such as central processing unit (CPU), digital signal processor, dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array or other can Perhaps transistor logic, discrete hardware components may be implemented or execute present invention implementation for programmed logic device, discrete gate Each method, step and logic diagram disclosed in example.General processor can be microprocessor or any conventional processor Deng.The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware processor and execute completion, Huo Zheyong Hardware and software module combination in processor execute completion.
Memory 602 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey Sequence, non-volatile computer executable program and module.Memory 602 may include the storage medium of at least one type, It such as may include flash memory, hard disk, multimedia card, card-type memory, random access storage device (Random Access Memory, RAM), static random-access memory (Static Random Access Memory, SRAM), may be programmed read-only deposit Reservoir (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), band Electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic storage, disk, CD etc..Memory 602 can be used for carrying or storing have instruction or data The desired program code of structure type and can by any other medium of computer access, but not limited to this.The present invention is real Applying the memory 602 in example can also be circuit or other devices that arbitrarily can be realized store function, for storing program Instruction and/or data.
Based on the same inventive concept, the embodiment of the present invention also provides a kind of computer readable storage medium, the readable storage Media storage has computer instruction, when the computer instruction is run on the terminal device, so that terminal device is executed as aforementioned Container dispatching method the step of.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the present invention Form.It is deposited moreover, the present invention can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of container dispatching method, which is characterized in that suitable for being provided with the scheduling system of database, which comprises
The scheduling system receives the status information of the container scheduler task of server set pocket transmission, and the server cluster is used for According to the container scheduler task that the scheduling system is sent, the state of distribution resource construction container and monitoring of containers;
The scheduling system is in the status information preservation corresponding with the database for determining the received container scheduler task The container scheduler task status information it is inconsistent when, update in the database the corresponding container scheduling saved and appoint The status information of business.
2. the method as described in claim 1, which is characterized in that the scheduling system receives the container tune of server set pocket transmission Before the status information of degree task, further includes:
The scheduling system receives the container posting request that user terminal is sent and believes the original state of the container posting request Breath is saved to the database, and the container posting request includes number of containers to be released and corresponding container attribute;
The scheduling system constructs container scheduler task according to the number of containers to be released and corresponding container attribute and will The initial state information of the container scheduler task is saved to the database;
The container scheduler task is sent to the server cluster by the scheduling system so that the server cluster according to The container scheduler task distributes resource construction and starts container.
3. method according to claim 2, which is characterized in that each corresponding container scheduler task of container to be released.
4. method as claimed in claim 3, which is characterized in that the scheduling system according to the number of containers to be released and Corresponding container attribute constructs container scheduler task, comprising:
For each container to be released, the scheduling system determines the container to be released according to the attribute of the container to be released Resource requirement;
The resource information that the scheduling system is reported according to the resource requirement and the server cluster of the container to be released Determine the container scheduler task of the container to be released.
5. method according to claim 2, which is characterized in that further include:
The scheduling system is according to the state information updating of the corresponding all container scheduler tasks of the container posting request The status information of container posting request described in database.
6. method as claimed in claim 1 to 5, which is characterized in that the scheduling system is determining the received appearance The status information of the container scheduler task of the status information of device scheduler task preservation corresponding with the database is inconsistent When, update the status information of the corresponding container scheduler task saved in the database, comprising:
The scheduling system is in the status information preservation corresponding with the database for determining the received container scheduler task The container scheduler task status information it is inconsistent when, by the status information of the received container scheduler task save to In event queue;
The scheduling system obtains the status information of the received container scheduler task from the event queue, described in update The status information of the corresponding container scheduler task saved in database.
7. a kind of scheduling system characterized by comprising
Receiving module, the status information of the container scheduler task for receiving server set pocket transmission, the server cluster are used In the container scheduler task sent according to the scheduling system, the state of resource construction container and monitoring of containers is distributed;
Database, for saving the status information of container scheduler task;
Processing module, in the status information preservation corresponding with the database for determining the received container scheduler task The container scheduler task status information it is inconsistent when, update in the database the corresponding container scheduling saved and appoint The status information of business.
8. scheduling system as claimed in claim 7, which is characterized in that further include sending module;
The receiving module is also used to:
Before the status information for receiving the container scheduler task of server set pocket transmission, receives the container publication that user terminal is sent and ask It asks and saves the initial state information of the container posting request to the database, the container posting request includes pending The number of containers of cloth and corresponding container attribute;
The processing module is also used to:
According to the number of containers to be released and corresponding container attribute building container scheduler task and the container is dispatched The initial state information of task is saved to the database;
The sending module is specifically used for:
The container scheduler task is sent to the server cluster, so that the server cluster is dispatched according to the container Task distribution resource construction simultaneously starts container.
9. a kind of terminal device, which is characterized in that including at least one processing unit and at least one storage unit, wherein The storage unit is stored with computer program, when described program is executed by the processing unit, so that the processing unit Perform claim requires the step of 1~6 any claim the method.
10. a kind of computer-readable medium, which is characterized in that it is stored with the computer program that can be executed by terminal device, when When described program is run on the terminal device, so that the terminal device perform claim requires the step of 1~6 any the method Suddenly.
CN201910198327.7A 2019-03-15 2019-03-15 Container dispatching method and dispatching system Active CN109992415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910198327.7A CN109992415B (en) 2019-03-15 2019-03-15 Container dispatching method and dispatching system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910198327.7A CN109992415B (en) 2019-03-15 2019-03-15 Container dispatching method and dispatching system

Publications (2)

Publication Number Publication Date
CN109992415A true CN109992415A (en) 2019-07-09
CN109992415B CN109992415B (en) 2023-07-14

Family

ID=67130457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910198327.7A Active CN109992415B (en) 2019-03-15 2019-03-15 Container dispatching method and dispatching system

Country Status (1)

Country Link
CN (1) CN109992415B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522646A (en) * 2020-04-30 2020-08-11 北京江融信科技有限公司 Registration method and system used between batch dispatching center and batch application service
CN112818059A (en) * 2021-01-27 2021-05-18 百果园技术(新加坡)有限公司 Information real-time synchronization method and device based on container release platform
WO2023071576A1 (en) * 2021-10-28 2023-05-04 中移(苏州)软件技术有限公司 Container cluster construction method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066319A (en) * 2017-01-17 2017-08-18 北京国电通网络技术有限公司 A kind of multidimensional towards heterogeneous resource dispatches system
CN107423112A (en) * 2017-06-28 2017-12-01 郑州云海信息技术有限公司 A kind of Docker container states real-time synchronization method
US10216512B1 (en) * 2016-09-29 2019-02-26 Amazon Technologies, Inc. Managed multi-container builds

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10216512B1 (en) * 2016-09-29 2019-02-26 Amazon Technologies, Inc. Managed multi-container builds
CN107066319A (en) * 2017-01-17 2017-08-18 北京国电通网络技术有限公司 A kind of multidimensional towards heterogeneous resource dispatches system
CN107423112A (en) * 2017-06-28 2017-12-01 郑州云海信息技术有限公司 A kind of Docker container states real-time synchronization method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨迪: "基于容器云的微服务系统", 《电信科学》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522646A (en) * 2020-04-30 2020-08-11 北京江融信科技有限公司 Registration method and system used between batch dispatching center and batch application service
CN112818059A (en) * 2021-01-27 2021-05-18 百果园技术(新加坡)有限公司 Information real-time synchronization method and device based on container release platform
WO2023071576A1 (en) * 2021-10-28 2023-05-04 中移(苏州)软件技术有限公司 Container cluster construction method and system

Also Published As

Publication number Publication date
CN109992415B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN110704186B (en) Computing resource allocation method and device based on hybrid distribution architecture and storage medium
CN109992415A (en) A kind of container dispatching method and scheduling system
CN112346859B (en) Resource scheduling method and device, electronic equipment and storage medium
CN113641457A (en) Container creation method, device, apparatus, medium, and program product
CN110209490A (en) A kind of EMS memory management process and relevant device
WO2023000673A1 (en) Hardware accelerator device management method and apparatus, and electronic device and storage medium
CN110188110A (en) A kind of method and device constructing distributed lock
CN110019123A (en) A kind of data migration method and device
CN109144714A (en) EMS memory management process and device
CN108205469A (en) A kind of resource allocation methods and server based on MapReduce
CN106572069A (en) Network access control method and server server
US7243354B1 (en) System and method for efficiently processing information in a multithread environment
CN105224886B (en) A kind of mobile terminal safety partition method, device and mobile terminal
CN112236760A (en) Method, system, computer readable storage medium and equipment for updating graph data
CN114266281A (en) Method, device and system for training graph neural network
EP3944091A1 (en) Cache allocation method and device, storage medium, and electronic device
CN113419846A (en) Resource allocation method and device, electronic equipment and computer readable storage medium
CN104714792B (en) Multi-process shared data treating method and apparatus
CN115048216A (en) Resource management scheduling method, device and equipment for artificial intelligence cluster
CN110069533A (en) A kind of event subscription method and device based on block chain
CN114625533A (en) Distributed task scheduling method and device, electronic equipment and storage medium
CN109521970A (en) A kind of data processing method and relevant device
CN110489356B (en) Information processing method, information processing device, electronic equipment and storage medium
CN105868023B (en) Data processing method and calculate node in a kind of distributed system
CN101833585A (en) Database server operation control system, method and device

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