Skip to content

Comments

feat(connections): add health check endpoint#119

Merged
anoop-narang merged 5 commits intomainfrom
feat/connection-health-check
Feb 16, 2026
Merged

feat(connections): add health check endpoint#119
anoop-narang merged 5 commits intomainfrom
feat/connection-health-check

Conversation

@anoop-narang
Copy link
Contributor

@anoop-narang anoop-narang commented Feb 12, 2026

Summary

  • Add GET /connections/{connection_id}/health endpoint that validates remote database connectivity
  • Each backend (Postgres, MySQL, Snowflake, BigQuery, DuckDB, Iceberg) reuses existing connection code and runs a minimal probe (SELECT 1 or list_namespaces)
  • Always returns HTTP 200 with {connection_id, healthy, error?, latency_ms}; HTTP 404 only for unknown connection_id
  • 10s timeout at the dispatch level prevents hanging on unreachable hosts

@anoop-narang anoop-narang marked this pull request as draft February 12, 2026 12:36
Add GET /connections/{connection_id}/health to validate remote database
connectivity. Each backend reuses its existing connection code and runs
a minimal probe (SELECT 1 or list_namespaces). Returns 200 with
{healthy, error, latency_ms}; HTTP 404 only for unknown connection_id.

Includes a 10s timeout at the dispatch level and a 5s connect_timeout
for Postgres to prevent hanging on unreachable hosts.
The 10s tokio::time::timeout wrapper handles all backends uniformly.
@anoop-narang anoop-narang force-pushed the feat/connection-health-check branch from 5a663ee to f8cc7e9 Compare February 16, 2026 06:05
@anoop-narang anoop-narang marked this pull request as ready for review February 16, 2026 09:58
@anoop-narang anoop-narang merged commit a3db973 into main Feb 16, 2026
8 checks passed
@anoop-narang anoop-narang deleted the feat/connection-health-check branch February 16, 2026 09:59
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