_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

The Complete Guide to Redis

23. 10. 2025 1 min read intermediate

Redis je in-memory data store. Ultra rychlý. Nenahraditelný.

Základní operace

SET key “value” EX 3600 # s expirací
GET key
DEL key
EXISTS key
TTL key

Datové struktury

Strings

INCR counter
INCRBY counter 5

Hash

HSET user:1 name “Jan” email “[email protected]
HGETALL user:1

List

LPUSH queue “task1”
RPOP queue

Set

SADD tags “python” “devops”
SMEMBERS tags

Sorted Set

ZADD leaderboard 100 “player1” 200 “player2”
ZREVRANGE leaderboard 0 9 WITHSCORES

Use cases

  • Cache — nejčastější, SET/GET s TTL
  • Sessions — user session storage
  • Rate limiting — INCR + EXPIRE
  • Queue — LPUSH + BRPOP
  • Pub/Sub — real-time messaging
  • Leaderboard — Sorted Sets

Persistence

  • RDB — point-in-time snapshot
  • AOF — append-only file (durabilnější)
  • RDB + AOF — doporučeno pro produkci

Cluster

Redis Cluster pro horizontální škálování. Automatický sharding a failover.

Pravidlo

Redis je cache, ne primární databáze (s výjimkami). Vždy mějte fallback na primární storage.

rediscachedatabáze
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.