Closed BohdanPetryshyn closed 1 year ago
I would be happy to handle this 😀
does this issue have an ETA? I can start working on it now if relevant
@dollev36, I appreciate your willingness to contribute to the project 🙏
As far as I know, @yvashkiv has already started working on the implementation.
If you need to connect to an ElastiCache instance now, you can use the custom target approach. If you're interested in becoming a contributor, I would really appreciate it if you choose any other issue or create a new one ❤️
@yvashkiv is there an ETA?
@dollev36 Probably it will be done by the end of this week.
Hi @dollev36 . Further research showed that it's hard to solve the problem of local connection for multi-node Redis or Memcached clusters as in this case, the client needs a connection to each of the nodes in the cluster (and it's only part of the problem). For now, I'll implement only Redis (Cluster Mode Disabled) and Memcached single-node clusters support.
Does this satisfy your use case?
Hey @dollev36 👋
Looks like it takes more time than expected to implement the enhancement. I just want to make sure your use case is covered with the custom target connection mode:
basti init
, select a custom target and your cluster's VPCbasti connect --custom-target-vpc <you-cluster-vpc> \
--custom-target-host <your-cluster-primary-endpoint> \
--custom-target-port <your-cluster-port> \
--local-port <local-port>
Hi @yvashkiv I suggest you implement this part and I then I could try to expend on it to include cluster mode enabled. can you elaborate on the difficulties you are facing?
Hey @BohdanPetryshyn , first, your project is super cool. You provide E2E experience which can really help AWS users. With regards to how I think it should work, I don't think users will want to use the --custom* command line but being able to choose the Redis node from the list of nodes they have access to. Similar to what you already do today with RDS.
Hi @tomer-w 👋
Thank you for your feedback! It's good to know people value the interactive mode since I mostly use the automatic mode and/or configuration file.
I think it makes sense for Basti to operate Elasticache clusters instead of nodes since this is the first thing people see on the AWS UI. This way, when the user selects a single-shard Redis or Memcached cluster, Basti will establish a connection with the primary node in that single shard. This will eliminate the need for the user to select the primary node from a potentially long list of replicas.
The problem is more complicated with the shared clusters (more on this in the next comment). I hope @dollev36 will help here!
Regarding sharded clusters.
Both Redis and Memcached leave request routing to the client. This means that the client has to maintain a connection to all the nodes in the cluster (at least all the primary nodes).
Moreover, the client uses the IP:port addresses received from the cluster to communicate with the nodes and follow possible redirects. When connecting through Basti (or any other port forwarding tool like SSH tunneling), the client should use different addresses - the ones exposed by Basti on the localhost
. For example, the cluster has three primary nodes:
10.0.1.0:6379
10.0.1.1:6379
10.0.1.2:6379
Using Basti the actual addresses will be something like this:
127.0.0.1:6370
127.0.0.1:6371
127.0.0.1:6372
The client has to have a way to override the addresses. I managed to connect to a shared Redis cluster using the ioredis client for NodeJS and its Nat Mapping feature. However, this is not always possible. For example, the redis-cli
client doesn't provide such functionality from what I know.
Possible solutions off the top of my head:
I would be really glad to hear your thoughts on this!
cc @dollev36 @tomer-w @yvashkiv
I fully agree that if the goal is to allow cluster mode enabled clients to connect using basti than a proxy like mechanism is needed. For me, it was not the first goal of this support as I understand the complexity and don't have easy solution. What I do have in mind is administration support which will allow the customer to use Redis-cli type of tools to monitor and configure the cluster and for this reason it is enough to connect to a single node. Will be glad if later we will come up with novel approach for the cluster connectivity issue but I don't see it as a blocker to start getting value of the Basti tool for ElastiCache.
Sounds good to me @tomer-w!
So the first iteration of Elasticache support could be:
The interactive mode CLI should be implemented in such a way as to make it clear to the user that only the configuration endpoint is available for shared clusters
I think that as the main usage is going to be configuration and monitoring you will want to be able to choose any node (primary or replica) for both CMD and CME. It should be very similar to the ElastiCache console which you see list of all nodes (with some designation if this is primary or replica and which shard) and allow the user to choose the one he wants to work with. This will be the same for both CME and CMD. So, in the basti init phase you just choose a cluster and in the basti connect phase you can choose the specific node.
Thank you for your input, @tomer-w! I'll get back with some UX prototypes soon!
I would suggest an interactive mode layout like this:
Hey @yvashkiv , have you seen the recent discussion? are you planning on continuing the implementation including the CME? if not , can you tell me aren't you going to do? thanks
Hi @dollev36, I saw the recent discussion and plan to include CME in implementation.
Hi, @dollev36 @tomer-w @BohdanPetryshyn ! Sorry for the delay. I'm going to finish the implementation till the end of this week - beginning of the next week.
The issue has grown in scope significantly since @yvashkiv started working on it. We agreed with Yura that I'll finish the implementation instead.
Elasticache support should be released in one to two weeks.
Hi Bohdan, thank you for taking it over from Yura and unblocking him. If you are busy, and no real work is yet done, maybe Dolev can take it, as he is available. Dolev and myself are working in AWS Elasticache service, and we think there is a real value we can provide to many AWS customers. So we are ready to take it over and contribute to your open-source project.
Hi @vovagring and @dollev36 👋
It would be great if you could handle this! As you guessed, there was not much progress made so far, so you can start from scratch.
This time, I'd suggest agreeing on an ETA from the beginning 😅
I would be happy to give you a quick intro to the project and share some thoughts on the future implementation. We could have a quick call if you want
Hi @BohdanPetryshyn , I'll be happy to handle this , and of course I'd love to have a chat with you for intro.
Could you please, message me on LinkedIn so that we can agree on the time?
@BohdanPetryshyn I'm sorry for the delay, iv'e missed the notification. added you on LinkedIn
@BohdanPetryshyn , I appologize for the delay - I've started working on it, but due to personnal issues delaying me it will take about two to three weeks.
@dollev36, thanks for letting us know!
Hello, @dollev36 👋
I hope you're doing well! I recently gave this issue a higher priority as I think this functionality could be really helpful to many people. Please, let me know if you need any help! It would also be great if you could give an update on your progress and estimate.
Hi @BohdanPetryshyn I'm doing all right, sorry for the delay, I estimate I will have a pr by the end of next week.
Sounds good, thank you for your reply! You're welcome to open a draft PR as soon as it makes sense to start receiving some feedback.
@dollev36 , @BohdanPetryshyn , thanks for getting this in. I am sure ElastiCache customers will benefit from this change. When are you going to release it?
Hi @tomer-w! I plan to add some docs and release the Redis support tomorrow. @dollev36 is going to start working on Memcached support soon.
Are there any channels available at AWS to let the ElastiCache customers know about the new solution?
This is what I had in mind as well. I think we can help with spreading the existence of this tool to our customers. This is why I want it to be released so I can start sharing it internally and discuss what we can do externally.
Cool! I'll let you know when Redis support is released 🤝
Hey @tomer-w 👋
Elasticache Redis support was released with basti@1.5.0
With the release of basti@1.6.0, we now support Elasticache Memcached natively 🥳
I'm going to add the CLI options and config file reference to README.md
to improve Elasticache support visibility since RDS is used in all the usage examples.
Thank you for your contribution, @dollev36, @tomer-w and @yvashkiv 🤝
@tomer-w, I'd be happy to hear any feedback or feature requests from your internal discussion!
The reference doc was created and some minor README improvements were added in basti@1.6.1
At this point, I consider first-class Elasticache support fully implemented.
Please, feel free to open new issues for any bugs or feature requests if needed! Your feedback is highly appreciated!
Hi @tomer-w! I hope you're doing well!
Do you still plan on implementing this? Is there anything I can help with?
I think we can help with spreading the existence of this tool to our customers. This is why I want it to be released so I can start sharing it internally and discuss what we can do externally.
Hi @BohdanPetryshyn, I left Amazon, so I am no longer in the details of this. Please try @vovagring and @dollev36.
Summary
Currently, users must use the custom connection target approach to connect to Elasticache instances. This involves manually setting up connectivity (at
init
time) and providing Basti with the target's IP and port (atconnect
time). Let's implement first-class support for Elasticache, just like for RDS. This includes:connect
andinit
commandsTODO