2013-09-16 17:49:36 -04:00
---
2013-09-26 19:22:28 -04:00
layout: doc_page
2013-09-16 17:49:36 -04:00
---
2014-01-16 18:37:07 -05:00
# Configuring Rules for Coordinator Nodes
2013-10-03 19:36:48 -04:00
Note: It is recommended that the coordinator console is used to configure rules. However, the coordinator node does have HTTP endpoints to programmatically configure rules.
2013-09-13 18:20:39 -04:00
Load Rules
----------
Load rules indicate how many replicants of a segment should exist in a server tier.
### Interval Load Rule
Interval load rules are of the form:
2013-09-27 20:08:34 -04:00
```json
{
"type" : "loadByInterval",
"interval" : "2012-01-01/2013-01-01",
"tier" : "hot"
}
```
* `type` - this should always be "loadByInterval"
* `interval` - A JSON Object representing ISO-8601 Intervals
2013-10-03 19:36:48 -04:00
* `tier` - the configured historical node tier
2013-09-13 18:20:39 -04:00
### Period Load Rule
Period load rules are of the form:
2013-09-27 20:08:34 -04:00
```json
{
"type" : "loadByPeriod",
"period" : "P1M",
"tier" : "hot"
}
```
2013-09-13 18:20:39 -04:00
2013-09-27 20:08:34 -04:00
* `type` - this should always be "loadByPeriod"
* `period` - A JSON Object representing ISO-8601 Periods
2013-10-03 19:36:48 -04:00
* `tier` - the configured historical node tier
2013-09-13 18:20:39 -04:00
The interval of a segment will be compared against the specified period. The rule matches if the period overlaps the interval.
Drop Rules
----------
Drop rules indicate when segments should be dropped from the cluster.
### Interval Drop Rule
Interval drop rules are of the form:
2013-09-27 20:08:34 -04:00
```json
{
"type" : "dropByInterval",
"interval" : "2012-01-01/2013-01-01"
}
```
2013-09-13 18:20:39 -04:00
2013-09-27 20:08:34 -04:00
* `type` - this should always be "dropByInterval"
* `interval` - A JSON Object representing ISO-8601 Periods
2013-09-13 18:20:39 -04:00
A segment is dropped if the interval contains the interval of the segment.
### Period Drop Rule
Period drop rules are of the form:
2013-09-27 20:08:34 -04:00
```json
{
"type" : "dropByPeriod",
"period" : "P1M"
}
```
2013-09-13 18:20:39 -04:00
2013-09-27 20:08:34 -04:00
* `type` - this should always be "dropByPeriod"
* `period` - A JSON Object representing ISO-8601 Periods
2013-09-13 18:20:39 -04:00
The interval of a segment will be compared against the specified period. The period is from some time in the past to the current time. The rule matches if the period contains the interval.