twitter / twemproxy

A fast, light-weight proxy for memcached and redis
Apache License 2.0
12.16k stars 2.06k forks source link

Look into support for redis RESP 3 #645

Open TysonAndre opened 3 years ago

TysonAndre commented 3 years ago

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

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.