Hacker News new | ask | show | jobs
by gsanderson 1400 days ago
This is great! Potentially the missing piece in the world of "serverless": a serverless SQL database accessible over HTTP with no minimum price. I saw AWS Aurora has a Data API but currently that does have a minimum monthly cost. Fauna is possibly the closest, but that appears to involve translating SQL to its FQL. How stable is the beta?
4 comments

It's 90% there... but not allowing foreign keys [1] (=cascading delete) means that this solution becomes equal with DynamoDB (Serverless + Scale to 0 as well) because products will either be built for it from day one or never support it with a full fledged DB server instance that is 100% up in mind. Unfortunately, didn't find a lot in-between.

[1] https://planetscale.com/docs/learn/operating-without-foreign...

I like foreign key constraints as much as the next guy, but they are hardly the only difference between MySQL and DynamoDB. For example, you should be able to use Rails/Django/Laravel without foreign key constraints, you can use off the shelf SQL clients or BI clients, etc.
I mean I'm using PlanetScale with Prisma ORM on AWS Lambda right now without issue. Unlike many DB providers, PlanetScale supports nearly unlimited connections. I think I saw in their docs they have a soft-limit of something like 250K connections.

I used Aurora Data API before moving off Aurora Serverless (insane pricing) to Prisma and PlanetScale, I don't think I'd go back to the HTTP API as Prisma works very well and I enjoy using it. One downside to Prisma is the DB "engine" is a arch-specific (obviously) binary that is pretty hefty. I want to say ~50MB. That can be a killer in serverless but I was able to work around it without much issue. If I ever wanted to dive into the world of Lambda layers I could probably move it into it's own later (however that still counts towards your max lambda size).

I agree about Aurora Serverless pricing!

Yeah, I think this new thing would be less useful for Lambda as that does support TCP connections. However a HTTP API is required for e.g Cloudflare Workers where you can't create a normal MySQL client. I think that's where this could shine.

We are hearing from some users that the performance with Lambda is really good with the new driver. We are going to do some comparisons soon to see if there is more worth sharing on it too. We are going to do a Twitch stream adding it to a Lambda on Tuesday at 11am CT if you are interested. https://www.twitch.tv/planetscale
Our beta for this is pretty stable. The only real instabilities are around the underlying APIs we use, which is part of why we're not ready to document it just yet.

But the underlying tech is exactly the same as we use for handling traditional MySQL connections, so there isn't anything to fear.

But it doesn't seem to habe serverless/pay-as-you-go pricing.
That's fair and since my use of PlanetScale is very burst-y I do wish there was a cheaper option for the vast majority of the time when I don't need to scale but at $30/mo it's much cheaper than Aurora Serverless and I'm not aware of many other "serverless" db's, let alone cheaper ones (that are still MySQL).
I believe it does. From their pricing page, beyond the included quota it is $1 per billion reads and $1.50 per million writes
We do have pay as you go pricing.
I believe they meant pay-per-use.