#
Redis - Port 6379
By
#
Concepts
Redis (Remote Dictionary Server) is an open-source, in-memory key-value data store used as a database, cache, and message broker. It consumes high amounts of throughput with low latency access.
Key Technical Details:
- In-Memory: Data resides primarily in RAM, offering sub-millisecond response times.
- Protocol: Uses RESP (Redis Serialization Protocol), a simple text-based protocol that is human-readable and easy to parse.
- Single-Threaded: The core event loop is single-threaded, ensuring atomic operations without complex locking mechanisms.
- Persistence: Supporting RDB (snapshots) and AOF (append-only files) for durability, though often used as an ephemeral cache.
#
Redis-cli
Redis Port --> 6379
redis-cli -h 192.168.1.1
#
Commands
INFOCLIENT GETNAMESERVERSELECT <db-name>
#
Databases access
redis-cli -h 10.129.136.187 --scan --pattern '*'
10.129.136.187:6379> CONFIG GET databases
1) "databases"
2) "16"
10.129.136.187:6379> INFO keyspace
# Keyspace
db0:keys=4,expires=0,avg_ttl=0
You can also use KEYS * to display all the keys in the index
type <key-name>--> Get the type of the keyget <key-name>--> Get the content of the key
