Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use local redis client to connect to socket

Tags:

redis

I know if I do redis-cli -h {ip_address} -p {port} I can connect to a specific port/ip but I've set my instance to not listen to any tcp/ip ports instead it listens to local socket.

How can I establish a socket connection with the redis client?

like image 795
Lostsoul Avatar asked Feb 25 '12 14:02

Lostsoul


People also ask

How do I connect to a redis socket?

You can connect from redis-cli or redis-benchmark simply by using the -s option and providing the path of your unix domain socket.

How do I use redis with socket IO?

Migrating from socket.io-redis to @socket.io/redis-adapter in v7, in order to match the name of the Redis emitter ( @socket.io/redis-emitter ). To migrate to the new package, you'll need to make sure to provide your own Redis clients, as the package will no longer create Redis clients on behalf of the user.

What is the use of redis client?

Redis is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.

Does redis use sockets?

The socket. io-redis plugin uses the pub/sub client of the redis server to connect multiple socket.io instances.


1 Answers

You can connect from redis-cli or redis-benchmark simply by using the -s option and providing the path of your unix domain socket.

For instance:

redis-cli -s /tmp/redis.sock redis-benchmark -q -n 10000 -s /tmp/redis.sock 
like image 135
Didier Spezia Avatar answered Sep 22 '22 08:09

Didier Spezia