Scenario
During a flash sale, an e-commerce order processing system slows down. Alerts show Redis memory spiking, RabbitMQ queue depth soaring, and Kafka consumer lag growing.
Symptoms
- Redis: Client connections timeout;
INFO statsreveals evicted_keys skyrocketing, memory usage near limit. - RabbitMQ: Messages pile up;
rabbitmqctl list_queuesshows high unacknowledged count; disk write I/O wait increases. - Kafka: Consumer group lag (
kafka-consumer-groups --describe) keeps rising; consumer logs report "Rebalance in progress".
Diagnosis
- Redis: Run
redis-cli info memoryto check fragmentation ratio and eviction policy. Useredis-cli --bigkeysto find large keys. If many temporary keys lack TTL, memory leak is likely. - RabbitMQ: Run
rabbitmqctl list_queues name messages_ready messages_unacknowledged consumers memoryto pinpoint blocked queues. Check disk space viarabbitmqctl eval 'rabbit_disk_monitor:get_disk_free_list().'. If persistent messages accumulate, consumers may be slow. - Kafka: Monitor incoming rate with
kafka-run-class.sh kafka.tools.JmxTool --object-name kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec. Check partition assignment withkafka-consumer-groups --describe --members --verbose. Frequent rebalances can starve consumers.
Useful Commands
# Redis
redis-cli info stats | grep evicted_keys
redis-cli -h <host> -p <port> --bigkeys
# RabbitMQ
rabbitmqctl list_queues name messages_ready messages_unacknowledged consumers memory --no-table-headers
rabbitmqctl set_policy ha-all ".*" '{"ha-mode":"all","ha-sync-mode":"automatic"}'
# Kafka
kafka-consumer-groups --bootstrap-server localhost:9092 --group order-group --describe
kafka-topics --bootstrap-server localhost:9092 --describe --topic orders
Risk Controls
- Redis: Set
maxmemory-policy allkeys-lru(non-blocking). Avoid large keys (>1MB). Use Sentinel or Cluster for HA. - RabbitMQ: Configure mirrored queues for HA. Limit queue length (
x-max-lengthorx-max-length-bytes). Set consumer prefetch count to 1 to prevent overload. - Kafka: Tune
session.timeout.msand heartbeat interval for rebalance. Use sticky partitioner to reduce rebalances. Monitor consumer lag with alerts.
Rollback
- Redis: If AOF rewrite causes lag, disable it temporarily (
CONFIG SET auto-aof-rewrite-percentage 0), rewrite manually later. If memory exhausted, scale up or use swap (not recommended for production). - RabbitMQ: Pause producers (e.g., via circuit breaker) to let consumers drain. If disk full, migrate queues to healthy nodes (
rabbitmqctl set_cluster_name ha). - Kafka: Add more consumer instances or adjust
fetch.min.bytes. If replicas out of sync, setmin.insync.replicasto 1 temporarily (high risk, cautious).
Verification
- Redis:
redis-cli pingreturns PONG;redis-cli info commandstatsshows normal latency. - RabbitMQ:
rabbitmqctl statusshows running;rabbitmqctl list_queuesqueue depth normalizes. - Kafka:
kafka-consumer-groups --describeLAG near zero; no errors in consumer logs.
When to Submit an OpsGlobal Ticket
Escalate when internal team cannot recover despite following steps: - Persistent hardware faults (disk failure, network partition). - Need advanced data recovery (corrupted RDB repair). - Large-scale cluster performance tuning (e.g., too many partitions causing controller bottleneck). - Lack of specific middleware expertise (e.g., RabbitMQ cluster split-brain resolution).
OpsGlobal SRE team provides 24/7 remote support including real-time troubleshooting, architecture optimization, and disaster recovery planning.
Use cases
Useful for teams handling NoSQL issues and needing a clear troubleshooting and delivery workflow.
Problem background
A production-grade walkthrough of diagnosing and resolving reliability issues in Redis, RabbitMQ, and Kafka, including symptoms, commands, risk controls, rollback, verification, and when to escalate to OpsGlobal.
Troubleshooting steps
Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.
Command examples
Replace sample resource names with real values and store passwords, tokens and keys in environment variables.
Risks
Before production changes, confirm backups, access boundaries, change windows and rollback paths.
Rollback plan
Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.
Deliverables
Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.
Need help with a similar technical issue?
If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.