Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Max datapoints per target #577

Merged
merged 3 commits into from
Mar 29, 2017
Merged

Max datapoints per target #577

merged 3 commits into from
Mar 29, 2017

Conversation

replay
Copy link
Contributor

@replay replay commented Mar 22, 2017

This can be used to limit the amount of data that gets sent out by Metrictank, to prevent the receiver from flooding it's memory when parsing the reply.

fixes #573

- remove existing limits and replace with soft and hard limits
- if a request exceeds the soft limit, lower resolution rollups
  will be used
- if a request exceeds the hard limit it will be rejected.
@replay replay merged commit f93fb45 into master Mar 29, 2017
req.Archive = -1
targets[req.Target] = struct{}{}
}
numTargets := uint32(len(targets))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just len(reqs)? why build the temporary set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the idea is that there can be multiple requests with the same req.Target but in the response we'll only send each target once, so that's the count of unique targets.

@Dieterbe Dieterbe deleted the 573-max-datapoints-rule branch September 18, 2018 09:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to define a max datapoints per query rule
3 participants