upvote
MongoDB is not a bad database, it is not my first immediate choice for everything, but it is very easy to get into, super easy to prototype with. My biggest pet peeve is how it handled indexes, shoves it all into memory. That and how people use it sometimes bewilders me.

Two fun facts: ObjectID's are like Discord snowflakes: you can get a timestamp of when they were generated, you can also generate them client side, so you can filter items in a collection by when they were created.

The other one, that I always enjoyed is, you can take an existing ObjectId, and reinsert it into another document, you dont have to nest all your data, you can go kinda sorta relational about it.

Used it at a previous job, the first project could have just used a SQL db but because the person who made the intial one tried to do NoSQL using something in the cloud, they migrated it to MongoDB to keep it simple and consistent. The second project, well, we really discovered all the limits if you aren't Google with unlimited server memory available, like indexing as I mentioned. MongoDB pipelines are probably my favorite feature on the other hand.

reply
> you can go kinda sorta relational about it.

and reinvent half of a SQL engine inside your backend logic, badly.

(source: for the 3rd time, I'm working on a system that uses Mongo extensively, the goal is to move to Postgres as soon as that's viable)

reply
Yeah, I wouldnt recommend doing MongoDB for EVERYTHING, but when you're using it for very specific things, you dont have to throw away everything you're already familiar with is all I was saying.
reply
Postgres does not scale. I have extensive experience in some of the largest databases ever built, postgres doesn't even come close.
reply
It's not that it does not scale but it does not scale out of the box.
reply
Please elaborate more instead of just "trust me" it would be nice to understand where this comes from. I'm sure back some years people would have said the same about MySQL, yet YouTube used the heck out of MySQL, they made an entire Go based runtime on top of it to scale MySQL.

You can scale nearly anything if you know what you're doing.

reply
there are mountains of evidence that postgres does indeed scale if thoughfully designed.
reply
Migrate to yugabyte? It's a multi-raft fork of postgres.
reply
Curious to know what does actually scale according to your opinion (if not postgres) and what is the scale that we are talking about when mentioning some of the largest databases ever built (I hope you can talk more about it!)

There seems to be many many options at attempting/trying to scale postgresql, what are your opinions of them?

Also It is my sort of opinion that you really have a good problem if postgresql isn't working you because of the problem of scale and that, evaluation of other problems become much easier but in general, its easier to start with postgresql.

(Personally, I use sqlite + golang static binaries on a 500mb/1gb ram server, so I can't comment too much on the scale part as I am focused much more on simplicity yet I admire how aside from sqlite (which is also more scalable than people think!) postgresql is almost always good enough in my opinion though I can be wrong and I usually am)

reply
People do hate on it but MySQL is what I would reach for when needing tons of scale. Its correctness issues about type conversions are super well documented at this point and Innodb is really good at ingesting tons of data. There's also a lot of talent you can hire if you need exotic setup.
reply
It would be nice if you could substantiate this a bit.

Like, what kind of measurement is "largest"? Most bytes on disk?

reply
IIRC (from my time there) Stripe still uses MongoDB for it's main datastore.

https://stripe.dev/blog/how-stripes-document-databases-suppo...

reply
MongoDB's biggest weakness was its default settings, which made it insecure and very vulnerable to data consistency failures. An absolute nightmare for PR. It's not perfect, but it's comparable to other NoSQL databases now.
reply
Their biggest weakness was that their marketing promised way, way more than they could deliver.

Aphyr's original examination [0] took them to task so much so that I always think of it as the start of the "end", at least of the "web scale" obsession.

[0] https://aphyr.com/posts/284-jepsen-mongodb

reply
MongoDB has been a good database for years.
reply
MongoDB is a natural choice if you are working with denormalized deeply hierarchical data structure like JSON. It is also natural to JavaScript devs since the shell itself is JavaScript. This makes it super effective on modern web framework although I recently switched to Drizzle
reply
MongoDB is a great db for agentic workloads to be honest. Thats probably why they are still seeing growth. They also have some very good embedding models. They should really make those available over their own API though.

They probably should look into JEV style models as well might make sense for automatic classification of data.

reply
poor souls stuck maintaining brownfield webshit developed during the height of mongo's marketing campaign 10 years ago.
reply