Scenario
An e-commerce platform experiences massive timeouts during a flash sale. Redis cache hit rate drops, RabbitMQ queues pile up, and Kafka consumer lag spikes, degrading user experience.
Symptoms
- API response time jumps from 200ms to 5s
- Redis
keyspace_missesskyrockets (check withINFO stats) - RabbitMQ queue
messages_readygrows continuously - Kafka consumer group
LAGexceeds 10000
Diagnosis
- Redis: Run
redis-cli INFO stats | grep keyspaceto check hit ratio. High misses indicate cache inefficiency. UseMEMORY USAGE <key>to find large keys. - RabbitMQ: Execute
rabbitmqctl list_queues name messages_ready consumersto see if consumers are lacking. Inspect consumer logs. - Kafka: Run
kafka-consumer-groups --bootstrap-server localhost:9092 --group my-group --describeto view per-partition lag. High lag means slow consumption or uneven assignment.
Example Commands
# Redis diagnosis
redis-cli -h <host> -p 6379 INFO stats | grep -E 'keyspace_(hits|misses)'
# RabbitMQ diagnosis
rabbitmqctl list_queues name messages_ready consumers memory
# Kafka consumer lag
kafka-consumer-groups.sh --bootstrap-server <broker>:9092 --group <group> --describe
Risk Controls
- Configure Redis
maxmemorywithallkeys-lrueviction policy - Set RabbitMQ queue
x-max-lengthor TTL to prevent unbounded growth - Implement backpressure in Kafka consumers (e.g., adjust
max.poll.records) - Use Kubernetes HPA to auto-scale consumer pods
Rollback Steps
- Redis: If a Lua script caused the issue, disable it or revert the code.
- RabbitMQ: Delete the piled-up queue (caution!) or migrate consumers to faster instances.
- Kafka: Stop consumers and reset offsets to earliest:
kafka-consumer-groups --reset-offsets --to-earliest - Revert deployment:
kubectl rollout undo deployment/<service>
Verification
- Redis: Use
redis-cli MONITORto observe live requests; hit rate should recover. - RabbitMQ: Queue
messages_readyshould gradually drop to a steady state. - Kafka: Check
LAGreturns to zero and partitions are evenly assigned. - Application: Monitor API latency via Prometheus + Grafana.
When to Submit an OpsGlobal Ticket
- If the above measures fail, or expert tuning is needed (e.g., Kafka partition reassignment).
- If root cause involves complex network partitions or storage failures.
- When 24/7 managed SRE support is required.
Use cases
Useful for teams handling NoSQL issues and needing a clear troubleshooting and delivery workflow.
Problem background
A practical guide to diagnosing and fixing common reliability issues in Redis, RabbitMQ, and Kafka in production, including scenario, symptoms, commands, risk controls, rollback, and verification.
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.