10 ms·
Prisma Postgres – Runs on bare metal and unikernels
- FridgeSeal 2y agoNice, this is very cool. Very much of the opinion that the Unikernel stuff (and especially what UniKraft are offering) is being massively slept on.
- hardwaresofton 2y agoIt absolutely is -- to be fair the previous versions of Unikraft weren't quite easy or maybe ready for wide consumption, but they took some funding and at the very least their marketing and documentation massively improved. Hugely impressive. A little weird that they say "no cold start" versus... "minimal cold start". Cold starts in milliseconds != no cold starts, though I get it -- marketing is marketing and it's not wrong enough to be egregious :) That said, super excited that someone has built a huge complex database like Postgres on Unikraft. Been a while since I kicked the tires on Unikraft but looks like it's time to do it again, because this isn't the only software that could use this model, given an effective unikernel stack.
- eampiart 2y agoSo nice to hear some of you just as excited about unikernels as we are! Re: zero/minimal cold-start... Technically, you're right, though I'd say if you don't notice it's there, it's as good as not even being there. :) You get the pragmatism though, appreciate it. Lots of cool stuff coming for Prisma Postgres that all this tech enables, looking forward to keep telling you all about them.
- sorenbs 2y agoIt's not every day you get to launch a hosted Postgres service that has something fundamentally new to offer. That's what we have done with Prisma Postgres, and I'm incredibly excited for it. We are using Firecracker and unikernals to deliver true scale-to-zero without cold-starts. Happy to go into more detail if anyone is interested.
- ilkhan4 2y agoWow, I thought you guys were just reselling Neon like some others. This is genuinely impressive technically. It's got me looking at Unikraft Cloud for other stuff too. That said, do you plan do offer branching or any other features that Neon offer? I think that's their big selling point along with separate billing for compute and storage.
- gniting 2y agoPrisma team member here... Yes, when we go GA, we'll offer features that'll give you the comfort of wanting to run your production loads on Prisma Postgres!
- andric 2y agoCongrats on the launch! I’m a bit confused about the pricing. The docs and pricing pages on your website don’t seem to outline how the pay-as-you-go pricing will work. Is this still being figured out?
- eampiart 2y agoEssentially, you pay for database queries and events, with 60'000 included for free, which is plenty for experimenting and small projects. Price per million queries/events is then based on the plan you're subscribed to, and with Starter you have zero monthly fixed costs and only pay for queries and events above 60'000. No CPU-time and similar that's usually hard to grok. Take a look at the Accelerate and Pulse pricing details. Prisma Postgres comes bundled with these, so the pay-as-you-go pricing is the same: https://www.prisma.io/pricing#accelerate https://www.prisma.io/pricing#accelerate We'll continue to make improvements to the pricing on the way to General Availability to make it both as easy to understand and affordable as possible.
- robertclaus 2y agoIf pricing is only done by storage limits, egress and query count (but not resource usage) how do you prevent something like a massive cross join with an aggregation from just running for ages on a single query?
- JamesMck 2y agoAmazing tech! Well done Prisma team!
- deleted 2y ago[deleted]
- iyn 2y agoCongrats on the launch, this looks very interesting! Will it ever be possible to self-host Prisma Postgres (or Pulse)? It's great that I can use your platform, but if I adopted e.g. Pulse, that's a non-trivial vendor lock in. I'd feel _much_ safer/confident building my app around the Prisma stack (besides the ORM, which I like).
- gniting 2y agoSelf-hosting for Prisma Postgres, Pulse, and Accelerate isn’t currently on the agenda. Our focus is on building Prisma into a company that gives developers the best tools for working with data. We handle a lot of the underlying complexity, abstracting it away to make the developer experience seamless so that teams can concentrate on building their applications rather than worrying about infrastructure—just as we do with databases and the Prisma ORM. Your point about concerns around vendor lock-in is completely valid, and we get it. However, we're confident that our approach with the ORM, along with the trust we’ve built with the community, will set the stage for us to develop long-term commercial products that are fit for serious, production-ready deployments.
- iyn 2y agoThanks for clarification, that makes sense. Just to give you a bit more context, I've been evaluating CDC (change data capture) tooling and Prisma Pulse was one of the options. My primary data storage is Postgres but I have a need to react when data in some tables is changed (depending on some user-provided filters). I'm currently handling that with naive message push to SQS, because Debezium/Kafka setup is too expensive/complex. Prisma Pulse looks great, but that CDC part of my app is crucial and I need an option to be able to host it myself/on premises for some customers. However I totally understand the need to build a moat — good luck on your journey!
- gniting 2y ago> because Debezium/Kafka setup is too expensive/complex Totally get that. Many of our users like Pulse because of that. > I need an option to be able to host it myself/on premises for some customers. Completely understand the need and thanks for the wishes!
- blumomo 2y agoI recall Prism as a player in the GraphQL server field, this was about 8 years ago. Anyone knows what happened to that? According to their website they now offer only Postgres services?
- halfmatthalfcat 2y agoPrisma was born out of graph.cool (https://www.graph.cool/ https://www.graph.cool/) and their GraphQL implementation became the middleware between the Prisma DB client (@prisma/client) and their Rust db abstraction layer (prisma-engine). I believe they're getting rid of the residual GraphQL bits though, if I'm not mistaken.
- nikolasburk 2y agoNikolas from Prisma here! I've been around for almost 8 years (since the Graphcool days) and this description is pretty accurate but I can add a bit more color. The major product evolutions we've had were: - Graphcool: A GraphQL BaaS written in Scala. - Prisma 1 (see [1]): A GraphQL proxy server between DB and app server. This was essentially the "GraphQL engine" of Graphcool that we ripped out and made it available as an open-source component. However, its auto-generated CRUD GraphQL API never was meant to be consumed by a frontend. Instead, it was the abstraction layer for the app server to interact with the DB (at first only for GraphQL APIs on the app server via `prisma-binding`, then the first version of Prisma Client that worked with any API layer — both of these were thin JS/TS layers that talked to the GraphQL proxy server where the actual DB queries were generated). - Prisma 2+ aka Prisma ORM (see [3]): We realized that with Prisma 1, we were essentially competing with ORMs but that our architecture was way too complex (devs needed to stand up and manage an entire server where other ORMs could be used with a simple `npm install`). So, we rewrote the Scala "DB-to-GraphQL" engine in Rust to be able to provision it via a download during `npm install` and run it as a sidecar process on the app server, added a migration system and Prisma ORM was born. That being said, it has evolved a lot since then. We dropped GraphQL in favor of a way more efficient wire protocol [4] and have continuously reduced the footprint and responsibility of the query engine (e.g. you can now use Prisma ORM with standard Node.js DB drivers [5]). If you want more details, I talked more about this evolution on Twitter [6] a while ago. This launch is a huge milestone for us and it's definitely one of the most exciting launches I've been a part of at Prisma! [1] https://www.prisma.io/blog/prisma-raises-4-5m-to-build-the-graphql-data-layer-for-all-databases-663484df0f60 https://www.prisma.io/blog/prisma-raises-4-5m-to-build-the-g... [2] https://github.com/prisma-labs/prisma-binding https://github.com/prisma-labs/prisma-binding [3] https://www.prisma.io/blog/prisma-the-complete-orm-inw24qjeawmb https://www.prisma.io/blog/prisma-the-complete-orm-inw24qjea... [4] https://www.prisma.io/blog/prisma-5-f66prwkjx72s https://www.prisma.io/blog/prisma-5-f66prwkjx72s [5] https://www.prisma.io/docs/orm/overview/databases/database-drivers#driver-adapters https://www.prisma.io/docs/orm/overview/databases/database-d... [6 ] https://x.com/nikolasburk/status/1384908813069869058 https://x.com/nikolasburk/status/1384908813069869058
- victorbjorklund 2y agowow cool. Never heard about unikernels. Does it solve the issue with firecracker of not being able to reclaim memory? Would imagine that can be an issue for a long running app like a constantly busy database
- sorenbs 2y agoThank you! Reclaiming memory is orthogonal to unikernals. It's a concern of the VMM, and Firecracker does support this through the balloon device: https://github.com/firecracker-microvm/firecracker/blob/main/docs/ballooning.md https://github.com/firecracker-microvm/firecracker/blob/main... Now, the unikernel helps us consume less memory, which is a good place to start :-)
- ranguna 2y agoAny comparison with neon.tech?
- nikolasburk 2y agoI just answered the same questions on Twitter [1], so just quoting that: Neon is a lot more feature-rich right now (since PPG just came out) and has awesome stuff like branching. On the long-run, we expect to have a similar feature set. Additionally, our underlying tech has the benefits of avoiding cold starts and likely being more cost-effective. That being said, I see it as a major benefit that with Prisma you not only get a DB but an entire data layer (incl global caching and real-time DB events) thanks to the first-class integration of our other products like Accelerate and Pulse [2]. [1] https://x.com/nikolasburk/status/1851522983346532669 https://x.com/nikolasburk/status/1851522983346532669 [2] https://www.prisma.io/blog/announcing-prisma-postgres-early-access#a-fully-integrated-data-layer-with-a-db-orm-caching-real-time-events--more https://www.prisma.io/blog/announcing-prisma-postgres-early-...
- mdaniel 2y agohttps://news.ycombinator.com/item?id=41989041 https://news.ycombinator.com/item?id=41989041 combined with https://github.com/neondatabase/neon/blob/release-7011/LICENSE https://github.com/neondatabase/neon/blob/release-7011/LICEN... is a pretty stark contrast, IMHO
- gigatexal 2y agoI don’t understand the free pricing tier: $18 /million queries, 60k included 60k queries are free and then the 60_001st starts incurring costs at 18/1_000_000 per query?
- gigatexal 2y ago> Essentially, you pay for database queries and events, with 60'000 included for free, which is plenty for experimenting and small projects. Price per million queries/events is then based on the plan you're subscribed to, and with Starter you have zero monthly fixed costs and only pay for queries and events above 60'000. No CPU-time and similar that's usually hard to grok. Take a look at the Accelerate and Pulse pricing details. Prisma Postgres comes bundled with these, so the pay-as-you-go pricing is the same: https://www.prisma.io/pricing#accelerate https://www.prisma.io/pricing#accelerate We'll continue to make improvements to the pricing on the way to General Availability to make it both as easy to understand and affordable as possible. Nvm answered further down in the thread by eampiart
- nikolasburk 2y agoOur pricing for Prisma Postgres indeed presents a bit of a mental shift compared to traditional database providers: We charge for query volume, not for compute! We believe that ultimately this is a more intuitive way for developers to think about database cost. Generally, our goal is that developers need to only think about _queries_ — we'll take care of everything else to make sure those queries can run efficiently. Developers shouldn't need to worry about compute, scaling, downtime, etc.
- ahachete 2y agoLast time I checked, Firecracker didn't have a very compelling I/O story, which made it in my opinion not completely adequate for running Postgres (or any other database). In contrast, other similar VMM seem to have a better one, like Cloud Hypervisor [1]. Why then FC and not CH? (I've nothing against FC, actually love it and have been using it, but it appears not being the best I/O wise). [1]: https://github.com/cloud-hypervisor/cloud-hypervisor https://github.com/cloud-hypervisor/cloud-hypervisor
- aayushshah15 2y ago> Firecracker didn't have a very compelling I/O story Can you provide any sources for this claim? We're running Firecracker in production over at blacksmith dot sh and haven't been able to reproduce any perf regressions in Firecracker over CH in our internal benchmarking.
- eyberg 2y agoThe major tradeoff with firecracker is a reduction in runtime performance for a quick boot time (if you actually need that - this obviously doesn't work if your app takes seconds to boot). There are quite a lot of other tradeoffs too like 'no gpu' because that needs some of the support that they remove to make things boot fast. That's why projects like 'cloud hypervisor' exist.
- ahachete 2y agohttps://github.com/firecracker-microvm/firecracker/issues/1600 https://github.com/firecracker-microvm/firecracker/issues/16...
- aayushshah15 2y agoThat issue is from 2020 and has already been addressed. The fact that io_uring support is not "GA" is mostly a semantic aspect that doesn't affect most use-cases.
- evantbyrne 2y agoNo offense but $0.09/GiB for DB read is so expensive. It sounds like servers would be querying Prisma over the internet? Then webmasters get to double pay their webhost for egress to the internet. Developers need to relearn how to self-host!
- gniting 2y agoNone taken! The intention is clearly not to have any double dipping, so the verbiage and presentation of the pricing elements needs to improve... and it will! The feedback regarding clarity on pricing is well received. We've know that we've got some work on our hands along those lines and we're working to address it. Stay tuned!
- kundi 2y agoI find it hard to trust managing Postgres database to someone who decided to use CamelCase by default for the table and column naming in Postgres
- webstrand 2y agoWhy is that a bad thing? Otherwise you need a translation layer to convert to language-appropriate column names.
- jjice 2y agoI'm not super well versed in this domain, but I believe Postgres columns need to be wrapped in double quotes to respect case, or else they're all treated as lower, or something along those lines?
- dboreham 2y agoI seem to recall it's a SQL thing, not just PostgreSQL, although Oracle might not follow the spec. Definitely annoying.
- mattashii 2y agoYes, SQL does specify case-folding unless quoted. However, the SQL standard prescribes the case to be folded to uppercase, while PostgreSQL folds to lowercase.
- Shorn 2y agoFor MySQL, it can depend on the OS! https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sens...
- evanelias 2y agoThat's largely only true for schema names and table names, not all identifiers. The original root cause was having schemas backed by directories, and table definitions backed by .frm files. So on a case-insensitive filesystem like on Windows or MacOS, MySQL enables corresponding case-insensitivity logic for the affected types of identifiers. For a deeper dive, see my post https://www.skeema.io/blog/2022/06/07/lower-case-table-names/ https://www.skeema.io/blog/2022/06/07/lower-case-table-names...
- thenaturalist 2y agoDrizzle [0] added an easter egg on their website in response to this announcement it seems. [0]: https://orm.drizzle.team/ https://orm.drizzle.team/
- JamesMck 2y agoThis team’s ongoing, and frankly unhealthy, fixation on Prisma is getting so damned old (and childish). It's rare to witness a group so openly attempt to undermine another, while simultaneously drawing on the very same team’s ideas to inform their own product direction. Despite repeated public feedback calling out this unprofessional behavior, there appears to be little desire for growth or maturity. Kudos to the Prisma team for consistently upholding a high standard of professionalism by ignoring them. Wondering why you posted this... do you condone such childish behavior?
- thenaturalist 2y agoI posted this ‘cause I found it funny and coming from a data engineering world just dipped into Typescript APIs and ORMs in the past two weeks for a personal project. I have no affiliation with any provider/ name/ person in this space. I condone making premature judgements. I have no clue about Drizzles behavior and the only thing I learned about Prisma in the last two weeks is that they have their own schema definition language, a separate Rust proxy and seemingly didn’t address open feature requests for a couple of years which is why for now I didn’t pick them in my project.
- JamesMck 2y ago[dead]
- kikimora 2y agoHow does it handles backups, read replicas, failover? And more importantly - how it scales with load? For example our workload fluctuates between 1 vCPU to 128 vCPU in an hour. How it would handle this?
- deleted 2y ago[deleted]
- gniting 2y agoDuring EA (early access), we don't recommend using PPG (Prisma Postgres) for production loads. For now (during EA), there's no ability to scale up the base system config. However, when we roll out the service in GA, you'll be able to "upgrade" the base system and one of the plan tiers will support autoscaling along the lines of what you've described. The EA launch is for us to get PPG into the hands of our users and to vehemently listen to requests/requirements/bugs... your request has been noted and thanks for raising it!
- punduk 2y agoI guess this is a different way to complicate simple things and sell them. "serverless database is what you need, my dude!"
- wg0 2y agoCongratulations! Some innovation, some engineering. The other way, I was thinking about using uni kernels to deploy storage appliances via firecracker and here we go.
- Aeolun 2y ago$49/month for 60k queries… The pricing of these serverless offerings is always completely out of this world. My $5 VPS can handle more queries in an hour. Like, I realize there’s more included, but… Is it truly impossible to serve this stuff somewhere closer to cost? If this is close to cost, is this truly as efficient as it gets?
- gniting 2y agoWhile in EA (early access), there's no additional cost of Prisma Postgres, you're effectively getting a free Postgres db. The pricing you are citing is for Accelerate, which does advanced connection pooling and query caching across 300 POPs globally. All that being said, we'll def address the "can you pls make Prisma Postgres pricing simpler to grok?" question before we GA this thing. Thanks for the feedback!
- aurareturn 2y agoDoes a simple selection query count the same as a 50 line query joining many tables and doing aggregates?
- gniting 2y agoYes
- endorphine 2y agoWhat makes its connection pool "advanced"?
- gniting 2y ago- autoscaling - connection pool size limits - query limits - multi-region support out of the box more here: https://www.prisma.io/docs/accelerate/connection-pooling https://www.prisma.io/docs/accelerate/connection-pooling also recommend trying out the Accelerate speed test to get a "feel for it": https://accelerate-speed-test.prisma.io/ https://accelerate-speed-test.prisma.io/
- the__alchemist 2y ago> At Prisma, we believe that deploying a database should be as simple as adding a new page in Notion I don't know what this means, but setting up a PostGres DB is a single PSQL command, or a few clicks in PgAdmin.
- Exuma 2y agoPrisma is an absolute joke. I remember hearing so much about it with the hype train, and I looked into it, and it's an absolute catastrophe with a very beautiful homepage. There are GitHub issues where the creator is arguing with people about not supporting foreign key constraints or something, and he didnt understand the use case (cant remember specifics right now, but this is where I immediately noped right out)
- ko_pivot 2y agoPrisma definitely supports foreign key constraints. I think you mean joins which they only recently started supporting.
- Exuma 2y agoYes, you're right lol. Equally as bad. I actually thought it might be that but couldn't quite remember. Imagine trying to ask people for the use case of why they need joins...
- anentropic 2y agoWTF?
- weddpros 2y agoMeanwhile, some companies are building products with Prisma and are enjoying their choice. I love Prisma with Postgresql and Typescript, it's a very productive tool. My first opinion wasn't very far from yours, but then I adopted it. It has served me well after a year and multiple projects.
- djoldman 2y agoVirtualization layer (Firecracker + KVM) The "secret" sauce probably. Firecracker is so cool.
- wmf 2y agoEveryone runs Postgres in VMs. The real magic, if you want to call it that, is VM snapshots to reduce cold start time.
- jappgar 2y agoI was a big promoter of Prisma but can no longer recommend it. They built something really cool but have basically abandoned it, with major issues languishing for years without attention. I guess they were busy working on this instead... for now.
- mplanchard 2y agoDid you know it’s impossible to set a statement timeout for your DB connections in prisma? There’s no hook to run commands when a connection in a pool is established, and there’s no exposed setting for it. The only way to manage it is either to set it at the user level or to set up whatever they call a middleware layer (client extension?) that issues the command to set the timeout before every single query An engine that doesn’t allow you to set per-connection settings effectively is pretty crazy IMO.
- foreigner 2y agoIt's possible now with the built-in "db adapter" plugin. I also have lots of misgivings about the Prisma ORM, but this particular thing is possible now.
- mplanchard 2y agoCan’t find any docs on this, could you point me to what you’re referencing?
- foreigner 2y agoConfigure Prisma with https://www.prisma.io/docs/orm/overview/databases/postgresql#using-the-node-postgres-driver https://www.prisma.io/docs/orm/overview/databases/postgresql... Then you can pass `statement_timeout` when you create the `pg.Pool`
- mplanchard 2y agoOh I see, thanks! So you just need to opt out of their drivers entirely and configure with the alternative package’s driver.
- h1fra 2y agoMaybe they can take this opportunity to close the feature gap with other ORM: no support for partial index, no support for partition, bad support of JSON column, no support "for update", no support for "now()", poor query performance.
- eampiart 2y agoThanks for the list of things you'd like to see added or fixed, specifics are always much appreciated, so we can better understand! Historically, we haven't been very good at explaining how we pick the issues we work on. That is being addressed and you'll soon see us share our process transparently. This will allow everyone to better understand how we're going to continue improving the Prisma ORM.
- mind-blight 2y agoAre you folks planning on more first class postgres support? From the outside, it really seems like forcing MongoDB into the orm has forced a pretty watered down experience for the main orm (I.e. not typed SQL). I don't know if it's true, but it seems like you're be able to address the backlog more easily of you didn't have to force abstractions that work for a no SQL db
- techterrier 2y agono geospatial data types!
- chimen 2y agoLet's hope it is not another "Netlify" honeypot aka "settle in boys, generous free plan, port everything and lock yourself in. I'll start adjusting those prices next year when it will cost you $10 even to send some emails from your contact form".
- davedx 2y agoHuh? Netlify free tier is still free, I use it for multiple projects
- habosa 2y agoThey've made some nasty pricing changes in the past. For example they decided on per-user pricing (based on git committers) if you used them for the very common task of deploying branch-based previews on PRs. At my last job this was a sudden increase of thousands of dollars a year for a 15 engineer team. We dropped Netlify instead.
- Flux159 2y agoIf I already have a postgres operator setup on Kubernetes - what additional benefits is this getting me? Right now super fast start times aren't really needed since it's a database that I expect to be running for a while - ms vs 30s is fine. It's easier to setup a test database on the same machine I'm running automated tests so that may not be a good usecase either. I'm glad that they've made improvements to startup speed and size of the containers which would be good if it's open sourced, but I don't know if this is good as a paid service if you already have an easy way of setting up new clusters in k8s.
- eampiart 2y agoWith Prisma Postgres, you also automatically get a connection pool and a global cache: you don't have to worry about overwhelming you db with a large number of connections, and you can add global caching to any query in just a few lines of additional code, e.g.: ``` const user = await prisma.user.findMany({ cacheStrategy: { swr: 60, ttl: 60 } }) // <--- set a cache strategy in really just a single line ``` Both of these are super important when serving users that are spread across the globe. Latencies between regions add up. If you're curious, check out https://accelerate-speed-test.prisma.io/ https://accelerate-speed-test.prisma.io/ Similarly enabled already on the db, you can subscribe to any change happening to your db, e.g. to send out welcome emails when a new user is added to the User table. Makes event-driven architectures super easy. Take a look at Pulse, which comes bundled with Prisma Postgres: prisma.io/pulse Another benefit of a managed service of course is that you don't have to worry about managing any of it. Things happen, traffic spikes, servers go down, for a lot of us, that's nice to not worry about and rather focus on building and shipping the things that make our own products and services unique. Also, in a lot of situations, provisioning something complex is just not worth it, and a quick deployment to try or test something is desired.
- ComputerGuru 2y agoNaive, invalidation-unaware caching is a very poor hack that can work mainly for requests that are probably not your core feature, and therefore probably not your bottleneck.
- welder 2y agoAnyone complaining here just isn't the target user. People who need an always available but zero maintenance and low usage seems to be the target user? > always-on database with pay-as-you-go pricing for storage and queries (no fixed cost, no cost for compute). It's like a serverless database — but without cold starts and a generous free tier
- trallnag 2y agoMight be nice for setups consisting out of dozens of tiny micro services each with their own just as tiny databases.
- bilalq 2y agoIs there a way to import data in from a table, or would I have to manually break it up into 1kb chunk insert queries? Let's say I have a ~150GB postgres DB right now and I want to move it to Prisma Postgres. At 1kb/request and $8/million requests, does that mean 150 million requests billed at $1200 just to get started?
- eampiart 2y agoRight now during Early Access, the first hard limit would be that the database size is capped at 1GB. Of course, this will be increased as we go to General Availability. We're also planning on shipping a way to directly connect to the database vs. operating through Accelerate queries solely. During EA, I'd probably go with seeding from a pg dump. For GA, we'll provide a better way to move to Prisma Postgres if you're already using a pg database somewhere else.
- devomatic 2y ago[dead]