database-js icon indicating copy to clipboard operation
database-js copied to clipboard

CF Hyperdrive support?

Open mostrecent opened this issue 1 year ago • 5 comments

Before you think this is unrelated, the team maintaining this repo is the closest to this topic and is welcome to comment: CF released Hyperdrive for connecting DB w/o the comm overhead, they say:

By maintaining a connection pool to your database within Cloudflare’s network, Hyperdrive reduces seven round-trips to your database before you can even send a query: the TCP handshake (1x), TLS negotiation (3x), and database authentication (3x). [1]

So, my questions:

  1. CF Workers paired with globally read-replicated PS is already fast but I still wonder if you guys do all that handshaking, etc.; I guess you do because your driver is https-based
  2. So, is already a team at PS working with CF on enabling PS through CF Hyperdrive?

More context/motivation: I'd get with PS read-replicas my db nodes closer to CF worker nodes than with Posgres-based providers such as Neon but with latter + Hyperdrive I would save all the comm overhead and could imagine faster perf for most single-query page requests despite having only one location (e.g. US-East) but might be wrong too, so curious about your opinion.

[1] https://developers.cloudflare.com/hyperdrive/get-started/

mostrecent avatar Mar 10 '24 10:03 mostrecent