-
Notifications
You must be signed in to change notification settings - Fork 16
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
Elasticache client support #17
Comments
We don't. If you are curious about how you would do it, take a look at the code. We'd perhaps need to extract a common protocol for clients first, although this was never a goal for Spyglass. However, if ElasticCache can be considered a Memcached implementation, I'm all for it. |
To be clear, ElastiCache is not a Memcached implementation. It's a set of AWS tools for provisioning and managing either a memcached or redis cluster. From an application standpoint, it's memcached. What @priyatam was getting at is that part of those AWS tools include propagating the list of nodes throughout the cluster, such that a client can "discover" them. Conveniently, the AWS ElastiCache client is a fork of spymemcached. So, this might be as simple as:
A cursory local test confirms that swapping the dependency works, at least:
Note: the I haven't tried it yet, but I suspect using |
@rwilson thank you. It would be interesting to learn about how Spyglass can be used with ElastiCache, even though we currently don't have plans to support it. That said, if it turns out to be easy for us to maintain, I'd be willing to give it a shot in a new namespace. But it's not yet clear. |
Swapping dependencies seems to work, some futzing with the Given the requirement of swapping a dependency, I suppose this could be a permanent fork, ie.g. |
@rwilson if this is a mostly compatible change I'd consider depending on the Amazon client in the next major version. |
Thanks @rwilson. I don't need an aws elastic load balancer client now (happy with the default one shipped with splyglass), and is running fine in production for seven months. The addition would be useful to someone, as an optional dependency with the connection factory helpers. |
OK, the changes in the above linked branch work. As you can see in the diff, the changes default to using connection factories initialized with To use it with ElastiCache's dynamic configuration endpoint, the connection just has to be created with a connection factory set to For comparison, here's an example: Normal Memcached (non-ElastiCache)
ElastiCache Dynamic Configuration
There's an alpha version on clojars if anybody wants to try it. Include: How do you want to proceed? If you want to use the AWS ElastiCache client as a substitute for spymemcached in spyglass, I can create a PR for that. I'm a little skeptical of that, since I don't know whether to expect the AWS ElastiCache client to stay up to date with spymemcached, or whether to expect spymemcached to be fairly static and thus it wouldn't matter. The safest play is probably to create a permanent fork, e.g. Any preferences? |
How do you integrate elasticache client provider with Spyglass for dynamic clients and auto discovery? In particular, what would be a minimal
bin-connection-factory
for this setup?The text was updated successfully, but these errors were encountered: