Skip to content

Feature Request: zstd connection compression support in vtgate #19458

@wiebeytec

Description

@wiebeytec

Feature Description

MySQL supports connection compression. Zlib in older versions (pre 8?), zstd in newer. Having support in vtgate so that any MySQL client can use it would be benificial.

Only zstd is probably the useful one to support.

On a plain mysql, it looks like:

# mysql --compression-algorithms=zstd

mysql> \s
--------------
mysql  Ver 8.0.45-0ubuntu0.24.04.1 for Linux on x86_64 ((Ubuntu))

Connection id:          891377
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         8.0.45-0ubuntu0.24.04.1 (Ubuntu)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    utf8mb4
Conn.  characterset:    utf8mb4
UNIX socket:            /var/run/mysqld/mysqld.sock
Protocol:               Compressed
Binary data as:         Hexadecimal
Uptime:                 7 days 4 hours 47 min 27 sec

Use Case(s)

Save hundreds of megabits per second of traffic per gate (this indeed was the reduction for us before we switched to Vitess). Not only is traffic a real cost in hosting environments, it's also easy to exhaust network capacity before other system resources.

Metadata

Metadata

Assignees

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions