Redis stores the last good JSON payload with a TTL so burst traffic to your public HTTPS endpoint reads memory instead of opening a new LAN fetch every time. That protects both the Arduino and your residential router.
Cache policy
- TTL 30–120 seconds matches how “live” the home page needs to feel.
- Stale-while-revalidate: Serve old JSON while async refresh runs if upstream is slow.
- Key per feed URL when multiple garages or benches exist.
Failure modes
If Redis is empty and Arduino is down, return 503 with a clear log line—better than inventing zeros. Site-side handling: debugging stale readings. Relay setup: FastAPI relay setup.
Data flow placement
See step 2 in end-to-end data flow. History still lands in Supabase via history inserts on the website schedule.