2d76c001fe
Instances were being incorrectly marked DEAD because their Redis key TTL was not being refreshed on heartbeat. HealthMonitor.checkRedisHeartbeat() checks pttl > 0, which fails when the TTL expires even if the instance is alive and sending regular heartbeats. Now pexpire(key, heartbeatTtl) is called on each heartbeat to keep the key alive. Prevents scaling messages from undercounting healthy instances. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>