Distributed Timing Task Solution-spring Boot Consolidated JMS and REDIS implementations

Source: Internet
Author: User
Tags redis redis cluster

The recent need to design a distributed scheduled task, in theory, Quartz has provided a complete set of distributed scheduled tasks of the solution, but because the system currently has a JMS cluster and Redis Sentinel cluster, if you want to the existing architecture, Implementation of a simple distributed timing task, how to do it. The overall architecture plan is as follows:


Redis cluster: Provides distributed caching and implements a simple distributed lock http://blog.csdn.net/liuchuanhong1/article/details/54668460

NODE1~NODE3 node: Scheduled from the database to perform the task, because the results of the query is list, if the 3 node nodes at the same time to check the library, and the results of the query pushed to the middleware cluster, then the task to be executed will certainly be repeated (the library, the other said). In other words, at the same time, only a node node is allowed to be active, and nodes that do not acquire a distributed lock are blocked until the lock is acquired and a single node failure is avoided.

JMS cluster: Decoupled, node nodes push the pending task that is queried from the database to the corresponding queue in JMS.

Execute node node: listens to the JMS queue and takes the pending tasks out of the queue and executes the http://blog.csdn.net/liuchuanhong1/article/details/54603546 asynchronously

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.