I am currently working with Redis and trying to configure it to use I/O threads along with TLS/SSL. According to the Redis documentation, I/O threading is not supported with TLS. However, in my experience, it seems to work without any issues, and there are no warnings at startup.
Here’s my docker-compose.yml configuration:
redis-tls:
image: redis:7.2.5
container_name: redis-tls
ports:
- "6390:6379"
ulimits:
memlock: -1
command:
- "--io-threads 4"
- "--io-threads-do-reads yes"
- "--tls-port 6379"
- "--port 0"
- "--tls-cert-file /tls/server.crt"
- "--tls-key-file /tls/server.key"
- "--tls-ca-cert-file /tls/ca.crt"
volumes:
- ./tls:/tls:ro
My Questions:
- How do io-threads and io-threads-do-reads work in Redis?
- Why is it specified that I/O threads do not work with TLS/SSL in the documentation? What are the technical limitations or reasons behind this restriction?
- Despite the documentation, my setup seems to work. Are there any potential hidden issues or performance impacts that I might face by using I/O threads with TLS/SSL?
Additional Context:
In my opinion, the I/O threads operate like a fan-out: a main thread works and delegates to other threads for writing or reading. However, I don’t understand why TLS cannot work in this configuration. Furthermore, there are no warnings or errors when starting Redis with the above configuration, and everything appears to be functioning correctly.
Any insights or explanations would be greatly appreciated.
Thank you!