Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for connection compression-algorithms #280

Open
i18nsite opened this issue Jan 3, 2024 · 1 comment
Open

add support for connection compression-algorithms #280

i18nsite opened this issue Jan 3, 2024 · 1 comment

Comments

@i18nsite
Copy link

i18nsite commented Jan 3, 2024

https://aws.amazon.com/cn/blogs/database/reduce-network-transfer-time-with-connection-compression-in-amazon-rds-for-mysql-and-amazon-rds-for-mariadb/

The --compress command line option that was available with earlier versions of MySQL client tools has been deprecated as of MySQL 8.0.18. With MySQL client versions prior to 8.0.18, the client supports only the zlib compression algorithm, in addition to uncompressed connections. You cannot specify a compression algorithm or the compression level with this option, so we recommend upgrading to the latest client driver to take advantage of compression.

To set up the connection, both the client and the database server must agree on a mutually permitted compression algorithm. Since Amazon RDS for MySQL supports all 3 compression options, the client can choose any algorithm. Therefore, if you specify multiple options with --compression-algorithms, the first compression algorithm supported by the database server gets picked. For example, if --compression-algorithms=zlib,zstd, then the zlib compression algorithm is picked. If the database server doesn’t support the zlib compression algorithm (which isn’t the case with Amazon RDS for MySQL), then the zstd compression algorithm is picked.

@blackbeam
Copy link
Owner

Hi.

Please note that zlib is supported (just in case you missed it).
Zstd is not yet implemented – blackbeam/rust_mysql_common#38. As you can see it is in backlog since 2021, so PRs are much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants