News for hackers. Stuff that matters.
Re:Neon – Serverless Postgres by anilgulecha on Friday May 27, 2022 @11:19PM (#31537313)
This is the missing piece on cloud for masses

  * we already have compute scale-to-zero (cloudrun, lambda, fly.io).

  * Network is default pay for use. Storage (S3) is default pay for use.

  * The only piece in the stack that was always-on was the database (only serverless db thus far was firestore, or something like sqlite+litestream)
With something like this we get a solid RDBMS engineered to be scale-to-zero, and with good developer experience.

This opens up a world of try-out mini applications that cost cents to host. serverless db (postgres) + serverless compute (cloud-run) + use as you go storage+network. This is a paradigm-shift stack. Exciting days ahead.

Re:Neon – Serverless Postgres by manigandham on Saturday May 28, 2022 @12:29AM (#31537613)
There are plenty of serverless database options already: Firestore, DynamoDB, CosmosDB, FaunaDB, even MongoDB, and there are "newsql" distributed relational systems like CockroachDB and Planetscale with serverless plans.
Re:Neon – Serverless Postgres by jillesvangurp on Saturday May 28, 2022 @07:27AM (#31539458)
Many teams would prefer a postgresql compatible database with full sql support without compromises, missing features, etc. So, this could break that market open a little. Both AWS and Google are unreasonably expensive for this stuff. Most teams don't need a huge database and would be able to run postgresql on a tiny instance and get away with it. Have 2 of those and failover and backups and it's good enough for a lot of small shops.

Most managed/serverless options begin at hundreds of dollars per month. So, you get lots of companies either just handing over the cash or jumping through hoops to get something more reasonable. The latter is a stupid waste of time if you can afford the former. That's how Google and Amazon make money: they make the expensive option more tempting and the cheap option needlessly hard. They are not interesting in supporting frugal teams. The whole point is squeezing their customers hard.

So, this is potentially very nice if it offers some competition on the cost front. I'd certainly consider using this if it proves reliable. In fact, the whole reason I opted out of a relational database is the above. What I'd need is something that is reasonable in cost relative to the modest data I store and retrieve.

Re:Neon – Serverless Postgres by davidzweig on Saturday May 28, 2022 @08:38AM (#31539848)
We have a single big bare-metal machine. We run Postgres with a ~1TB DB, moderate load, on a Hetzner AX101 (16C/128GB ram). It has 2* 3.84TB nvme drives (zfs mirror with hourly snapshots) used for postgres storage only, and a seperate pair of mirrored sata drives for system/boot (had to request the extra drive, ask support to change boot option in BIOS, and reinstall OS using rescue system). It's about 100 EUR/mo with unlimited data. We bounce all incoming requests from clients (the machine also runs a node backend) through a digital ocean machine (NGINX proxy), as their peering agreements are better, without this some users in Brazil, Turkey etc. have very slow access. OVH I think would be even better for this use (better? peering and IIRC cheaper data). ZFS snapshots are backed up with sanoid to a machine under my desk with spinning disks. AX101 can be fitted with up six 3.84TB drives, that's almost 12TB of mirrored storage, we should be good for a while. You can (should) use at least lz4 compression on zfs.. can consider zstd-1, bit slower, that could double the effective space. The compression also applies to the in-ram ZFS cache, that can be 100GB+.

We used firestore before.. got a bit tired of some of the limitations (latency, indexing). Cost-wise I don't think it's that different actually, but we aren't using much bandwidth, then self-hosted can be dramatically cheaper. Have to manage some details of course (zfs filesystem parameters, set up backups, config postgres etc.), but I found that stuff quite interesting and it's knowledge that will always be useful.

Re:Neon – Serverless Postgres by edmundsauto on Saturday May 28, 2022 @07:55PM (#31544944)
How do you measure the 1 TB db estimate? Is that in index, as a CSV, or back of the napkin math based on estimates?

I've always struggled estimating my DB size, curious what you mean by your estimate.

Re:Neon – Serverless Postgres by ed25519FUUU on Saturday May 28, 2022 @09:48AM (#31540294)
Sounds neat. What’s the weak link here though?
Re:Neon – Serverless Postgres by skrtskrt on Saturday May 28, 2022 @10:31AM (#31540618)
No read replicas that can be promoted to master in an outage?
Re:Neon – Serverless Postgres by davidzweig on Saturday May 28, 2022 @05:16PM (#31543937)
Ah, nop. If it goes down, we'll figure it out.. 24hrs outage wouldn't be the end of the world. Would have been nice to have a second (read replica) machine in East Asia, to reduce latency for users there, but didn't find a provider like Hetzner.. maybe could take a server in a suitcase and install it in a collocation center there. Bit of a hassle though.
Re:Neon – Serverless Postgres by alduin32 on Saturday May 28, 2022 @12:09PM (#31541434)
I have a similar setup as OP, and I use ZFS snapshots to be able to quickly rebuild the whole machine on another host. Of course, it still requires manual intervention in an outage (it could be automated, theoretically), and I may lose up to 5 minutes of data due to my snapshot schedule.
Re:Neon – Serverless Postgres by szundi on Saturday May 28, 2022 @10:20AM (#31540528)
Maybe that zfs snaphot under a running database? Is that ok?
Re:Neon – Serverless Postgres by alduin32 on Saturday May 28, 2022 @12:06PM (#31541407)
Yes, ZFS snapshots are atomic, so as long as the database use sane semantics to do disk I/O, you're fine (AFAIK, PostgreSQL and MySQL/InnoDB are ok, MySQL/MyISAM is not though).

A snapshot is effectively identical to a killed database server (due to OOM, or power outage), and database servers should be crash-resistant.

With PostgreSQL, checkpointing the database before taking the snapshot may make the crash recovery quicker when loading the snapshotted database.

Re:Neon – Serverless Postgres by nikita on Saturday May 28, 2022 @02:31AM (#31538082)
Hi Mani! For sure there are many serverless options - fewer that separated storage and compute and fewer that are open source end-to-end. Neon is also 100% compatible with Postgres (unlike CockroachDB) because compute is Postgres.

Our intention is to standardize the separation of storage and compute cloud architecture - that's why it's open source under the Apache 2.0 license.

Re:Neon – Serverless Postgres by boomskats on Saturday May 28, 2022 @06:01AM (#31539046)
You should update your HN profile :). Neon looks really great. Far more interesting to me and my team than S2.

I noticed you mention Azure BS in your RFCs as a potential backend. Have you done much work towards that yet?

Re:Neon – Serverless Postgres by mattashii on Saturday May 28, 2022 @06:11AM (#31539077)
For now we've focused on making the product production-ready on AWS, so that we can get users to try it out. Once the model has been proven we'll likely branch out to other clouds.

However, if you really can't wait to run Neon on Azure, you could contribute the integration yourself: the code is available under Apache 2 at https://github.com/neondatabase/neon/

Re:Neon – Serverless Postgres by boomskats on Saturday May 28, 2022 @07:02AM (#31539322)
Exact reason why I asked :) Thanks for the response & all the work you're putting in, it looks really promising.
Re:Neon – Serverless Postgres by hlinnaka on Saturday May 28, 2022 @06:15AM (#31539086)
Haven't done anything with Azure yet. Shouldn't be hard to add though, we don't rely on any special cloud storage features, just simple upload/download of files.
Re:Neon – Serverless Postgres by anilgulecha on Saturday May 28, 2022 @12:41AM (#31537662)
(Some of these are options I've not looked deeper into - Fauna, Planetscale)

This sentiment is perhaps right, but I was careful about calling out scale-to-zero. We do have options that are zero cost (or pay as you use), but there's a fundamental difference in something that may be zero cost because a cloud provider is using it as a customer-acquisition ploy.

Options like litestream+sqlite+s3, or what Neon seems to be, are verifiable you-pay-for-when-db-is-booted up, else the verifiable cost is storage only.

So the trifecta that will be very productive for masses is 1) database where compute is scale-to-zero, 2)open source or commoditised, and 3) is RDBMS.

Re:Neon – Serverless Postgres by nikita on Saturday May 28, 2022 @03:48AM (#31538424)
There is a big difference between in architecture between Neon and PlanetScale, CockroachDb, and Yugabyte. Neon is shared storage (storage is distributed but shared) and the others are shared nothing. Shared nothing systems are hard to build with supporting all the features of the base system. E.g. https://vitess.io/docs/13.0/reference/compatibility/mysql-co....

Neon is 100% compatible from Postgres b/c we didn't (or almost didn't) change the Postgres engine.

Re:Neon – Serverless Postgres by manigandham on Saturday May 28, 2022 @01:50AM (#31537934)
What is the effective difference to you? Technically all compute can enter hibernation by dumping RAM (or just using virtualized memory backed only by SSDs).

CockroachDB already does true scale-to-zero if that's your requirement: https://www.cockroachlabs.com/blog/how-we-built-cockroachdb-...

Re:Neon – Serverless Postgres by anilgulecha on Saturday May 28, 2022 @02:12AM (#31538019)
The effective difference is commoditization of the paradigm - there's confidence in a commodity technology that a proprietary cannot give (standardized use and wide support and community, multiple providers, self-hosting).

Eg: of innovation -> commodity. EC2 was innovative, but is today common-place. S3 was the same. DBs that scale-to-zero have not reached that state yet.

Thanks for the link on cockroachdb - it sounds promising. I wonder what's the minimum self-deployable unit of cockroachdb - will google around a bit.

Re:Neon – Serverless Postgres by ignoramous on Saturday May 28, 2022 @02:25AM (#31538057)
I think it is more "market leadership" than commoditization that's working in favour of the MySQL-Postgres duopoly.
Re:Neon – Serverless Postgres by manigandham on Saturday May 28, 2022 @04:51PM (#31543725)
> "minimum self-deployable unit of cockroachdb"

If you host it yourself, or use their dedicated enterprise clusters then you still have instances which are individual (virtual) servers.

The serverless model has no instances exposed to you and instead is a multitenant architecture that uses a pool of shared compute nodes with a routing layer that intercepts and introspects your connection to load up your specific database context for query processing.

Re:Neon – Serverless Postgres by pid-1 on Saturday May 28, 2022 @08:57AM (#31539975)
Most stuff you mentioned:

1 - Is not an actual relational DB

2- Doesn't really scale to zero

Planetscale does scale to zero, but has a ridiculous billing model.

Re:Neon – Serverless Postgres by manigandham on Saturday May 28, 2022 @02:23PM (#31542521)
Both CRDB and Planetscale "scale" to zero - but neither expose any concept of individual instances so I'm still not sure what difference it makes.
Re:Neon – Serverless Postgres by acjohnson55 on Saturday May 28, 2022 @01:42PM (#31542216)
What's the billing model / how is it ridiculous?
Re:Neon – Serverless Postgres by pid-1 on Saturday May 28, 2022 @04:03PM (#31543288)
Per row read / write billing -> how do you estimate that?
Re:Neon – Serverless Postgres by derekperkins on Sunday June 05, 2022 @06:52PM (#31635591)
Either you have an existing db running and check the metrics, or you don't have a workload to move and you can just try it out from scratch. You can always migrate away if the billing model doesn't work for you.

Alternatively, it's likely that Planetscale will eventually provide a provisioned billing model, similar to DynamoDB. Then you can choose between scalable usage based pricing or less flexible flat rate pricing. Either way, innovating different billing models for RDBMS is a win.

Re:Neon – Serverless Postgres by rektide on Saturday May 28, 2022 @12:32AM (#31537624)
MongoDB & CockroachDB are the only open source ones, the only ones we can hack on & improve & grow.

Neon seems like a vast vast improvement & great & desperately needed potential leap for mankind.

Re:Neon – Serverless Postgres by manigandham on Saturday May 28, 2022 @12:37AM (#31537645)
Planetscale is Vitess which is also opensource: https://vitess.io/

> "great & desperately needed potential leap for mankind"

Are you being serious? That's very hyperbolic if so.

Re:Neon – Serverless Postgres by rektide on Saturday May 28, 2022 @01:07PM (#31541933)
> Are you being serious? That's very hyperbolic if so.

Yes Im serious. This is one of the most foundational & key levels of computing: storing & quering data. Without this, computing isnt good for much.

Getting good at this is a huge task for humanity. Right now that task is almost entirely being fulfilled by far off hyperscalers. Aurora, BigTable, Firebase, DynamoDB, CosmoDB, more special works like DataDog Husky... the world is running off vast super-awesome dataengines. But ones that are not ours, that we cant hack on, that we cant run ourselves. It might as well be the Martian's (little green men's) databases as far as I'm concerned: these are not humanity's heritdge & humanity is cut off from active participation with them.

Right now there are so so so few scalable data systems available for the world, that we have. This seems like a great & novel effort to radically open up the range of human capabilities, in one of the most important sectors of computing: handling data.

We have lots of other cloudware for humankind but data has seemingly been much slower & un-scaled. I agree with this @anilgulecha comment[1]:

> This is the missing piece on cloud for masses

[1] https://news.ycombinator.com/item?id=31537313

Re:Neon – Serverless Postgres by manigandham on Saturday May 28, 2022 @02:19PM (#31542497)
There are tons of databases, I just named several and there are hundreds more for every possible niche.

> "But ones that are not ours, that we cant hack on, that we cant run ourselves."

Who is "we"? Is your entire issue that not everything is open-source?

> "these are not humanity's heritdge & humanity is cut off from active participation with them."

This is still incredibly exaggerated. Everything humanity does is humanity's heritage. There are plenty of open-source databases of all types and sizes if you look: https://db-engines.com/en/ranking

Re:Neon – Serverless Postgres by rektide on Saturday May 28, 2022 @04:03PM (#31543295)
Your free to your opinion, but I respectfully do not share your values & sense of collective ownership over remote, far off software I can't see, shape, control or rework.

The most notable feature of Neon, that makes it so exceptionally smart, is that it takes the humanity's existing first best choice default-go-to database, by a country mile, and layers in really smart decoupling of storage to help it scale. Reinventing things from scratch can be a win, but that this is already a well known quantity, much loved & cherished & used by all, hacked by all, grown by all is a planet-sized huge plus mark.

I think you vastly overrate the broad availability of alternatives to this, of potential starting places others might explore. Most of your list is dominated by proprietary whatever. Even skipping that, yes, there is a ton of novelty & promise, the potential for breakthroughs. But this is starting with the best, and pushing it into the cloud-layer, into the troposphere.

Re:Neon – Serverless Postgres by manigandham on Saturday May 28, 2022 @08:57PM (#31545218)
> "I think you vastly overrate the broad availability of alternatives to this"

There are dozens of "scalable postgres" alternatives from Redshift to Citus to CockroachDB to Yugabyte. I find it strange that you say its overrating the availability when you're also comparing it to something that isn't even a full product yet.

[dead]
Re:Neon – Serverless Postgres by bryanrasmussen on Saturday May 28, 2022 @01:36AM (#31537876)
I've met my share of developers without perspective in time, and hey I was probably one of them for my first 5-6 years as a developer, that I don't think one needs to assume corporate toadying for hyperbolic importance for mankind to be ascribed to a corporate offering.
Re:Neon – Serverless Postgres by nikita on Saturday May 28, 2022 @02:36AM (#31538099)
rektide is not Neon employee, nor is he or she was asked to post this.

Thank you for the comment rektide. We of course would love to see constructive comments and criticism.

- Neon CEO

[dead]
Re:Neon – Serverless Postgres by dang on Saturday May 28, 2022 @06:53PM (#31544571)
Can you please stop posting these off-topic comments (which are against the site guidelines, as you'll see if you review https://news.ycombinator.com/newsguidelines.html)? Also, can you please stop posting unsubstantive comments generally? You've been doing that in other threads as well.

I appreciate your concern for the integrity of HN discussions, but the thing to do if you suspect abuse or manipulation is to email [email protected] so we can look into it. Posting about it in the threads themselves is explicitly against the rules.

Re:Neon – Serverless Postgres by tomatowurst on Saturday May 28, 2022 @07:33PM (#31544814)
understood, dang sent you an email

but please take a look at the flagging attack on all of my comments outside this thread. the timing is too peculiar here

somebody really didnt like what i wrote above ;)

Re:Neon – Serverless Postgres by dang on Sunday May 29, 2022 @03:38AM (#31547237)
Moderators did that—your comments have been breaking the site guidelines quite badly!
Re:Neon – Serverless Postgres by tomatowurst on Sunday May 29, 2022 @07:34PM (#31553911)
that explains why seemingly YC money related threads are my criticisms getting flagged
Re:Neon – Serverless Postgres by pvg on Sunday May 29, 2022 @10:31PM (#31554962)
Users can flag comments too and yours get flagged because they break the guidelines in overt and obvious ways which is pretty easy to avoid.
Re:Neon – Serverless Postgres by psnehanshu on Saturday May 28, 2022 @07:22AM (#31539430)
Doesn't seem like an employee due to another comment they posted. https://news.ycombinator.com/item?id=31537613
Re:Neon – Serverless Postgres by avinassh on Saturday May 28, 2022 @03:14AM (#31538280)
Minor correction, both of them are source available, but not open source

Cockroach DB license - https://github.com/cockroachdb/cockroach/blob/2c4e2c6/LICENS...

Mongo license - https://github.com/mongodb/mongo/blob/39e4b70/LICENSE-Commun...

Re:Neon – Serverless Postgres by lawik on Saturday May 28, 2022 @04:33AM (#31538642)
Cockroach is eventually open source which I rather appreciate. Any code that is 3 years old goes Apache if I recall it correctly.
Re:Neon – Serverless Postgres by orra on Saturday May 28, 2022 @05:54AM (#31539011)
That only applies to the core. The "enterprise" features are proprietary until the copyright expires.

IIRC, backup was enterprise but is now part of the core. However, restore is still enterprise.

Re:Neon – Serverless Postgres by tluyben2 on Saturday May 28, 2022 @02:27AM (#31538071)
There is also gigabyte as open source. In our tests (which means nothing in general as it’s specific to our business case), it outperforms cockroachdb.
Re:Neon – Serverless Postgres by tluyben2 on Saturday May 28, 2022 @05:01AM (#31538780)
Sorry, cannot edit; Yugabyte (ios spellcheck).
Re:Neon – Serverless Postgres by geysersam on Saturday May 28, 2022 @07:43AM (#31539534)
Yes, but they are not "scale-to-zero"
Re:Neon – Serverless Postgres by manigandham on Saturday May 28, 2022 @02:07PM (#31542404)
Both CRDB and Planetscale are.
Re:Neon – Serverless Postgres by logifail on Saturday May 28, 2022 @02:17AM (#31538036)
> This opens up a world of try-out mini applications that cost cents to host

Given how much performance you can squeeze out of a $5/month VPS (I've been spinning them up and indeed down regularly over the last couple of years), is this really a paradigm shift?

Re:Neon – Serverless Postgres by sofixa on Saturday May 28, 2022 @04:36AM (#31538654)
On that $5/month VPS there's management overhead - you need to have at least basic Linux knowledge, and ideally more than that to know not to do stupid things like chmod 777 and database exposed on the public internet. You also need to do your updates, etc.

I'm an (former) SRE and run my own Kubernetes cluster for fun, but still use serverless (containers as a service, static website hosting) depending on the project.

Re:Neon – Serverless Postgres by lelanthran on Saturday May 28, 2022 @05:07AM (#31538807)
> On that $5/month VPS there's management overhead - you need to have at least basic Linux knowledge

Don't you need that as well as cloud-specific knowledge if you go serverless?

> and ideally more than that to know not to do stupid things like chmod 777 and database exposed on the public internet.

You still need some arcane knowledge to make sure your serverless doesn't experience cost overruns, right?

IME (your's obviously differs), the amount of cloud-specific + vendor-specific knowledge needed to avoid using a $5/m VM is a lot more in volume and a lot less in stability[1] than learning basic Linux once and using VMs everywhere[2].

[1] How the different cloud providers bill, when they bill, how to control your limits, etc changes much more often than knowing how to keep your server patched. Knowing how to get your serverless DB going on AWS doesn't help when you want to use Azure. And each cloud vendor regularly requires you to update your knowledge. Knowing how to keep a PostgreSQL-on-Linux up-to-date can be learned once and used for years. Even if running a managed DB, you'll still need to gain some of that knowledge anyway.

[2] Once you get to a scale where treating your machines like cattle rather than pets, you'll obviously have the team required to use cloud stuff optimally.

Re:Neon – Serverless Postgres by vidarh on Saturday May 28, 2022 @03:04PM (#31542791)
> You still need some arcane knowledge to make sure your serverless doesn't experience cost overruns, right?

I know people who have literally written their own analysis tooling just to figure out what's impacting their AWS spend. It's gotten better, but I could have retired many times over on what I've seen clients overpay to cloud providers because they didn't understand what would drive cost.

> [2] Once you get to a scale where treating your machines like cattle rather than pets, you'll obviously have the team required to use cloud stuff optimally.

The "problem" with the cloud story is that at that point you also have a team that could save you a fortune with a hybrid setup. Cloud providers get their margins off those who don't understand how much they're overpaying or who are too small to a) care or b) have leverage. Those big enough to have leverage who understand either negotiate hefty discounts or build out cheaper setups (basically at the point you're spending 7 figures a year, if you're paying anywhere near list prices for cloud services you're a chump; below that it's hit and miss)

I'm not at all against using cloud services, but I wish more people actually understood their costs and picked based on merits rather than cargo-culting. Some teams benefit greatly from cloud services, but usually if they're not cost sensitive. In my current job we have everything on AWS because we're never going to scale to somewhere where it'll get expensive and it's convenient. We'd save money if I moved it to, say, Hetzner, but the hosting bill is too small to matter. For that use it's fine.

The moment the bill starts to bite people ought to at least price out alternatives, and consider hybrid setups. E.g. I've had setups where even just putting a caching proxy in front of AWS to cache images to cut the egress bill would have paid for a team to keep it running. Their egress cost is still bad, but at the time it was just pure highway robbery.

Re:Neon – Serverless Postgres by vidarh on Saturday May 28, 2022 @04:53AM (#31538738)
With every cloud service there's a management overhead too. Just different skills you need to learn.

I've done SRE/devops work in various capacities including consulting longer than cloud services have existed, and my experience is that I've consistently earned more from clients who insisted on cloud services because they consistently need more help. Nothing is driving more demand for devops consulting services than cloud providers.

Re:Neon – Serverless Postgres by elondaits on Saturday May 28, 2022 @05:02AM (#31538786)
The issue with a full Linux system’s overhead is that if there are any new security vulnerabilities the situation could blow up in your face (e.g. the system is used to send spam, or host malware), so you need to maintain it at least minimally. With a serverless cloud architecture at worst it’ll stop working.
Re:Neon – Serverless Postgres by vidarh on Saturday May 28, 2022 @02:53PM (#31542719)
Or you just use Flatcar (a derivative of CoreOS), and don't worry about anything more than rebooting once a new image has been (auto-)installed, and run everything else in app containers where you have to worry about nothing more than what you would in your regular cloud setups.

This is not hard to get right. Yes, you need to learn how to do it, but the amount of money I've made from clients who thought cloud was simple and proceeded to create massive security holes for themselves is fairly substantial. People who think they're reducing their attack surface by using these services need to reevaluate - they're large, complex architectures that very few users understand properly. You need to learn the skills either way.

Re:Neon – Serverless Postgres by nikita on Saturday May 28, 2022 @03:07AM (#31538242)
We don't know. But we built it anyway because it may be that.
Re:Neon – Serverless Postgres by anilgulecha on Saturday May 28, 2022 @02:24AM (#31538052)
Millions of students and enthusiasts around the world would find that cost sufficiently friction-ful to not try out things.
Re:Neon – Serverless Postgres by logifail on Saturday May 28, 2022 @04:06AM (#31538508)
> Millions of students and enthusiasts around the world would find that cost sufficiently friction-ful to not try out things

I appreciate there are indeed billions of people for whom $5 is a lot of money, but just how many of them are "students and enthusiasts" itching to get started with Postgres?

I realise that - perhaps particularly here - a $5/month VPS is a deeply unsexy thing. You can, however, achieve (and learn) an awful lot with one.

Re:Neon – Serverless Postgres by Art9681 on Saturday May 28, 2022 @09:28PM (#31545389)
Nowadays there's a ton of idling compute capacity running client side that could be used to spin up a personal cloud environment with all core services if one has the proper knowledge. For anyone that has a core to spare and a few GB's of memory, which should be easy for most modrn midrange hardware, I would recommend they save that $5 paying for a third party VPS, go deploy an open source hypervisor such as KVM, and run the virtual server on your own hardware.
Re:Neon – Serverless Postgres by kortilla on Saturday May 28, 2022 @09:46AM (#31540288)
Who absolutely would not want to give a credit card to AWS where a bill is dynamic. If $5/mo is bad they definitely can’t handle the screw up that scales up and runs overnight for $500.
Re:Neon – Serverless Postgres by vidarh on Saturday May 28, 2022 @04:38AM (#31538671)
Free tier instances on various providers provides an option. And if you can't afford $5 a month you really shouldn't be playing with services where there's a risk of huge overages if you face a sudden spike in users.
Re:Neon – Serverless Postgres by avinassh on Saturday May 28, 2022 @05:24AM (#31538878)
You cannot sign up on AWS Free Tier without the credit card info and many students end up with a huge bill. This sub reddit.com/r/aws/ has many such posts.

Some links and discussions:

- https://cloudirregular.substack.com/p/please-fix-the-aws-fre...

- https://twitter.com/alexwlchan/status/1399095011178958851

- https://news.ycombinator.com/item?id=27044371

Re:Neon – Serverless Postgres by vidarh on Saturday May 28, 2022 @02:45PM (#31542660)
Well, and that is just as much of an issue if you use most serverless offerings. But you're not prepared to carefully manage your use, cloud services should not even be on your radar.
Re:Neon – Serverless Postgres by ptman on Saturday May 28, 2022 @10:03AM (#31540418)
Re:Neon – Serverless Postgres by pid-1 on Saturday May 28, 2022 @08:48AM (#31539912)
Fly.io does not scale to zero.

Lambda has many limitations.

In particular, for some reason AWS is allergic to providing a container deployment service that actually scales to zero.

Re:Neon – Serverless Postgres by russellendicott on Saturday May 28, 2022 @09:24AM (#31540146)
> AWS is allergic to providing a container deployment service that actually scales to zero

Isn't this what Fargate is?

Re:Neon – Serverless Postgres by pid-1 on Saturday May 28, 2022 @10:02AM (#31540409)
No.
Re:Neon – Serverless Postgres by hamandcheese on Saturday May 28, 2022 @01:52PM (#31542311)
Not yet, but soon.
Re:Neon – Serverless Postgres by dragonwriter on Saturday May 28, 2022 @03:38AM (#31538371)
AWS Aurora Serverless v1 (in MySQL and Postgres flavors) has had serverless, scale-to-zero for quite a while.
Re:Neon – Serverless Postgres by shaicoleman on Saturday May 28, 2022 @05:41AM (#31538958)
Aurora Serverless v1 has cold boot times of ~30 seconds when scaling up to zero, which precludes it from being a viable option for most usecases
Re:Neon – Serverless Postgres by pid-1 on Saturday May 28, 2022 @08:44AM (#31539894)
Unfortunately V1 is getting very little love from AWS and the new one, V2, does not scale to zero.
Re:Neon – Serverless Postgres by 8organicbits on Saturday May 28, 2022 @03:21AM (#31538300)
What's the cold start time for something using sqlite+lightstream on scale-to-zero compute? I think you'd need to pull the db out of storage, so I would be slow to go from 0->1 instance. Anyone know if that's right?

Is there any cold start delay for neon?

Re:Neon – Serverless Postgres by nikita on Saturday May 28, 2022 @03:34AM (#31538353)
Right now it is 2 seconds. We are working on improving it.
Re:Neon – Serverless Postgres by rektide on Saturday May 28, 2022 @01:24PM (#31542063)
> This is the missing piece on cloud for masses

I like this perspective a lot & think it's absolutely key here.

We- the world- still pick single-node writer postgres & read replicas when we have to store & query data. There's great Kubernetes postgres operators, but it's still a distinctly pre-cloud pre-scale type of technology, & this decoupling & shared-storage sounds ultra promising, allows independent & radicaly scale up & scale down, sounds principally much more managable.

Re:Neon – Serverless Postgres by hamandcheese on Saturday May 28, 2022 @01:50PM (#31542289)
If you can scale your app to zero, couldn’t you also just scale your database to zero once no more app servers are running?

Or for try-out apps, as you mention, you could just run Postgres next to your app in the same container.

This might be possible with fly.io, or will soon, I think.

I’m not sure how comfortable I am using a custom flavor of Postgres (even if it’s just the storage layer).

Re:Neon – Serverless Postgres by antender on Monday May 30, 2022 @11:30AM (#31560057)
We already had serverless db for ages and it's called ... Google Sheets. You can even query it with simple SQL-like language.

The problem with most other "serverless" databases is that they don't offer HTTP API to query them from restricted environments like serverless functions.

Re:Neon – Serverless Postgres by guggleet on Friday May 27, 2022 @11:31PM (#31537366)
Re:Neon – Serverless Postgres by ldoughty on Friday May 27, 2022 @11:46PM (#31537426)
I virtually never self-promote, but that exact article got me to investigate the offering:

https://ldoughty.com/2022/05/exploring-aws-aurora-serverless...

Short answer if you don't want to read my post: it constantly uses CPU, it's always on. After creation, waiting 2 days, never logged into it, never ran a script against it, never gave it access to any networks, minimum cost is $43/month because it can't actually scale down to 0.5 units unless you CAP it at 0.5, which makes it unusable, because it consumes all of that capacity just to exist.

It sounds like this Neon offering is exactly what I hoped AWS was offering... Or they are using Language to suggest it and mislead the customer just the same ... If it's the former, if probably sign up and try it out. If it's the latter, I'll probably never touch it for the false hope.

Edit: lots of typos from phone keyboard

Re:Neon – Serverless Postgres by rgbrenner on Sunday May 29, 2022 @12:21PM (#31550334)
I tried recreating your experiment.. created an aurora Serverless v2 db with 0.5 - 2 ACUs in us-east-1.. since you said it was for Wordpress, I disabled the multi-AZ replication, since AFAIK, WP can't use separate reader/writer connections (mentioning this because you didn't say anything about it in your article)... then I let it sit overnight so it had time to create everything.

It's sitting at 23% of 0.5 ACU.

So its either the replication setting (haven't tested with it on yet), or.. AWS is a shared service... wonder if it's similar to EC2, in that sometimes you get an instance on a machine that's more overloaded and the instance doesn't perform as well.. and you have to destroy it and try again. Might want to try it again.

Edit: I don't think its the replication setting... tried that with a new db and its at 25% on each replica after an hour.

Re:Neon – Serverless Postgres by taspeotis on Saturday May 28, 2022 @01:51AM (#31537946)
I am using Serverless v2 with min/max ACU of 0.5/8 and it spends most nights at 0.5.
Re:Neon – Serverless Postgres by fitzoh on Friday May 27, 2022 @11:34PM (#31537382)
No scale to zero unfortunately
Re:Neon – Serverless Postgres by res0nat0r on Friday May 27, 2022 @11:42PM (#31537413)
It does scale to zero no?

> It automatically starts up, shuts down, and scales capacity up or down based on your application's needs.

The only tradeoff is the additional latency someone will have when connecting to the db after it has shutdown and waiting for it to spin back up and become ready.

Re:Neon – Serverless Postgres by ldoughty on Saturday May 28, 2022 @12:05AM (#31537517)
AWS aurora serverless says:

> You pay only for the capacity your application consumes.

> Scales down to 0.5

But it actually can't scale down to 0.5 or the DB falls over just existing.. auto scaling won't let you go down that low unless you set 0.5 as the max, which literally makes it not scale up, and it's dead, because the DB can't run with that little CPU.

So it's fair to ask if neon can scale to 0, both in marketing, and in practice.

Re:Neon – Serverless Postgres by ololobus on Saturday May 28, 2022 @08:16AM (#31539726)
We do scale compute part down to zero after 5 mins of inactivity now (no active transactions). This 5 mins threshold is a random pick, it could be 1 min or 30 mins later, or even customizable by the end-user. Storage part is heavily multi-tenant, so it's always running and our main objective is to make resource utilization as effective as possible.

It still has a significant latency on the first connection attempt after suspend (1-2 seconds), but we are working on that and it seems to be realistic to put the startup time under 1 sec.

Pricing model is still work-in-progress, so cannot say much about it. Yet, my personal intention is to make it cost-effective for both end-user and us. I'd prefer to don't build a service with claims like 'here is your free-tier serverless Postgres with zero-latency on connect', which actually means that under the hood there is an always-running compute burning the investors money. Hope it's realistic to achieve :)

-- Cloud engineer @ Neon

Re:Neon – Serverless Postgres by ldoughty on Saturday May 28, 2022 @03:28PM (#31542986)
That's interesting to hear. That probably works great for my use cases, which is typically wake up to refresh a CDN for guests, but ready to work for a bit if a content creator logs in (e.g. a WordPress instance without comments or non-author logins).

Looking forward to seeing how this works out. I have no issues paying for services, I just hate that the minimum entry level cost is $20... I can't imagine why, at scale, it can't be more affordable for hobby/fun level projects.

Re:Neon – Serverless Postgres by tpetry on Saturday May 28, 2022 @08:46AM (#31539906)
How do you plan to start a PostgreSQL instance in less than 1 sec? Sounds interesting.

I tried fast booting of PostgreSQL instances and it always took multiple seconds. So i am really curious!

Re:Neon – Serverless Postgres by ololobus on Saturday May 28, 2022 @09:20AM (#31540129)
That's where the separation of storage and compute kicks in, I guess. Startup process of our Postgres instance (compute node) is a bit different from vanilla Postgres. We need to go to the network storage service (pageserver and safekeepers) to get the last known commit LSN, but we don't need to perform any sort of recovery on the compute node side. That way, compute is mostly stateless.

Basically, to start we need to know this LSN and to bootstrap the Postgres processes. This is really that quick. After that compute is ready to accept connections and serve requests, as it's able to get any missing pages from pageserver with GetPage@LSN request.

We do have the whole bunch of problems to solve: queries latency after cold start; startup after the unexpected exit of the heavily loaded Postgres instance could be slower; etc.

Re:Neon – Serverless Postgres by mattashii on Saturday May 28, 2022 @09:28AM (#31540176)
Some parts of the PostgreSQL start-up sequence take a long time:

- Initializing shared memory -> We, for now, have only small instances, so that doesn't hit us as hard

- Reading data directories -> We don't have to do that at all

- Replaying WAL from a previous unclean shutdown -> We don't need to do that, PageServer is responsible for that

- When initializing a whole new database: Initializing the data directory -> We have a copy that each instance gets initialized from, which makes the process "copy those ~16MB in the background", which saves us from having to do the costly initialization process.

And there's several more infrastructural optimizations, such as pre-loading the docker images onto the hosts.

Re:Neon – Serverless Postgres by tuukkah on Saturday May 28, 2022 @12:23AM (#31537590)
It seems Aurora v1 used to scale to zero but v2 has a minimum of 0.5 ACU.
Re:Neon – Serverless Postgres by derefr on Friday May 27, 2022 @11:59PM (#31537491)
Snowflake is probably the closest comparison.
Re:Neon – Serverless Postgres by nikita on Saturday May 28, 2022 @03:08AM (#31538244)
Some users called us Snowflake for OLTP, some others Snowflake for Postgres. Obv b/c of separation of storage and compute.
Re:Neon – Serverless Postgres by TruthWillHurt on Saturday May 28, 2022 @12:22AM (#31537588)
uh... AWS Aurora? Azure CosmosDB? GCP BigQuery?

All serverless, scale-to-zero or pay for demand...

Re:Neon – Serverless Postgres by antifa on Saturday May 28, 2022 @10:53PM (#31545877)
GCP BigQuery is unusably slow for small datasets and is more like redshift/athena than postgres.
Re:Neon – Serverless Postgres by jokethrowaway on Saturday May 28, 2022 @09:03AM (#31540017)
I don't see the benefits over a 5$ VPS. Even admitting I'll save a few cents over a VPS (which is absolutely not guaranteed), the cost saving is so minimal I won't bother rewriting everything under the serverless paradigm just for it. Of course if your cloud doesn't cost an eye and an arm. I can understand people excited to save on expensive Aws instances but maybe you should just consider dumping Aws.

Scale doesn't matter for mini applications and scaling vertically (=throw money for a bigger server) will work for 99% of the companies. The 1% who need horizontal scaling will have custom everything regardless and will need to hire experts, not a good niche to release a product.

Re:Neon – Serverless Postgres by jeroenhd on Saturday May 28, 2022 @09:16AM (#31540105)
I do. There are real benefits to using a hosted server for large projects (think hundreds of gigabytes to terabytes of data) because getting sharding, fallbacks, and downtimeless maintenance right is difficult, risky, and expensive.

These are reasons why one might go for a hosted database at AWS/GCE/Azure. There are tons of good servers out there for small to medium projects and I don't think this service is right for those, unless they can make do with the free tier. The real benefit is in the larger cloud application space.

A system that does this type of scaling automatically while also reducing the dependency on a single cloud provider's service can be a gamechanger for some companies with huge database servers that risk getting locked in.

I think using this service for most existing applications will introduce a performance drop, a rise in expenses, and a complicated migration path, but on the other hand I think that developing against this system for new projects that are very likely to grow in scale will end up with some major data control benefits.

The open source nature also allows for competitors in markets like the EU to start serving databases that don't break privacy laws (although most companies don't care until they receive a fine).

I'm not sure how this company will become profitable while giving away its special sauce that can be modified to run at competing companies relatively easily, but that's a whole different story.