What does the bind parameter do in Redis?

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.

Tags:

Redis