influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Change assignment to long term shard to be based on a regex

Open pauldix opened this issue 12 years ago • 7 comments

Currently, assignment to a long term shard is determined by the first character of the time series name. It probably makes more sense to have it just be a regex that the user can configure. That way they have absolute control about where things go.

Should this be in the configuration file or something that gets set via an API as part of the cluster config object? (replicated via Raft)

pauldix avatar Mar 06 '14 22:03 pauldix

Since the shard configuration is currently in the config file, it makes sense to me to keep them both in the same location. However if shard configuration was moved from config file to API/Raft (any plans for that?) that'd make it quicker to stand up new influx nodes and less likely for mistakes/mismatches to happen in shard configuration.

ragzilla avatar Mar 06 '14 22:03 ragzilla

what is the purpose of the long term shard ? Sorry if that's a stupid question :p

schmurfy avatar Mar 11 '14 09:03 schmurfy

The idea is that you generally have two types of data. Short term high precision stuff that you really only need to keep around for 7-90 days and then you have long term trend data or other data that you want to keep around for a long time.

Having the two separate shard spaces makes it fast to segment data into these two areas and drop old data very efficiently. So if you drop a short term shard, you'll still keep the long term data around even if it's in the same time interval.

pauldix avatar Mar 11 '14 14:03 pauldix

thanks, in that case I agree it makes more sense to have it configurable rather than hardcoded.

schmurfy avatar Mar 11 '14 16:03 schmurfy

Hi,

I'm in a situation where I have to keep high precision series on long term (at least 1 year). The purpose is to let customers make raw exports of data (they need no downsampled exports) I also need downsampled operations for graphs, average, etc.

In this case, what would be the best way to configure my cluster/shards?

jturello-ulink avatar Apr 14 '14 10:04 jturello-ulink

You'll still want to break things out into shards so that individual LevelDB instances don't get too big. But maybe you'll want to set the shard size to something like 30d for both short and long term.

On Mon, Apr 14, 2014 at 6:40 AM, ulink [email protected] wrote:

Hi,

I'm in a situation where I have to keep high precision series on long term (at least 1 year). The purpose is to let customers make raw exports of data (they need no downsampled exports) I also need downsampled operations for graphs, average, etc.

In this case, what would be the best way to configure my cluster/shards?

— Reply to this email directly or view it on GitHubhttps://github.com/influxdb/influxdb/issues/307#issuecomment-40352845 .

pauldix avatar Apr 14 '14 17:04 pauldix

This will be fixed when #571 is done.

pauldix avatar Jul 09 '14 18:07 pauldix