Bạn sẽ build gì
Một app dùng Redis để cache dữ liệu đọc nhiều, lưu session, chống spam bằng rate limit, chạy queue nhẹ hoặc pub/sub. App vẫn deploy bằng Flash Deploy; Redis xử lý dữ liệu tốc độ cao.
Sơ đồ minh họa
Luồng thao tác chính (không phải ảnh Console)
Cache
GET/SET/session
Limits
Commands/bandwidth
Commands
Biết command bị chặn
Redis usage
1Commands 38%
2Bandwidth 22%
3Storage 14%
4Connections healthy
Luồng trên Console
- Tạo Redis database trong Console.
- Lấy private Host/Port cùng Username/Password trong Connection cho app cùng org; dùng public endpoint cho client bên ngoài.
- Thêm `REDIS_HOST`, `REDIS_PORT`, `REDIS_USERNAME`, `REDIS_PASSWORD` vào env của project app.
- Redeploy app để runtime nhận credential mới.
- Kiểm tra Redis metrics: Commands, Bandwidth, Storage và Connections.
- Mở Command reference nếu thư viện Redis báo lỗi command bị chặn.
Vận hành sau deploy
- Cache key nên có TTL để tránh storage tăng mãi.
- Session/rate limit nên dùng prefix rõ ràng để dễ debug.
- Nếu commands/sec tăng đột biến, kiểm tra retry loop hoặc endpoint đang gọi Redis quá nhiều.