You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a production machine we frequently have 2 NICs. Since there is no way (apparently) to configure the slaves that are being written in the background to use a different NIC, it is very possible to have replication going over the same NIC as client requests even though another NIC is available. This potentially slows down client requests and responses.
I'd like to see a cluster configuration value that specifies which NIC to use for client requests and which for replication.
It's a question of specifying the outgoing traffic, not the incoming traffic. And in both cases, during failover the software needs to be aware to stop listening on one NIC and start listening on the other. The master reads client requests from NIC1 and sends slave replication data through NIC2. Slaves receive traffic on NIC2 and if the slave becomes the master then it needs to switch over to use NIC1 for the clients. And all the other redis instances need to know this too.
Just to get terminology correct: listening happens on IP addresses, not interfaces, right?
What do you mean by:
during failover the software needs to be aware to stop listening on one NIC and start listening on the other
During failover over what? If the software or server has failed, then there's nothing to failover with regard to accepting new connections. (Also, all the IPs Redis listens on accept every kind of operation, so any available address can do all actions.)
It's a question of specifying the outgoing traffic, not the incoming traffic.
Redis uses the first bind IP as the source for server-originated (replication, clustering) traffic. So, I think you can mostly get the behavior you need by specifying your internal cluster/replication IP first then the regular client IP address second.
If you give Redis "bind [cluster-communication-ip] [client-communication-ip]" then all cluster and replication will happen from the first listed IP. Redis won't originate any traffic from the second IP, but it will accept any commands sent to it from the second IP.
it needs to switch over to use NIC1 for the clients.
All Redis IPs can be used for any operation, so there shouldn't need to be any switching necessary that I can think of?
"All Redis IPs can be used for any operation" that's the point. I'm looking to physically partition the client and slave traffic so there is no interference in the client traffic. All client traffic goes in and out through one NIC and all slave replication traffic goes out through another. The slave only gets incoming master replication traffic on the 'configured' slave replication NIC/IP:port. Nothing comes though the slave 'client' port. When the slave is promoted to master, the client NIC/IP:port is used and the replication NIC is used to send replication data. What was an incoming NIC for the slave has now become an outgoing replication NIC for the master.
I don't think specifying a 'bind' address is good enough if client traffic can spill over to either NIC.
Nothing comes though the slave 'client' port. When the slave is promoted to master, the client NIC/IP:port is used and the replication NIC is used to send replication data.
Yup, that's exactly how Redis works now with the multiple-IP bind setup (it's just not very explicit in the configuration).
I don't think specifying a 'bind' address is good enough if client traffic can spill over to either NIC.
Terminology lapse again. What does "spill over" mean here?
Clients could use either IP address, but that's more of a configuration issue with your clients than a Redis permission issue. If your clients are configured only to talk to the client-serving IP address, there's no way client traffic will enter the primary replication/cluster IP address.
I think you've answered it now. By spill over I mean that the clients can use either incoming port but I want to restrict that.
If replication data can be restricted to only effectively using one of the NIC's, and during transition from slave to master that restriction is applied, and it's different than the usual client NIC, then that is the functionality I'm looking for.
It would be nice if it was written up as to how to do this in a more explicit way but I'm good for now.
Looks like something we want an explicit documentation for at redis.io: Multiple NICs configurations. This is a big use case, basically many high traffic users discovered soon or later that single NIC setup is a bottleneck.
documentation for at redis.io: Multiple NICs configurations.
On the ML someone pointed out Redis can't support replication-only interfaces when used with Sentinel because Sentinel will announce the replication-only interface to clients too.
Whoops.
So Redis may need a new config option for "replication-only-interface" versus "client-only-interface." Sentinel can still use and advertise the client IP addresses, but the individual instances will know to use the replication-only interface to initiate replication/cluster-bus communication. (And Redis could potentially deny SYNC/PSYNC requests from the client-only interface.)
A thought: if "replication-only-interface" and "client-only-interface" are set in a master, then it makes sense to impose the requested restriction. But in a slave it may be OK to ignore these values and use both NICs the same. If the slave becomes a master then the restriction would be applied again.
I'd like to take this one (Enable cluster slave back channel tuning). I'll dig into the root cause and follow up with a PR shortly. (claiming via @LeonxLJX)
Activity
mattsta commentedon Oct 28, 2014
Is this the same as https://groups.google.com/forum/#!topic/redis-db/DTNjNOQMjoY?
allanwax commentedon Oct 28, 2014
I believe this is the same idea but in this case I'm looking to have the traffic physically go through two different pieces of hardware.
mattsta commentedon Oct 28, 2014
Well, it just requires specifying an IP address on the other interface, right?
allanwax commentedon Oct 28, 2014
It's a question of specifying the outgoing traffic, not the incoming traffic. And in both cases, during failover the software needs to be aware to stop listening on one NIC and start listening on the other. The master reads client requests from NIC1 and sends slave replication data through NIC2. Slaves receive traffic on NIC2 and if the slave becomes the master then it needs to switch over to use NIC1 for the clients. And all the other redis instances need to know this too.
mattsta commentedon Oct 28, 2014
Just to get terminology correct: listening happens on IP addresses, not interfaces, right?
What do you mean by:
During failover over what? If the software or server has failed, then there's nothing to failover with regard to accepting new connections. (Also, all the IPs Redis listens on accept every kind of operation, so any available address can do all actions.)
Redis uses the first
bindIP as the source for server-originated (replication, clustering) traffic. So, I think you can mostly get the behavior you need by specifying your internal cluster/replication IP first then the regular client IP address second.If you give Redis "bind [cluster-communication-ip] [client-communication-ip]" then all cluster and replication will happen from the first listed IP. Redis won't originate any traffic from the second IP, but it will accept any commands sent to it from the second IP.
All Redis IPs can be used for any operation, so there shouldn't need to be any switching necessary that I can think of?
allanwax commentedon Oct 28, 2014
"All Redis IPs can be used for any operation" that's the point. I'm looking to physically partition the client and slave traffic so there is no interference in the client traffic. All client traffic goes in and out through one NIC and all slave replication traffic goes out through another. The slave only gets incoming master replication traffic on the 'configured' slave replication NIC/IP:port. Nothing comes though the slave 'client' port. When the slave is promoted to master, the client NIC/IP:port is used and the replication NIC is used to send replication data. What was an incoming NIC for the slave has now become an outgoing replication NIC for the master.
I don't think specifying a 'bind' address is good enough if client traffic can spill over to either NIC.
mattsta commentedon Oct 28, 2014
Yup, that's exactly how Redis works now with the multiple-IP bind setup (it's just not very explicit in the configuration).
Terminology lapse again. What does "spill over" mean here?
Clients could use either IP address, but that's more of a configuration issue with your clients than a Redis permission issue. If your clients are configured only to talk to the client-serving IP address, there's no way client traffic will enter the primary replication/cluster IP address.
allanwax commentedon Oct 28, 2014
I think you've answered it now. By spill over I mean that the clients can use either incoming port but I want to restrict that.
If replication data can be restricted to only effectively using one of the NIC's, and during transition from slave to master that restriction is applied, and it's different than the usual client NIC, then that is the functionality I'm looking for.
It would be nice if it was written up as to how to do this in a more explicit way but I'm good for now.
mattsta commentedon Oct 28, 2014
I'll look into writing up this configuration somewhere. Thanks for all the details!
antirez commentedon Oct 31, 2014
Looks like something we want an explicit documentation for at redis.io: Multiple NICs configurations. This is a big use case, basically many high traffic users discovered soon or later that single NIC setup is a bottleneck.
mattsta commentedon Oct 31, 2014
On the ML someone pointed out Redis can't support replication-only interfaces when used with Sentinel because Sentinel will announce the replication-only interface to clients too.
Whoops.
So Redis may need a new config option for "replication-only-interface" versus "client-only-interface." Sentinel can still use and advertise the client IP addresses, but the individual instances will know to use the replication-only interface to initiate replication/cluster-bus communication. (And Redis could potentially deny SYNC/PSYNC requests from the client-only interface.)
allanwax commentedon Nov 24, 2014
A thought: if "replication-only-interface" and "client-only-interface" are set in a master, then it makes sense to impose the requested restriction. But in a slave it may be OK to ignore these values and use both NICs the same. If the slave becomes a master then the restriction would be applied again.
Again, just a thought.
Update RedisTimeSeries module to v8.9.90 (#15476)
LeonxLJX commentedon Sep 1, 2026
I'd like to take this one (
Enable cluster slave back channel tuning). I'll look into the root cause and follow up with a PR. (claiming via @LeonxLJX)LeonxLJX commentedon Sep 1, 2026
I'd like to take this one (
Enable cluster slave back channel tuning). I'll look into the root cause and follow up with a PR. (claiming via @LeonxLJX)LeonxLJX commentedon Sep 1, 2026
I'd like to take this one (
Enable cluster slave back channel tuning). I'll dig into the root cause and follow up with a PR shortly. (claiming via @LeonxLJX)Update RedisTimeSeries to version 8.11.90 (#15969)