3 ms·
> . If you can figure out how to use D1 as a frontend dev, you can use a hosted Postgres solution and get much more power and performance. If your application
by jgalt212 2y ago
> . If you can figure out how to use D1 as a frontend dev, you can use a hosted Postgres solution and get much more power and performance.
If your application server, and your hosted postgres server live in different buildings, you'll also be disappointed in performance and pay 10x the price of D1.
- ljm 2y agoI see it the same as serverless, which is almost-but-not-quite a backend in the same way that D1 is almost-but-not-quite a database. Your persistent servers may have a larger fixed cost up-front, but you can save on engineering hours otherwise spent handling serverless foot-guns. If you introduce a cartesian explosion of database queries on your persistent instance, it'll fairly quickly just crash and give you downtime. On your serverless version, it'll just keep going for as long as it can and you won't find out until an eye-watering bill lands in your inbox at the end of the month. Hard downtime is not desirable, but that 10x initial cost can be dwarfed by an errant commit that leads to a practically endless execution loop on your API or DB.
- fastball 2y agoEntirely wrong, and that is what is so surprising about D1's terrible performance. Using CF Workers + DigitalOcean Postgres, I was seeing query responses in the 50-100ms range. Using CF Workers + CF D1, I was seeing query responses in the 300-3000ms range. Both workers had Smart Placement enabled.