Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/tsp-controller: obsolete the 'dedup' attribute #23

Open
masiulaniec opened this issue Jul 9, 2015 · 0 comments
Open

cmd/tsp-controller: obsolete the 'dedup' attribute #23

masiulaniec opened this issue Jul 9, 2015 · 0 comments

Comments

@masiulaniec
Copy link
Contributor

As is, when registering a subscriber in /etc/tsp-controller/network, the operator is burdened with having to know the correct value of the "dedup" attribute. This "dedup" attribute translates to aggregator's "DropRepeats" setting.

However, practice suggests that "DropRepeats" is subscriber's internal detail. It would be better if the subscriber had a way of communicating its value back to aggregator without any extra human involvement.

One way of doing it would be to provide better specification for the "version" command. For example:

  1. If the response to the "version" command begins with open-curly "{", then it is assumed to be a JSON object that contains overrides for the "Relay" settings, for example:
 >>> version
 <<< {"DropRepeats": false}
  1. If the "version" command produces any other response, then the subscriber is assumed to be OpenTSDB, and therefore sets DropRepeats to true.

This approach has two nice benefits down the road. Firstly, it finally provides clear semantics for the "version" command, which currently has unacceptably ad hoc handling in the source code. Secondly, it paves the way for potential subscriber-supplied aggregator-side filtering rules, e.g.:

>>> version
<<< {"Filter": [{"Match": "foo", "Block": true}]}

But one must be careful to allow subscriber to override only some of its Relay settings. All other settings should be presumed immutable becase of reliability/security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant