Po

PostgreSQL in a virtual private cloud on Heroku

Hacker News

PostgreSQL in a virtual private cloud on Heroku

Having used Heroku extensively at my previous job I became aware of what I perceived to be a major drawback of database add-ons in Heroku's marketplace: they all seem to allow connections directly from the public internet (or at least from anywhere on AWS's network) for the sake of convenience for app developers (and probably the add-on developers too!). That way, an app developer need only to retrieve the DB connection URL from the corresponding config variable (i.e. environment variable) in application code to connect to the DB. But leaving DB servers exposed to the whole world seems a clear violation of security best practices. Heroku has a solution to this problem, of course: Private Spaces. In a private space, your app's dynos and some of its add-ons are hosted together within a virtual private cloud (VPC) that is firewalled off from the rest of the internet. It comes with a couple important caveats, however: you have to have a Heroku Enterprise account (which is expensive and requires you to give up the option to use some of the cheaper dyno types) and it only supports a handful of select add-ons (only first party, it seems) to be sequestered within the app's VPC. My new add-on service aims to provide an alternative that sits somewhere between the extreme simplicity and relative inexpensiveness of DB add-ons running on the Common Runtime and the considerably more expensive Private Spaces while offering a similar level of security as Private Spaces. It's called Borealis Isolated Postgres and it's in beta now (the beta is free): https://elements.heroku.com/addons/borealis-pg With my add-on, each DB server is in a PostgreSQL-compatible Amazon Aurora cluster isolated within its own VPC. All connections to a DB server are required to be forwarded through an SSH server that is dedicated to that VPC. So how does an app connect? I wrote a Heroku buildpack to take care of that seamlessly (https://github.com/OldSneerJaw/heroku-buildpack-borealis-pg-ssh). When you add the buildpack to an app, it automatically identifies any config variables from my add-on and sets up a persistent SSH local port forwarding connection to the database server using autossh. The app can then connect to the database via a standard PostgreSQL client library using the add-on's DATABASE_URL config variable without having to be aware of the SSH connection. In other words, application code doesn't have to change at all to support it. If an app works with the first-party Heroku Postgres add-on, it should work with my add-on, too. Connecting from your local machine or a CI server to a database server is also straightforward. I wrote a Heroku CLI plugin (https://www.npmjs.com/package/borealis-pg-cli) with a couple simple commands to either run DB scripts (e.g. DB migrations to be executed during CI/CD) or open a persistent tunnel locally (e.g. for ad hoc data administration). It also has a few commands for managing which PostgreSQL extensions/modules are installed since the app user does not have privileges to do so in SQL (remember, it's a managed DB service). During the beta all add-ons are provisioned in a multi-tenant environment to keep costs down, but when released into general availability, each premium add-on will operate in its own fully isolated VPC that is only accessible via private SSH server. I have not yet decided whether I will continue to provide a free, multi-tenant option after GA, though. If you're already a Heroku user, you can provision the add-on directly (for free) here: https://dashboard.heroku.com/provision-addon?addonServiceId=de00ba11-8b65-47cd-b099-9605703a6e30 Docs are here: https://devcenter.heroku.com/articles/borealis-pg#getting-started Let me know what you think!

Share card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: supports, started, compatible · Missing: reddit linkedin, podcasting, created
90%90% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: mac, user, new · Missing: agents, macos, agent
67%67% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
60%60% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
44%44% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: host · Missing: plus, platform, intuitive
33%33% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Ka
Kafka FDW for PostgreSQL65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kafka FDW for PostgreSQL

Hacker News2
es
es2postgres – ElasticSearch to PostgreSQL Loader71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

es2postgres – ElasticSearch to PostgreSQL Loader

Hacker News3
Me
Metagration: PostgreSQL Migrator in PostgreSQL56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Metagration: PostgreSQL Migrator in PostgreSQL

Hacker News1
PR
PRQL in PostgreSQL73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PRQL in PostgreSQL

Hacker News267
Cl
Cloud Infrastructure as Data in PostgreSQL61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cloud Infrastructure as Data in PostgreSQL

Hacker News2
PG
PGLite – PostgreSQL in the Browser72%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PGLite – PostgreSQL in the Browser

Hacker News4
Gi
GitGres – A private GitHub in 650 lines of PostgreSQL62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

GitGres – A private GitHub in 650 lines of PostgreSQL

Hacker News1
Ka
Kallax a PostgreSQL Typesafe ORM for the Go Language75%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kallax a PostgreSQL Typesafe ORM for the Go Language

Hacker News17
SS
SSO for PostgreSQL Using OAuth2/OIDC58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SSO for PostgreSQL Using OAuth2/OIDC

Hacker News1
Pl
Play Battleships on PostgreSQL50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Play Battleships on PostgreSQL

Hacker News96