Workers with Postgres - recommended ways?

There are a number of ways to connect to Postgres from workers. I wonder what are pros and cons of each.
  1. https://developers.cloudflare.com/hyperdrive/
  2. https://developers.cloudflare.com/workers/tutorials/postgres/
    • requires old node_compat mode
  3. Data API (for AWS RDS serverless Aurora v1 (and v2 now?)) - uses HTTP. I believe v1 has some scaling limitations and at least some of which are addressed in v2.
In our particular case we are using RDS for prod and staging/dev.
Cloudflare Docs
Hyperdrive is a service that accelerates queries you make to existing databases, making it faster to access your data from across the globe,
Cloudflare Docs
In this tutorial, you will learn how to create a Cloudflare Workers application and connect it to a PostgreSQL database using TCP Sockets. The Workers
Was this page helpful?