r/Supabase • u/Savings-Feedback6581 • 16h ago
Self-hosting What if your existing PostgreSQL database had its own HTTP API?
I have been working on HTTP Postgres, an open source project that allows you to run SQL queries against your PostgreSQL database over HTTP.
The concept is very simple. Rather than running TCP connections to the database from serverless functions or edge runtimes, you deploy a small gateway along with your PostgreSQL that takes care of connections for you.
Unlike PostgREST, which gives you access to your database via REST endpoints, my goal with this project is executing raw and parameterized SQL over HTTP.
Some of the features available today include:
- PostgreSQL connection pooling
- Parameterized queries and transactions
- Scoped API keys
- Rate limiting and IP allowlisting
- Query analytics and operational metrics
- Optional Redis integration
- Graceful overload handling
It is fully self-hosted and connects to your existing PostgreSQL database.
This is neither a replacement of PostgreSQL nor Supabase, it just makes PostgreSQL available over another transport layer.
Website & Documentation: https://http-postgres.js.org/
GitHub: https://github.com/http-postgres/http-postgres
I am really curious to know what do you think of such an approach, specifically from serverless and edge developers point of view?
What is stopping you from using something like that?