What is the bind
parameter in Redis? The documentation for bind
assumes that I already know what bind
means (which I don't). Does bind
set the IP address of:
Redis
server? (I think this is the correct answer, but then I don't understand why we need that)It's the redis equivalent of mysql bind-address option and works in exactly the same way.
It binds the redis instance to specific interface (and hence specific ip address).
Basically your redis server will only listen to connections made to the address specified in via the bind
option. This is a security measure that allows for dropping connections not made inside the particular network.
So if you set
bind 127.0.0.1
redis will only accept client connections made to 127.0.0.1 (only local ones).
If you set it to
bind 0.0.0.0
it will accept connection to any address (and hence any connection that can be made to your redis instance) that is used by any interface on the machine where redis is running.
If you set it to any other specific address then redis will expect connections to be made to that specific address and will drop the rest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With