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

add memcached auto-discovery support from thanos #4412

Merged
merged 2 commits into from
Sep 20, 2021

Conversation

roystchiang
Copy link
Contributor

@roystchiang roystchiang commented Aug 9, 2021

Signed-off-by: Roy Chiang [email protected]

What this PR does:
Updates Thanos to a version that includes memcached auto-discovery support, introduced in thanos-io/thanos#4487.

Auto-discovery is a way for clients to automatically discover nodes belonging to a memcached cluster. It is different from DNS discovery because the node resolution is not done on the DNS level, but rather through talking to memcached.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@roystchiang roystchiang force-pushed the upgrade-thanos branch 3 times, most recently from 4cbbf28 to 87ce484 Compare August 9, 2021 23:16
@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 9, 2021
@alolita
Copy link

alolita commented Aug 10, 2021

Can you please also review this PR @alolita @Aneurysm9

Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Thanks for this PR.
Since you're upgrading thanos, is this a new feature? If so please link to the upstream details in the PR, maybe also in the CHANGELOG.
Please also check what other changes are brought in by this upgrade (maybe not many, looks like 6 days apart) and state what you found, again in the PR description and CHANGELOG if appropriate.

@@ -29,6 +30,7 @@ func (cfg *MemcachedClientConfig) RegisterFlagsWithPrefix(f *flag.FlagSet, prefi
f.IntVar(&cfg.MaxGetMultiConcurrency, prefix+"max-get-multi-concurrency", 100, "The maximum number of concurrent connections running get operations. If set to 0, concurrency is unlimited.")
f.IntVar(&cfg.MaxGetMultiBatchSize, prefix+"max-get-multi-batch-size", 0, "The maximum number of keys a single underlying get operation should run. If more keys are specified, internally keys are split into multiple batches and fetched concurrently, honoring the max concurrency. If set to 0, the max batch size is unlimited.")
f.IntVar(&cfg.MaxItemSize, prefix+"max-item-size", 1024*1024, "The maximum size of an item stored in memcached. Bigger items are not stored. If set to 0, no maximum size is enforced.")
f.BoolVar(&cfg.AutoDiscovery, prefix+"auto-discovery", false, "Use memcached auto-discovery instead of DNS resolution")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get a bit more descriptive than "memcached auto-discovery"?
I Googled that phrase and am not sure I found what you meant.

Copy link
Contributor

@jeromeinsf jeromeinsf Aug 13, 2021

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

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 have updated the PR description to include the thanos PR link. Also added 2 links for explaining what auto-discovery means for memcached.

There are no other changes brought by upgrading Thanos in this PR.

Please let me know if you have other concerns.

Copy link
Contributor

Choose a reason for hiding this comment

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

@bboreham do you have anymore concern on this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

The Changelog entry is circular and the Thanos link doesn't explain auto-discovery.
I think you're saying it is an ElasticCache feature that is also supported by Google Cloud; the Cortex docs should link to one or both of those if there is nothing more neutral.

Copy link
Contributor

@alvinlin123 alvinlin123 left a comment

Choose a reason for hiding this comment

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

Since the auto_discovery feature here is Cloud provider specific, I think we should add some document like

https://cortexmetrics.io/docs/configuration/arguments/#dns-service-discovery

or maybe in

https://cortexmetrics.io/docs/chunks-storage/aws-tips/

Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Roy Chiang <[email protected]>
@alvinlin123 alvinlin123 merged commit 67c0985 into cortexproject:master Sep 20, 2021
srijan55 pushed a commit to srijan55/cortex that referenced this pull request Nov 26, 2021
* add memcached auto-discovery support from thanos (cortexproject#4412)

Signed-off-by: Roy Chiang <[email protected]>

* update documentation

Signed-off-by: Roy Chiang <[email protected]>
Signed-off-by: Manish Kumar Gupta <[email protected]>
alvinlin123 pushed a commit to ac1214/cortex that referenced this pull request Jan 14, 2022
* add memcached auto-discovery support from thanos (cortexproject#4412)

Signed-off-by: Roy Chiang <[email protected]>

* update documentation

Signed-off-by: Roy Chiang <[email protected]>
Signed-off-by: Alvin Lin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants