envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
25.11k stars 4.82k forks source link

envoy redis_proxy can‘t support RESP3 HELLO CMD #17571

Open huntkalio opened 3 years ago

huntkalio commented 3 years ago

Title: envoy redis_proxy can‘t support RESP3 HELLO CMD

Description:

I use a RESP3 redis client(lettuce) to connect envoy redis proxy,I found : 1) if envoy config downstream_auth_password, the use lettuce connect, envoy will return -NOAUTH Authentication required. image

2) if envoy not config downstream_auth_password,then use lettuce connect, envoy will return -unsupported command 'HELLO' image

If I use a RESP3 redis client(lettuce) to connect redis directly , there is no this problem.I think if envoy don't support HELLO,it should return -ERR unknown command 'HELLO' like redis server return , so redis client lettuce can siwtch to RESP2.

Repro steps: 1) use https://github.com/lettuce-io/lettuce-core redis client (java) to connect envoy 2) or use telnet like this [root@hadoop-master envoy]# telnet 127.0.0.1 63799 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. *5 $5 HELLO $1 3 $4 AUTH $7 default $8 foobared

Config: envoy-redis-proxy-HELLO.yml.txt

huntkalio commented 3 years ago

like this issue: https://github.com/lettuce-io/lettuce-core/issues/1543 (this issue not use envoy,but use cloud redis server)

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 3 years ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

antonandreev123 commented 3 years ago

It seems that the issue is here is the fact that envoy redis filter returns incorrect response when HELLO command is issued:

localhost:6379> HELLO
(error) invalid request
localhost:6379>

It's not that HELLO is an invalid request here, but rather it is an unsupported command. We are using lettuce client and it issues HELLO to determine if it should use RESP2 or RESP3 protocols.

Interestingly envoy redis filter returns a different response if HELLO command has an argument:

localhost:6379> HELLO 3
(error) unsupported command 'HELLO'
localhost:6379>
vrajannagari commented 2 years ago

Any workarounds or updates on this, we see a similar issue "io.lettuce.core.RedisCommandExecutionException: unsupported command 'CLUSTER' at io.lettuce.core.ExceptionFactory.createExecutionException(" ?

casperisfine commented 2 years ago

I just had a quick look at what it would take since I just ran into the same issue. Unfortunately it's quite a lot of work:

@mattklein123 since you re-opened and tagged this issue, do you know if it's on anyone's radar?

mattklein123 commented 2 years ago

@mattklein123 since you re-opened and tagged this issue, do you know if it's on anyone's radar?

Not that I know of.

darjisanket commented 2 years ago

We are also facing same issue, any update on this issue.

dorrogeray commented 7 months ago

Just run into this issue when using relay for php. @casperisfine @mattklein123 I think that HELLO command will become more prevalent as various libraries start to support RESP3. For example, it was added to the main branch of predis/predis library at https://github.com/predis/predis/blob/main/src/Connection/Factory.php#L177.

I think this will make it unusable in combination with Envoy..

Any chance this will get adressed on the roadmap in the near future?

caiberun commented 6 months ago

Commands after 6.2 / 7.x are not supported so far. Please seriously consider supporting these as well as we are moving away from Redis 6.x. Please share your thoughts/roadmaps/timelines for this.

zygisa commented 3 months ago

👋 are there any updates on RESP 3 support for Envoy?