twemproxy icon indicating copy to clipboard operation
twemproxy copied to clipboard

Look into support for redis RESP 3

Open TysonAndre opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. Redis clients will eventually use a new protocol for responses (RESP3 instead of RESP2). Currently, twemproxy only supports RESP2 for fragmenting commands, parsing responses, etc.

https://github.com/antirez/RESP3/blob/master/spec.md#the-hello-command-and-connection-handshake https://github.com/antirez/RESP3/blob/master/spec.md

Describe the solution you'd like Twemproxy would need to

  1. Add a placeholder for the redis 6 HELLO command in a way that clients sending different protocol version would not unexpectedly break other clients
  2. Support parsing the new data types in https://github.com/antirez/RESP3/blob/master/spec.md#resp3-overview
  3. Implement support for Streamed aggregated data types or document they're unsupported

And do some combination of the following

  • Force all pools to use a single protocol version. Possibly hardcode that by sending -NOPROTO
  • Use two different connection pools for RESP2 and RESP3. Possibly require clients to connect to different unix sockets.
Client: HELLO 4
Server: -NOPROTO sorry this protocol version is not supported

https://github.com/luin/ioredis/issues/1073

Also start treating HELLO as an alternate way to send AUTH?

See https://redis.io/commands/hello

Additional context RESP3 support was recently added to redis-server 6.0

This will probably allow lua commands to properly return Map data types, haven't tested it.

TysonAndre avatar Aug 10 '21 01:08 TysonAndre