Skip to content

feat(backend): API & Database Scaling Part 41 (#286)#849

Merged
Wilfred007 merged 2 commits into
Gildado:mainfrom
drips-projects:API-Database-Scaling-Part
May 30, 2026
Merged

feat(backend): API & Database Scaling Part 41 (#286)#849
Wilfred007 merged 2 commits into
Gildado:mainfrom
drips-projects:API-Database-Scaling-Part

Conversation

@Joeloo1
Copy link
Copy Markdown
Contributor

@Joeloo1 Joeloo1 commented May 29, 2026

Summary

  • GET /api/v1/db-scaling/bgwriter-stats — single-row snapshot from pg_stat_bgwriter covering checkpoint frequency (timed vs requested), buffer write counts per writer, backend fsync calls, and checkpoint I/O durations
  • GET /api/v1/db-scaling/database-stats — snapshot from pg_stat_database for the active DB: transaction throughput, buffer cache hit ratio, temporary file usage, deadlock count, and conflict count
  • WebhookService — event dispatch with exponential-backoff retry (up to 4 attempts) and delivery log writes to webhook_delivery_logs
  • OpenAPI spec updated for both new endpoints

Acceptance Criteria

  • API endpoints are functional and tested
  • Proper error responses (5xx via next(err)) are implemented
  • No schema changes — both endpoints query built-in Postgres system views; no migration required
  • Integration tests included: happy path, zero-row fallback, and 500-on-service-error for each endpoint

Closes #731

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Joeloo1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Wilfred007 Wilfred007 merged commit 9e9b799 into Gildado:main May 30, 2026
1 check failed
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.

[BACKEND] Issue #286 - API & Database Scaling Part 41

2 participants