Databáze
Redis Clustering
Redis Cluster sharduje data přes 16384 hash slotů.
Setup
redis-cli --cluster create \
10.0.1.1:6379 10.0.1.2:6379 10.0.1.3:6379 \
10.0.1.4:6379 10.0.1.5:6379 10.0.1.6:6379 \
--cluster-replicas 1
Operace
redis-cli -c -h 10.0.1.1
CLUSTER INFO
CLUSTER NODES
Omezení
- Multi-key ops → hash tags {user}:1
- Transakce jen v jednom slotu
- Sentinel — HA bez shardingu
- Cluster — HA + sharding
- Managed — ElastiCache, Azure Cache
Cluster pro scale
Sentinel pro HA, Cluster pro horizontální škálování.