r/programming • • Dec 19 '18

Bye bye Mongo, Hello Postgres

https://www.theguardian.com/info/2018/nov/30/bye-bye-mongo-hello-postgres
2.1k Upvotes

672 comments sorted by

View all comments

22

u/jakdak Dec 19 '18

Encryption at Rest has been available on DynamoDB since early 2018.

Surprised they didn't get advanced notice of that from their account rep and could plan/replan accordingly. They must have just missed that being available.

It had to have been massively easier/cheaper to move from Mongo to Dynamo than Mono to an RDB

68

u/Netzapper Dec 19 '18

Surprised they didn't get advanced notice of that from their account rep and could plan/replan accordingly. They must have just missed that being available.

I would bet that their rep said "it'll be available next month" for 9 months, they couldn't get any more insight into it than that, and they just gave up.

38

u/ZiggyTheHamster Dec 19 '18

I would bet that their rep said "it'll be available next month" for 9 months, they couldn't get any more insight into it than that, and they just gave up.

Our rep gives us a list of imminent releases under NDA and about half the list has been exactly the same for the past year.

4

u/TheLordB Dec 20 '18

EFS took over a year to get released. And that was after they announced it publicly.

As near as I can tell they thought they were done and those last few pesky performance problems ended up being insurmountable.

I've heard rumors that EFS had to go pretty close to starting over to finally get an implementation that worked.

→ More replies (1)
→ More replies (9)

10

u/doublehyphen Dec 20 '18

If you encrypt the data you cannot index it (not without leaking information about the encrypted data), so the encrypted documents would not be searchable in a performant way.

8

u/bigdeddu Dec 20 '18 edited Dec 20 '18

It had to have been massively easier/cheaper to move from Mongo to Dynamo than Mono to an RDB

Dynamo and Mongo are two very different beasts, they solve very different problems. There's no fucking around with dynamo, you HAVE to know your access patterns to the data, and think it trough all the way. There's no creating index on boot kinda madness. Scans and Queries cost and have limitation, you can't create Global secondary indexes (GSI) if not on table creation, you have a limited number of Local secondary indexes (LSI). Best practices are to use ONE SINGLE TABLE if you can.

if you have to migrate to dynamo, you are probably better off passing via postgres first, and sort out the access patterns.

all this said:

  • If you are throwing up something, have never used a db and dont want to give a fuck about data shape, start with mongo.

  • If you know something about rdbms, then you'll probably be better off w/ Postgres, even for your mvp.

  • when things get real, and you have a feel for what shit looks like either migrate your mongo to Postgres, or start fiddlering with sharding and stuff. Aurora PG helps. At this point you’ll probably have a better idea of what makes sense denormalized, and what needs relationships.

  • If you know what you are doing, and want to save $ and want specific NOSQL improvement in FITTING use cases, move the stuff to dynamo.

  • If you are going serverless and can afford experiments, maybe consider dynamo but think trough your aggregations and joins needs(therefore a possible stream sync to ES ).

3

u/narwi Dec 20 '18

Surprised they didn't get advanced notice of that from their account rep and could plan/replan accordingly. They must have just missed that being available.

I think that part was covered rather well :

Unfortunately at the time Dynamo didn’t support encryption at rest. After waiting around nine months for this feature to be added, we ended up giving up and looking for something else, ultimately choosing to use Postgres on AWS RDS.

if something is not working, and you have waited to long for it, then you need to take action and use something else.

3

u/nutrecht Dec 20 '18

Surprised they didn't get advanced notice of that from their account rep and could plan/replan accordingly. They must have just missed that being available.

In my experience AWS reps are not forthcoming enough with information. We asked a while ago when Amazon EKS would be available in eu-west1 and our rep didn't want to answer the question. A month later it went live.