Điểm cần nhớ
Sức khỏe Redis được đánh giá bằng tác động nghiệp vụ, headroom và khả năng phục hồi đã diễn tập.
Câu hỏi kiến trúc phải trả lời
- SLI latency/error/hit và origin load
- Memory/CPU/connections/eviction
- Replication/persistence/cluster health
- TLS/ACL/private network
- Failover, flush và restore drill
Cơ chế và quyết định
Dashboard gồm client latency p50/p95/p99, timeout/error, pool wait, hit/miss theo endpoint/key class, DB QPS do miss, used memory/RSS/fragmentation, eviction/expiry, rejected writes, connections, command rate/slowlog, replication lag, persistence status và shard imbalance. Broker xanh nhưng checkout giảm vẫn là incident.
Trade-off cần nói rõ
Capacity theo peak command rate, bytes/sec, node/shard nóng nhất, dataset + growth + TTL, connection từ tổng pod, payload và headroom cho failover/fork/migration. Load test phải dùng key distribution và value size giống production; uniform random sẽ bỏ lỡ hot key.
Failure mode và cách vận hành
Dùng TLS, ACL tối thiểu, private connectivity, rotate secret và chặn lệnh quản trị nguy hiểm theo vai trò. Runbook cần owner, abort condition và cách xử lý cache loss, failover loop, memory full, hot shard, bad key rollout. Diễn tập cache rỗng, network delay, failover và restore; xác nhận correctness cùng tải lên origin.
Checklist review
- Correctness/source of truth và mức stale hoặc mất dữ liệu chấp nhận được đã ghi rõ chưa?
- Timeout, retry, overload, failover và cold start có giới hạn không?
- Có metric cảnh báo sớm, owner, runbook và cách kiểm chứng sau recovery không?
- Con số TTL, memory, connection và throughput đến từ benchmark/workload nào?
Nguồn đối chiếu
AWS — ElastiCache best practices · AWS — Redis OSS connection best practices · Google Cloud — Memorystore best practices · Google Cloud — Memorystore high availability · Microsoft — Azure Managed Redis architecture. Đối chiếu ngày 2026-09-12.
Nguồn nội bộ
Bài này đã tổng hợp lại phần Redis trong
inbox/kien-thuc-sa/kienthucchung.txt; ví dụ và con số luyện tập không được coi là guarantee của sản phẩm.