Quartz.NET笔记(十一) Advanced (Enterprise) Features

Clustering

Clustering currently only works with the AdoJobstore (JobStoreTX). Features include load-balancing and job fail-over (if the JobDetail's "request recovery" flag is set to true).

Enable clustering by setting the "quartz.jobStore.clustered" property to "true". Each instance in the cluster should use the same copy of the quartz properties. Exceptions of this would be to use properties that are identical, with the following allowable exceptions: Different thread pool size, and different value for the "quartz.scheduler.instanceId" property. Each node in the cluster MUST have a unique instanceId, which is easily done (without needing different properties files) by placing "AUTO" as the value of this property.

Never run clustering on separate machines, unless their clocks are synchronized using some form of time-sync service (daemon) that runs very regularly (the clocks must be within a second of each other). See http://www.boulder.nist.gov/timefreq/service/its.htm if you are unfamiliar with how to do this.

Never fire-up a non-clustered instance against the same set of tables that any other instance is running against. You may get serious data corruption, and will definitely experience eratic behavior.

 

Clustering 集群 ( Clustering从0.6版本开始可用了)

目前,集群只能用在使用ADO.NET-Jobstore的情况。特新包括负载均衡和容错(如果JobDetail的"request recovery"标记被设置为true)。

设置" quartz.jobStore.isClustered"属性为true才可以集群,集群中的每个实例都使用quartz.properties的相同拷贝。集群所使用属性文件的例外是一致的,下面是允许的例外:不同的线程池数量,"quartz.scheduler.instanceId"的不同属性值。集群中的每个节点必须有唯一的instanceId,通过替换这个属性的值为"AUTO"就可以轻松做到(不要不同的属性文件)。

除非使用某些运行非常有整齐(时钟必须同步在一秒之内)的时间同步服务来同步不同计算机的时钟外,不要将集群运行在不同的计算机三行。如果你不熟悉如何做请参照http://www.boulder.nist.gov/timefreq/service/its.htm

不要在一套数据库表上运行未集群的实例。这会导致严重的数据冲突,及不可预知的行为。

 

http://mikaelkoskinen.net/quartz-net-cluster-sql-azure-asp-net/

转载于:https://www.cnblogs.com/hzz521/p/5160030.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值