Service Discovery: Heartbeat Registry & Stale-Cache Failures

A mobile app's backend is rarely one server — it is a cluster of interchangeable microservice instances that a service registry tracks by heartbeat. This simulator renders that registry in 2D: instances sit around a central registry hub, pulse a heartbeat line home on every beat, and change color as their elapsed silence crosses the TTL and 2×TTL thresholds that separate healthy, suspect and down. A client node on the side routes live request particles using its own cached snapshot of "healthy" instances, refreshed only every R seconds — so turning up the crash rate or the cache refresh interval visibly increases how often a request is fired at a node that is already dead, the exact staleness trade-off every client-side service-discovery system has to tune.