CN111176812A - Clustered timing task scheduling system - Google Patents
Clustered timing task scheduling system Download PDFInfo
- Publication number
- CN111176812A CN111176812A CN201911381894.2A CN201911381894A CN111176812A CN 111176812 A CN111176812 A CN 111176812A CN 201911381894 A CN201911381894 A CN 201911381894A CN 111176812 A CN111176812 A CN 111176812A
- Authority
- CN
- China
- Prior art keywords
- timing
- task
- quartz
- node
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a clustered timing task scheduling system which comprises a local task container, a Quartz timing server, a zookeeper cluster, a mysql database and a RabbitMQ message notification module, wherein the local task container holds a timing task held by the Quartz timing server, the zookeeper cluster takes the local task container from the mysql database and divides the local task container to nodes of different Quartz timing servers, and the Quartz timing server sends the task to the RabbitMQ message notification module to be timed by service monitoring triggering service. The systematization can simultaneously execute tasks by multiple nodes, improve the performance and avoid resource waste.
Description
Technical Field
The invention relates to a clustered timing task scheduling system, and belongs to the technical field of computers.
Background
Whether in internet application or enterprise-level application, a large number of batch processing tasks are filled, and some task scheduling systems are often needed to solve problems, so tools capable of realizing timing tasks such as Timer, scheduled executive, spring timing framework and the like appear. Although these timing task frameworks are simple to implement, the scenarios they can support are very limited. With the gradual evolution of the micro-service architecture, the single architecture of the system gradually evolves into a distributed micro-service architecture, and many original task scheduling platforms cannot meet the requirements of a business system. Therefore, some task scheduling platforms based on distribution, such as an open-source timing scheduler quartz, appear, which support rich and diverse scheduling methods, can meet various conventional and special requirements, have flexible application modes, support various combination modes of tasks and scheduling to support various storage modes of scheduling data, and support clustered deployment. The cluster function of quartz brings high availability and expandability to task scheduling through the functions of fault transfer and load balancing, and solves the problem of single-point fault of a single task.
But there is no communication between the nodes in the quartz cluster, the quartz application is aware of the other application through the database tables. In brief, the distributed scheduling policy of quartz is an asynchronous policy of database-bound resources, each scheduler complies with an operation rule based on a database lock so as to ensure the uniqueness of operation, and meanwhile, the asynchronous operation of a plurality of nodes ensures the reliability of service. However, this strategy has its own limitations: the cluster characteristic has a good effect on tasks with high CPU utilization rate, but for a large number of short tasks, each node can preempt a database lock, so that a large number of threads wait for resources, and the situation becomes more and more serious along with the increase of the nodes. In addition, the distribution of quartz only solves the problem of high availability, does not solve the problem of task fragmentation, and still has the limit of single machine processing.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a clustered timing task scheduling system which can simultaneously execute tasks by multiple nodes, improve the performance and avoid the waste of resources. .
In order to achieve the purpose, the clustered timing task scheduling system comprises a local task container, Quartz timing servers, a zookeeper cluster, a mysql database and a RabbitMQ message notification module, wherein timing tasks held by the Quartz timing servers are held in the local task container, the zookeeper cluster is used for taking the local task container from the mysql database and dividing the local task container to nodes of different Quartz timing servers, and the Quartz timing servers are used for sending the tasks to the RabbitMQ message notification module and are timed by service monitoring triggering services.
Further, each Quartz timing server interacts with the zookeeper cluster, a master node in the zookeeper cluster performs task division, and division results are distributed to the Quartz timing server nodes in the zookeeper cluster.
Further, when a Quartz timing server node in the zookeeper cluster is down, the tasks held by the Quartz timing server node which is down are redistributed to the Quartz timing server nodes which are normally operated.
Further, the node of each Quartz timing server holds a unique timing task, and the Quartz timing server triggers the timing task received by the Quartz timing server.
Further, the node creation structure of the zookeeper cluster includes a server node and a task node.
Further, the child node under the server node is a service registration node in the Quartz timing server cluster.
Further, the child nodes under the task node are nodes of all timing tasks.
Furthermore, each task node has a unique child node, and the child node of the task node is a machine node which uniquely holds the task for the Quartz timing server in the Quartz timing server cluster.
The clustered timing task scheduling system provided by the invention removes strong dependence on the database when quartz self-distributed deployment is carried out, and avoids the problem that the original clustered architecture frequently competes for the database lock. And a plurality of quartz nodes execute tasks simultaneously through zookeeper, so that the system scheduling performance is improved, the task fragmentation is realized, the horizontal expansion of the quartz task scheduling is realized, and the performance is greatly improved.
Drawings
The present invention will be further described and illustrated with reference to the following drawings.
FIG. 1 is a block diagram of a clustered timed task scheduling system in accordance with a preferred embodiment of the present invention;
fig. 2 is a node creation structure diagram in a clustered timing task scheduling system according to a preferred embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be more clearly and completely explained by the description of the preferred embodiments of the present invention with reference to the accompanying drawings.
As shown in fig. 1, a clustered timing task scheduling system according to a preferred embodiment of the present invention includes a local task container, Quartz timing servers, a zookeeper cluster, a mysql database, and a RabbitMQ message notification module, where a node of each Quartz timing server holds a unique timing task, and the Quartz timing servers trigger timing tasks received by the Quartz timing servers.
The local task container holds the timing task held by the Quartz timing server, and the task of the local container is pushed to the container of Quartz to complete the triggering of the timing task. And the zookeeper cluster takes the local task container from the mysql database and divides the local task container to nodes of different Quartz timing servers, and the Quartz timing servers send the tasks to a RabbitMQ message notification module to be timed by service monitoring triggering service.
Each Quartz timing server interacts with the zookeeper cluster, a master node in the zookeeper cluster performs task division, and division results are distributed to the Quartz timing server nodes in the zookeeper cluster.
When a Quartz timing server node in the zookeeper cluster is down, the tasks held by the Quartz timing server node which is down are redistributed to the Quartz timing server nodes which normally run, and the coordinated result is delivered to a local task container.
As shown in fig. 2, the node creation structure of the zookeeper cluster includes a server node and a task node.
And the child node under the server node is a service registration node in the Quartz timing server cluster.
And the child nodes under the task node are nodes of all timing tasks. And each task node is provided with a unique child node, and the child node of the task node is a machine node which uniquely holds the task for the Quartz timing server in the Quartz timing server cluster.
The clustered timing task scheduling system provided by the invention removes strong dependence on the database when quartz self-distributed deployment is carried out, and avoids the problem that the original clustered architecture frequently competes for the database lock. And a plurality of quartz nodes execute tasks simultaneously through zookeeper, so that the system scheduling performance is improved, the task fragmentation is realized, the horizontal expansion of the quartz task scheduling is realized, and the performance is greatly improved.
The above detailed description merely describes preferred embodiments of the present invention and does not limit the scope of the invention. Without departing from the spirit and scope of the present invention, it should be understood that various changes, substitutions and alterations can be made herein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims and their equivalents. The scope of the invention is defined by the claims.
Claims (8)
1. A clustered timing task scheduling system is characterized by comprising a local task container, a Quartz timing server, a zookeeper cluster, a mysql database and a RabbitMQ message notification module, wherein the local task container holds a timing task held by the Quartz timing server, the zookeeper cluster takes the local task container from the mysql database and divides the local task container to nodes of different Quartz timing servers, and the Quartz timing server sends a task to the RabbitMQ message notification module to be timed by service monitoring triggering service.
2. The clustered timed task scheduling system of claim 1 wherein each of said Quartz timing servers interacts with a zookeeper cluster, is task partitioned by a master node in said zookeeper cluster, and distributes the results of the partitioning to the Quartz timing server nodes in the zookeeper cluster.
3. The clustered timed task scheduling system of claim 2 wherein when a Quartz timing server node in said zookeeper cluster is down, tasks held by said Quartz timing server node that is down will be redistributed to normally operating Quartz timing server nodes.
4. A clustered timing task scheduling system as claimed in claim 3 wherein each of said Quartz timing server nodes holds a unique timing task, said Quartz timing server triggering its own received timing task.
5. The clustered timed task scheduling system of claim 1 wherein the node creation structure of the zookeeper cluster includes a server node and a task node.
6. The clustered timing task scheduling system of claim 5, wherein a child node under the server node is a service registration node in a Quartz timing server cluster.
7. The clustered timing task scheduling system of claim 5, wherein the child nodes under the task node are nodes of all timing tasks.
8. The clustered timing task scheduling system of claim 7, wherein each of said task nodes has a unique child node under it, said child node of task node being a machine node that is uniquely owned by a Quartz timing server in a Quartz timing server cluster.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911381894.2A CN111176812A (en) | 2019-12-27 | 2019-12-27 | Clustered timing task scheduling system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911381894.2A CN111176812A (en) | 2019-12-27 | 2019-12-27 | Clustered timing task scheduling system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111176812A true CN111176812A (en) | 2020-05-19 |
Family
ID=70658220
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911381894.2A Pending CN111176812A (en) | 2019-12-27 | 2019-12-27 | Clustered timing task scheduling system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111176812A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112559158A (en) * | 2020-12-29 | 2021-03-26 | 中国人民银行清算总中心 | Micro-service timing task scheduling method and device |
CN112822250A (en) * | 2020-12-31 | 2021-05-18 | 鲸灵科技股份有限公司 | Method and device for decentralized scheduling and execution of big data platform |
CN114063936A (en) * | 2022-01-18 | 2022-02-18 | 苏州浪潮智能科技有限公司 | Method, system, equipment and storage medium for optimizing timing task |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108255592A (en) * | 2017-12-19 | 2018-07-06 | 武汉市烽视威科技有限公司 | A kind of Quartz clusters timing task processing system and method |
-
2019
- 2019-12-27 CN CN201911381894.2A patent/CN111176812A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108255592A (en) * | 2017-12-19 | 2018-07-06 | 武汉市烽视威科技有限公司 | A kind of Quartz clusters timing task processing system and method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112559158A (en) * | 2020-12-29 | 2021-03-26 | 中国人民银行清算总中心 | Micro-service timing task scheduling method and device |
CN112822250A (en) * | 2020-12-31 | 2021-05-18 | 鲸灵科技股份有限公司 | Method and device for decentralized scheduling and execution of big data platform |
CN114063936A (en) * | 2022-01-18 | 2022-02-18 | 苏州浪潮智能科技有限公司 | Method, system, equipment and storage medium for optimizing timing task |
CN114063936B (en) * | 2022-01-18 | 2022-03-22 | 苏州浪潮智能科技有限公司 | Method, system, equipment and storage medium for optimizing timing task |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108762896B (en) | Hadoop cluster-based task scheduling method and computer equipment | |
CN111176812A (en) | Clustered timing task scheduling system | |
CN109995669B (en) | Distributed current limiting method, device, equipment and readable storage medium | |
CN105100259A (en) | Distributed timed task execution method and system | |
RU2749339C1 (en) | Equipment control method, cluster system, electronic device and readable data media | |
WO2014024863A1 (en) | Load distribution method taking into account each node in multi-level hierarchy | |
EP2754046A2 (en) | Automatic preemption in multiple computer systems | |
CN110071965B (en) | Data center management system based on cloud platform | |
US10719359B2 (en) | Periodic task execution in an automated context | |
US20190042314A1 (en) | Resource allocation | |
CN111225029A (en) | Dynamic message pushing method and system and automobile diagnosis server | |
CN106533961B (en) | Flow control method and device | |
CN116149821A (en) | Cluster multi-task sliding window scheduling processing method, system, equipment and medium | |
EP3026869A2 (en) | Method, device and system for carrying out telecommunication capability group sending | |
CN111427670A (en) | Task scheduling method and system | |
CN113364888B (en) | Service scheduling method, system, electronic device and computer readable storage medium | |
CN111741079A (en) | Micro-service architecture based interface processing method and system | |
CN111163140A (en) | Method, apparatus and computer readable storage medium for resource acquisition and allocation | |
Shah et al. | Agent based priority heuristic for job scheduling on computational grids | |
US10701167B1 (en) | Adaptive quorum for a message broker service | |
US20150372895A1 (en) | Proactive Change of Communication Models | |
CN112631756A (en) | Distributed regulation and control method and device applied to space flight measurement and control software | |
CN112099930A (en) | Quantum computer cluster distributed queue scheduling method | |
CN107423131B (en) | Sharing method and server | |
CN113434591B (en) | Data processing 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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200519 |
|
WD01 | Invention patent application deemed withdrawn after publication |