Open longxice opened 2 months ago
Hi @longxice,
Unfortunately, getting the exact address is impossible currently. Unless we expend the CommandSlice struct https://github.com/redis/rueidis/blob/9a347d752902b16afe2fda0c327fdbee732b3919/internal/cmds/builder.go#L16-L20 and inject destination into the it from here https://github.com/redis/rueidis/blob/9a347d752902b16afe2fda0c327fdbee732b3919/mux.go#L54
But we also need to consider if there is a notable performance impact due to the changes.
Hi @rueian
Thank you for your response.
I hope this feature will be released soon.
Thank you.
Yes, but we don’t have an ETA for this. This could have great impact in terms of performance. I currently have no idea how big it could be.
Also this may related ro https://github.com/redis/rueidis/issues/454.
Hi all,
I would like to use the node address for metrics. That helps to identify which commands are sent to a node in the cluster. However, I don't sure the way to get it.
I intend to get the node address of the executed command as follows: Step 1: Get the key slot by calling
cmd.Slot()
. Step 2: Use reflection to callclusterClient._pick(...)
.However, after executing the command, there may be a hash slot change caused by Redis failover.
Could you point out the correct way?