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

Memcache auto discovery #548

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nerdyvedi
Copy link

@Nerdyvedi Nerdyvedi commented Oct 4, 2023

In Hash client, if instead of a list of nodes, just cluster configuration endpoint is passed , This adds an option to fetch nodes from the endpoint

Resolves #534

@Nerdyvedi Nerdyvedi changed the title Memcache auto discovery Memcache auto discovery resolves #534 Oct 4, 2023
@Nerdyvedi Nerdyvedi changed the title Memcache auto discovery resolves #534 Memcache auto discovery Oct 4, 2023
Copy link
Contributor

@jogo jogo left a comment

Choose a reason for hiding this comment

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

Idea looks good a few inline comments plus, unit test coverage and updated docs (including the changelog) would be great.

Thank you for the contribution, and sorry for the slow review.

@@ -1030,6 +1030,15 @@ def flush_all(self, delay: int = 0, noreply: Optional[bool] = None) -> bool:
return True
return results[0] == b"OK"

def auto_discover(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

is this command useful in the base client, where I assume we only have a single memcache ip port tuple, or is this only useful in the hash client? If only Hashclient lets move it there

Choose a reason for hiding this comment

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

In my experience, it makes a sense to utilize HashClient alongside it, as it allows for connecting to multiple nodes simultaneously or you can connect to cache cluster with Client by using configuration node, ex. mycluster.fnjyzo.cfg.use1.cache.amazonaws.com.
As I saw here's not much activity for half year, but I would be happy with support of this feature for one of mine project. Could I handle it if nobody mind?

):
"""
Constructor.

Args:
servers: list() of tuple(hostname, port) or string containing a UNIX
socket path.
If enable_auto_discovery is set, just a configuration endpoint would suffice
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great to point out this is an AWS elasticache specific feature

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

Successfully merging this pull request may close these issues.

Feature Request [Elasticache-Auto-Discovery]
3 participants