Currently using AWS lambda for my application. I’ve already built my document database in mongoDB atlas but I’m wondering if I should switch to dynamoDB? But is serverless really a good thing?
Why does MongoDB seem to be used more than DynamoDB? MERN, MEAN, I never hear of using DynamoDB. Loking to move a away from SQL Server to a NoSQL Database. React front-end.
Does MongoDB have a competitive advantage versus other nosql services?
I know Reddit looks down on mongodb but is it really that bad as many of the comments show? Curious what your thoughts on picking mongo over even postgres
Disclaimer: I don't have any experience with NoSQL
Hi, I'm currently developing a fantasy sports web app, now a game can have many matches and each match can also have many stats results(let's say a match contains at minimum 20 rows of stats results(for both Player A and Player B) that will be stored in the database).
Now that would be a hell of a load being put into my mysql database. So I thought of using nosql, since the structure of results also varies per game type.
Now, I don't really know which to use, and all while considering that we are on budget, so the most cost effective db would be preferred. We are on AWS environment btw.
We are planning to migrate our ecosystem completely to the AWS. Currently mongodb is used as a backend with replica set . Our system is both write heavy and read heavy. And data is extremly unstructred. And it stores few millions of records. And very high throughput.
So which is better in AWS for this use case. MongoDB in EC2 or DynamoDB interms of performance, cost, consistency and HA?
What were your reasons, how did it go? I see that DynamoDb now has Document mode to allow any json which is a definite advantage vs just a key-value store.
But I cannot believe how verbose and limiting their API seems to be - e.g for JS - http://docs.aws.amazon.com/amazondynamodb/latest/gettingstartedguide/GettingStarted.NodeJs.03.html
Compared to using MongoDb driver this is about 10x harder! Why do I need to construct UpdateExpression etc vs just passing in the new json?
I realize its not really meant to be a replacement for traditional NoSql but am trying to see if it makes sense.
e.g. How is the search performance, indexing etc? Right now we have ~5m records in one mongo table and the search performance for full text can be hit/miss. I'm guessing the AWS alternative would be ElastiSearch or Cloudsearch with import ffrom DynamoDb.
Hello all,
Context: I am running into some trouble using MongoDB, and looking to possibly move towards DynamoDB. Right now, I am currently hosting a MongoDB database running Mongo 4.0 using an EC2 Instance. It is a copy of our production database, which is on an identical EC2 instance, but is running Mongo 3.0. I currently use the copy to take in a dump from the production, and run an aggregation query on it. This aggregation query creates a new collection, using complex aggregations from three different collections. Hosting two EC2 instances costs a lot of money.
I mainly get rid of extraneous data, change a data string to a date object (so I can query by date later on) and change a few strings to integers to allow for sorting.
For simplicities sake, we'll call the production Database A and the copy Database B. Again, the only difference between the two is that MongoDB is upgraded. I want to upgrade production eventually to 4.0, but we are worried that it will mess with our application. In my testing, it doesn't seem to have an effect, but again, we don't want to ruin our application.
I then use an AWS Lambda function, where I query the copied database, and perform more aggregation. Mainly, I query by a date range, and then group all of the data together. Data is grouped using a unique YoutubeId, and an Event Type (i.e, wedding, bar mitzvah etc). It counts how many times that youtubeId appears, the number of 'likes' the youtube link got from our users, and a few other stats. It then outputs this information to a CSV file, and uploads that to an S3 bucket. That allows us to download CSV files more than 6MB without worrying about Lambda limitations.
The Question: My biggest question would be: is this possible in DynamoDB? I need to perform these advanced aggregations and basically output a new collection. I need to do sums, and transform data. It is a lot, but MongoDB has been good because its aggregation pipeline is so advanced.
If that is not possible, how can I lower costs on Database B? It has a lot of extraneous collections on there, that really aren't necessary. It has 27 collections, but in reality, I only need to use 3. I can then eliminate those once I have the outputted aggregation of them, creating just one collection.
I am an Software Engineer by profession working at one of the Indian IT service companies, i have recently started my indie hacking journey to develop small micro SAAS products and offer it to the internet users. But while choosing tech stack for my SAAS i encountered a tech decision regarding Database choice. on one hand i had mongoDB which marc lou (famous indie hacker) recommends for everyone which has free tier of 500 MB Storage and on other hand i had lot of other Database choices out there. i decided to go with mongoDB and built some landing pages with it, i built an landing page by integrating mongoDB but observed an real issue that i missed. issue was LATENCY!
yes, mongoDB is one of the best NoSQL Databases out there which has great GUI to interact and integrating it is quite easy but the mongoDB free tier offers no protection against latency issue's. i kept my cluster in oregon USA and hit it from india, it took request-response 3 Seconds to complete (industry average is in single digit milli-seconds)
This latency issue was just the start, when i analyzed deeper i got to know that mongoDB can get far more price in long run if u stick with it.
So i compared many of the database options out there and selected aws DynamoDB which is managed database by AWS and here's the price comparison for 5 GB Data, 50K read per day, 10K writes per day
it's been 15-20 days now and i have learned aws DynamoDB from scratch and completing it this week, i think it'll be cheaper and reliable to build with aws DynamoDB but let's see what issue's i face in coming time in my journey.
Feel free to drop your opinions in comment section
I'm looking for a good comparison between fully-managed database services. We don't have a lot of engineering resources, but I expect rapid data growth 20 GiB for year 1, 100GiB year 2.I often see DynamoDB vs MongoDB, but I don't think it's a fair comparison, as one is a service and the other is a database.
Do you have any experience with one of these? I'm looking for anything: cost, scalability, tooling (e.g. pymongo vs PynamoDB), performance, etc.
I'm looking for a good comparison between fully-managed database services. We don't have a lot of engineering resources, but I expect rapid data growth 20 GiB for year 1, 100GiB year 2.I often see DynamoDB vs MongoDB, but I don't think it's a fair comparison, as one is a service and the other is a database.
Do you have any experience with one of these? I'm looking for anything: cost, scalability, tooling (e.g. pymongo vs PynamoDB), performance, etc.
mongodb atlas was cheaper for my needs. the min instance size for dynamodb is huge.
vpc peering and backups taken care of helps a lot.
I'm not sure what you're referring to here - your listed options are not relational in any useful sense, and both are available as a service.
My apologies. It is an error I meant NoSQL database.
Hi,
So I have a small Express js app with monogdb database. The client wants to leave MongoDB completely and shift to AWS. What should I replace mongoDB with? DynamoDB or DocumentDB ???
I know this is old, but it still comes up when you search for the comparison. We were using Mongo, have moved almost entirely to Dynamo, which is our first choice now. Not because it has more features, it doesn't. Mongo has a better query language, you can index within a structure, there's lots of little things. The superiority of Dynamo is in what the OP stated in his comment: it's easy. You don't have to take care of any servers. When you start to set up a Mongo sharded solution, it gets complicated. You can go to one of the hosting companies, but that's not cheap either. With Dynamo, if you need more throughput, you just click a button. You can write scripts to scale automatically. When it's time to upgrade Dynamo, it's done for you. That is all a lot of precious stress and time not spent. If you don't have dedicated ops people, Dynamo is excellent.
So we are now going on Dynamo by default. Mongo maybe, if the data structure is complicated enough to warrant it, but then we'd probably go back to a SQL database. Dynamo is obtuse, you really need to think about how you're going to build it, and likely you'll use Redis in Elasticcache to make it work for complex stuff. But it sure is nice to not have to take care of it. You code. That's it.
With 500k documents, there is no reason to scale whatsoever. A typical laptop with an SSD and 8GB of ram can easily do 10s of millions of records, so if you are trying to pick because of scaling your choice doesn't really matter. I would suggest you pick what you like the most, and perhaps where you can find the most online support with.
We are a pretty small startup, right now using MongoDb. We are planning a migration to AWS.
DynamoDB seems to have too many limitations - in the structure, indexes etc, to be a replacement for Mongo.
I would never have thought of it but after reading some people seem to be using ES as a primary db. Is this feasible? This seems to be the only complete NoSql option on AWS and as a bonus we'd get search for free.
The other option is to host Mongo on EC2 manually but a managed service is more attractive if the costs and features are comparable.
edit - lots of comments on 'why Mongo, why NoSql'. That's not really the point here, changing architectures is fine which is why I considered Dynamo, but we can't rewrite the entire app to use SQL e.g. We have Mongo because one of the key pieces in our tech stack depended on it. And the db isn't holding us back w.r.t performance, schemaless document db fits our use case very well. Cassandra doesn't have this.
This whole 'Mongo is bad' groupthink reminds me of how we had 'MySql is bad' when NoSql was the new thing. Every tech has its use cases, its all about the compromises you choose.
Based on the docs it looks like dynamoDB is a great choice since it's used by a lot of businesses and can handle a lot of requests simultaneously. Not to say cosmosDBs can't.
But what is preferred in the market out there? I am looking for speed and reliability to handle simultaneous writes.