Search code examples
yugabytedb

YugabyteDB YSQL inter-node compression


[Question posted by a user on YugabyteDB Community Slack]

Question about YB and compression. We want to use the ysql connector, does it support SSL compression like vanilla PostgreSQL? Postgres allows compression using OpenSSL zlib, some DB vendors block this (RDS) I was wandering if it's supported by YB? Moving to YB will introduce new traffic costs for inter-node communication that we don't face at the moment. I was thinking of ssl compression as a workaround, but it will probably limit our ability to migrate.


Solution

  • From the PostgreSQL docs:

    SSL compression is nowadays considered insecure and its use is no longer recommended. OpenSSL 1.1.0 disables compression by default, and many operating system distributions disable it in prior versions as well, so setting this parameter to on will not have any effect if the server does not accept compression.

    If security is not a primary concern, compression can improve throughput if the network is the bottleneck. Disabling compression can improve response time and throughput if CPU performance is the limiting factor.

    PostgreSQL 14 disables compression completely in the backend.

    Usually, the bottleneck in our case is the CPU, so it probably won't help. And I think compression is done AFTER encryption so it won't help a lot.

    Inter-node compression is supported and enabled by default: https://docs.yugabyte.com/preview/reference/configuration/yb-tserver/#network-compression