Skip to content

improvement: decrease gateway health check interval for HA#231

Open
saifsmailbox98 wants to merge 1 commit into
mainfrom
saif/eng-4870-decrease-gateway-health-check-interval
Open

improvement: decrease gateway health check interval for HA#231
saifsmailbox98 wants to merge 1 commit into
mainfrom
saif/eng-4870-decrease-gateway-health-check-interval

Conversation

@saifsmailbox98
Copy link
Copy Markdown
Contributor

Description 📣

Reduces gateway heartbeat interval from 30 min to 3 min so the backend can detect dead gateways within 5 minutes for pool load balancing.

Companion Infisical PR: Infisical/infisical#6432

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

Companion to the backend/frontend change that lowers the heartbeat
timeout from 1 hour to 5 minutes for faster gateway health detection
in load balancing and HA deployments.
@linear
Copy link
Copy Markdown

linear Bot commented May 12, 2026

ENG-4870

@infisical-review-police
Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-cli-231-improvement-decrease-gateway-health-check-interval-for-ha

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — straightforward interval constant change to enable faster dead-gateway detection.

Extended reasoning...

Overview

This PR changes a single constant in packages/gateway-v2/gateway.go: the regular heartbeat ticker in registerHeartBeat goes from 30 * time.Minute to 3 * time.Minute, with the adjacent comment updated to match. No other logic or control flow is affected.

Security risks

None. The heartbeat call (api.CallGatewayHeartBeatV2) and authentication path are unchanged — only the cadence of an already-existing authenticated call is increased. No new endpoints, code paths, or data exposure.

Level of scrutiny

Low. This is a tuning parameter change motivated by HA / pool load balancing requirements documented in the linked companion backend PR (Infisical/infisical#6432). The trade-off (≈10× more heartbeat traffic per gateway) is a routine operational decision the team has explicitly made.

Other factors

  • Phase 1 retry behavior (10s until first success) is untouched, so startup semantics don't change.
  • The Phase 2 ticker is the only consumer of this value; no other code references the old 30-minute interval.
  • No tests required for a constant change of this nature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant