Skip navigation
Cloudflare Workers and Hyperdrive with PlanetScale is like tomato and basil.
0:00 / 5:06

Cloudflare Workers and Hyperdrive with PlanetScale is like tomato and basil.

Jilles Soeters

@Jilles4.1K followers

Visit on X
144 likesDownloadOriginal post

12,681 views

Cloudflare Workers and Hyperdrive with PlanetScale is like tomato and basil. But how does it work? What is the problem it's solving? See it in action, and how to create a new PlanetScale database right from the Cloudflare Dashboard. Billed through Cloudflare. In 5 minutes.

18 Comments

Comments from the original post on X (Twitter)

  • Fayi's profile picture

    @fayimora

    I don't know how you ended up on my timeline as I only use cloudflare for domain/dns/security type stuff, but I have been really enjoying your content over the last 2 days (I watched the old stuff too). I'll give cloudflare workers(and related services) another go.

    2 likes

  • Jilles Soeters's profile picture

    @Jilles

    Appreciate that!!!!

    2 likes

  • Fayi's profile picture

    @fayimora

    Is planetscale the only option for the pg db?

  • Jilles Soeters's profile picture

    @Jilles

    No you can use any MySQL/Postgres database. Even in VPCs on AWS using Workers VPC. But I personally think PlanetScale is the best option for price, performance and scalability.

  • Fayi's profile picture

    @fayimora

    Thanks for the info. Planetscale probably makes sense for a new db/project, but I don't have the energy/capacity for any db migrations right now haha

  • orlie's profile picture

    @sunglassesface

    @kristianfreeman Damn even my fat brain understood this video! Amazing recap of how it works

  • Jilles Soeters's profile picture

    @Jilles

    @kristianfreeman Bro you have a dope AI start up, that brain of yours is excellent BUT APPRECIATE IT

    1 like

  • StopForumSpam's profile picture

    @StopForumSpam

    i cant wait for hyperdrive support to be added to emdash

  • ateeb a.'s profile picture

    @atybdot

    im interested in "intelligent" part of 'intelligently cache your queries' can you explain me how??

  • Jilles Soeters's profile picture

    @Jilles

    When you write an SQL query it can be parsed as an AST. From that you can infer whether a query can be cached (select * from products) vs when it can’t (insert into … / select * where x < NOW()) I’m not sure about the exact implementation, but that’s my understanding

    1 like

  • ateeb a.'s profile picture

    @atybdot

    Yeah i know that they are only caching select queries But how about filters?? Are they caching queries with every filter too?? Like select x from table where id=e, since= some date etc . How does their query engine decide which select query to cache?

  • Jilles Soeters's profile picture

    @Jilles

    My understanding is every query until you hit Maybe @thomasgauvin can give you a better answer

    2 likes

  • Vibemak's profile picture

    @vibemak

    planetscale is great, I might try later on. I currently have VPS server which have plenty space for postgresql db setup, so whether means I could use hyperdrive to connect the postgresql service ran from my vps. I just want to avoid the D1 which pricing based on rows read.

  • EJ Campbell's profile picture

    @ejc3

    I don't get it. Why wouldn't I just want to connect to a worker in the same AWS data center as my database?

  • konrad's profile picture

    @kalembakonrad

    my planetscale db have read replicas, but hyperdrive connects to the primary instance only so how to make use of them?

  • Russian Bot's profile picture

    @russ1anbot

    Neat product but sounds like a debugging nightmare.

  • Max Kupriianov's profile picture

    @its_xlab

    Sooo the hard requirement there is a worker, right? Any way to use hyperdrive without spawning a worker, like, from a VPS?

  • Jilles Soeters's profile picture

    @Jilles

    @xlab_os It wouldn’t make much sense from a VPS because you can connection pool already. The query caching also isn’t super useful in that case because you handle requests at your origin anyway.

    3 likes