Mysql – Impact of replication compression & encryption on performance, traffic

compressionencryptionMySQLperformancereplication

  1. What is the impact of MySQL compressed-slave-protocol on replication traffic?

    According to High performance MySQL it can lower the traffic to a third of the same replication without the compression. Can you give me something more accurate (more information on this topic)?

  2. What about SSL encryption? It will surely enlarge every single packet, I am not sure how much of an impact it will have on the overall traffic though.

  3. What about performance?

Best Answer

I like this presentation by Giuseppe Bianchi. Starting on page 5 it contains a desctiption of the TLS protocol - segment size, header size, HMAC overhead. As for the handshake, the impact on replication should be negligible. It will only occur on connection, and there may be a key exchange going on every hour, depending on the configuration. As for the compression, I'd go with what the book says. Or you can try gzipping your binlog file, as the ratio will likely be application-specific. (This may not be accurate if the compression is initialized per packet, not once for the replication stream.) On performance - type "openssl speed" in the command line, you'll get a benchmark of the throughput of different ciphers on your computer. Find the relevant ones and calculate the utilization given the throughput you expect from the replication stream.