`
gaojingsong
  • 浏览: 1183105 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

分布式系统之Chronos调度

阅读更多

Chronos 是一个具备容错特性的作业调度器,可处理依赖性和基于 ISO8601 的调度。Chronos 是由 Airbnb 公司推出的用来替代 cron 的开源产品。你可以用它来对作业进行编排,支持使用 Mesos 作为作业执行器,支持和 Hadoop 进行交互。可定义作业执行完成后的触发器。支持任意长度的依赖链。



 

Chronos is our replacement for cron. It is a distributed and fault-tolerant scheduler which runs on top of Mesos. It’s a framework and supports custom mesos executors as well as the default command executor. Thus by default, Chronos executes SH (on most systems BASH) scripts. 

 

Chronos can be used to interact with systems such as Hadoop (incl. EMR), even if the mesos slaves on which execution happens do not have Hadoop installed. Included wrapper scripts allow transfering files and executing them on a remote machine in the background and using asynchroneous callbacks to notify Chronos of job completion or failures.

 

Chronos has a number of advantages over regular cron. It allows you to schedule your jobs using ISO8601 repeating interval notation, which enables more flexibility in job scheduling. Chronos also supports the definition of jobs triggered by the completion of other jobs, and it also supports arbitrarily long dependency chains.

 

 

Chronos: How does it work?

Chronos is a Mesos scheduler for running schedule and dependency based jobs. Scheduled jobs are configured with ISO8601-based schedules with repeating intervals. Typically, a job is scheduled to run indefinitely, such as once per day or per hour. Dependent jobs may have multiple parents, and will be triggered once all parents have been successfully invoked at least once since the last invocation of the dependent job.



 

 

Internally, the Chronos scheduler main loop is quite simple. The pattern is as follows:

1)Chronos reads all job state from the state store (ZooKeeper)

2)Jobs are registered within the scheduler and loaded into the job graph for tracking dependencies.

3)Jobs are separated into a list of those which should be run at the current time (based on the clock of the host machine), and those which should not.

4)Jobs in the list of jobs to run are queued, and will be launched as soon as a sufficient offer becomes available.

5)Chronos will sleep until the next job is scheduled to run, and begin again from step 1.

Furthermore, a dependent job will be queued for execution once all parents have successfully completed at least once since the last time it ran. After the dependent job runs, the cycle resets.

 

This code lives within the mainLoop() method, and can be found here.

 

Additionally, Chronos has a number of advanced features to help you build whatever it is you may be trying to. It can:

1)Write job metrics to Cassandra for further analysis, validation, and party favours

2)Send notifications to various endpoints such as email, Slack, and others

3)Export metrics to graphite and elsewhere

 

Chronos cannot:

1)Magically solve all distributed computing problems for you

2)Guarantee precise scheduling

3)Guarantee clock synchronization

4)Guarantee that jobs actually run

 

  • 大小: 76.6 KB
  • 大小: 324.5 KB
0
1
分享到:
评论

相关推荐

    Go-Swan是一个分布式高度可用的Mesos调度程序灵感来自GoogleBorg的设计

    Google Borg是Google内部使用的集群管理系统,它在大规模分布式系统中实现了资源分配、任务调度和故障恢复。Go-Swan借鉴了Borg的一些核心设计原则,例如,通过多副本和故障转移实现服务的高可用性。 **Go-Swan特性*...

    job-scheduler:我自己的作业调度程序,用于替换 Chronos

    Chronos是一个基于Mesos的分布式时序作业调度系统,常被用于大数据环境中的任务调度。然而,"job-scheduler"可能是为了满足特定需求或改进Chronos的某些方面而创建的。JavaScript是一种广泛使用的编程语言,尤其适合...

    chronos后端系统的类似cron作业

    Chronos是Airbnb开源的一个分布式调度系统,基于Apache Mesos构建。它提供了一个RESTful API,用于管理和调度任务,支持复杂的依赖关系和故障恢复机制。与传统的Cron相比,Chronos具备更高级的特性,如可配置的容错...

    chronos,后端系统的cron类作业.zip

    这个项目的目的是为大型分布式系统提供可靠且可扩展的定时任务调度解决方案。在“chronos,后端系统的cron类作业.zip”压缩包中,包含的是Chronos的源代码仓库“chronos-master”。 Chronos是Apache Mesos上的一个...

    dronos:分布式 + Chronos = Dronos

    Dronos 是一个分布式调度系统(模式类似于 Linux 的 cron 系统),使用 MongoDB 来协调跨多个节点的运行任务(dron)。 即将推出! Dronos 目前是更大系统的一部分,不可移植/可重复使用等。 我们正在对 Dronos ...

    小米弹性调度平台-从PaaS到DCOS.pdf

    5. PaaS到DCOS的演变:小米弹性调度平台从PaaS演变而来,PaaS提供了一个基于云计算的应用开发和部署平台,而DCOS提供了一个基于分布式系统的云操作系统。该平台从PaaS演变到DCOS,主要是为了提高系统的扩展性和灵活...

    PyPI 官网下载 | chronos-python-0.36.0.tar.gz

    Chronos,源自希腊神话中的时间之神,是一个强大的任务调度框架,其设计灵感来自于Apache Mesos上的分布式任务调度系统。在Python中,Chronos库通常用于构建高度可扩展和可靠的后台任务调度解决方案,它提供了灵活的...

    dkron:Dkron-分布式容错作业调度系统https:dkron.io

    Dkron-用于云原生环境的分布式容错作业调度系统 网站: : Dkron是一种分布式cron服务,易于设置且具有容错能力,主要关注于: 易用性:易于使用,具有出色的UI 可靠:完全容错高可扩展性:能够处理大量计划的作业和...

    Java 实现分布式定时任务

    3. 任务调度:常见的分布式调度解决方案有Apache Mesos、Chronos、Elastic Job等。它们提供中心化的任务调度服务,协调各个节点的任务执行。 四、Quartz作为分布式定时任务库 Quartz是一个功能强大的定时任务库,...

    mesos-1.4.3.tar.gz

    Mesos 1.4.3 是 Apache Mesos 的一个稳定版本,它是一个开源的分布式系统内核,旨在高效地管理和调度跨多台机器的计算资源。作为 Linux 操作系统上的一个核心组件,Mesos 提供了一个平台,使得开发者能够构建容错、...

    Mesosphere-A-Short-History-of-Container-Orchestration

    它的核心目标是简化分布式系统的建设和运维过程,使开发人员能够轻松地构建弹性且容错的应用程序和服务。不同于 Kubernetes 直接面向容器管理,Mesos 的重点在于提供底层支持,包括资源分配、隔离以及其他基础服务,...

    藏经阁-基于Mesos_Docker构建数据处理平台.pdf

    Mesos是一个分布式系统kernel,可以管理和调度计算资源,Docker是一个容器化技术,可以提供轻量级的虚拟化环境。通过将Mesos和Docker结合,يمكن创建一个高效的数据处理平台。 知识点2:Marathon和Chronos ...

    mesos-0.18.0-rc3.zip

    Mesos支持多种框架,如 Marathon(用于持续运行无状态任务)和 Chronos(用于定时任务调度)。0.18.0-rc3是发布前的测试版本,通常包含了新功能、性能优化以及错误修复。 【描述】中的"reactive-http.zip"指的是一...

    Apache Mesos Cookbook-Packt Publishing(2017)【E文】

    Apache Mesos是一个开源的分布式资源管理和工作调度平台,可以高效地在集群上分配计算资源,并为各种类型的分布式系统提供支持。它最初由Berkeley的AMPLab开发,并于2014年成为Apache软件基金会的顶级项目。 #### ...

    大数据开源技术详细介绍

    在大数据环境中,分布式ETL工具能够处理更大规模的数据,并在分布式系统中进行高效的转换和加载。 总的来说,这些开源技术构建了大数据处理的基石,为企业提供了处理海量数据的能力,同时也推动了大数据分析、实时...

    9-9+ReJoyGraph分布式流式图计算实践.pdf

    文档还提及了其他分布式内存型图计算系统,如Kineograph、Chronos、Weaver和STINGER,它们都专注于动态图计算和多级图分割,以及对非均匀内存访问(NUMA)的优化。 总的来说,【9-9+ReJoyGraph分布式流式图计算实践...

    Mesos.in.Action.2016.5.pdf

    Apache Mesos是分布式系统领域的重要项目之一,旨在为数据中心提供一个统一的资源管理平台。该书由Roger Ignazio撰写,并由Florian Leibert作序推荐,于2016年由Manning出版社出版发行。 #### 二、主要内容 本书...

    paasta:开放的分布式平台即服务

    PaaSTA是一个高度可用的分布式系统,用于使用容器和Apache Mesos构建,部署和运行服务! 想更多地了解PaaSTA为何与众不同的背后观点? 查看。 注意:PaaSTA在Yelp的生产环境中已经运行了很多年,并且在代码库中...

    saturn Network Job Scheduler-开源

    土星网络作业调度器,灵感来源于古希腊神话中的时光之神Chronos,寓意着精准与有序的时间管理。这个项目将神话中的概念转化为现实,为现代信息技术领域提供了一种高效、可扩展的作业调度解决方案。作为一个开源软件...

Global site tag (gtag.js) - Google Analytics