4

I am building a web application (book readers group) , where every one can select a book from website books and then create a readers group for that book.

1- User selected a book named (How to develop with ReactJS).

2- User specify the number of group persons, let say 20 persons to read that book. then that selected book pages will be divided into the /20 persons .

3- A user will have a read URL that he send to his reader group.

4- A table will be shown to each reader opened the shared URL:- enter image description here

I may later add a feature where a readers can send an internal message to the group creater...

Now i am in confuse between which DB should i choose, its not important for me the ease of implementation .

My matter is the cost , because i am expecting a high volume traffic for the website. Speed is not really necessary for me if the read speed different between SQL and noSQL is less than 1 sec , the important thing is accessibility and availability of the services 24 hours and the cost of course. Let say if select Amazon Dynamo DB , dynamo db will cost me according to each read and write request.

The hourly rate for Amazon RDS (Mysql) for db.m5.xlarge instance is $0.396 and $0.133 per GB-month, and i later on i may need to run an auto scale to start more instance.

While in DynamoDB is charging as per read and write request and storage usage.

Q8root
  • 1,243
  • 3
  • 25
  • 48
  • If you are writing a site that needs a DB.xlarge, if correctly written then you'll be concerned if the difference in speed per query is 100th of a second, not 1 second, while processing 2000-4000 calls per second to your servers. You should never expect a query anywhere close to a second (except infrequent administration processes on a read replica). Plan your db strategy correctly, get the response speed down to microseconds and save a bucket load by using the right db. You'll also save on web instances. – Robbie May 28 '20 at 11:33
  • I’m voting to close this question because it's about prising. – sashoalm Jul 01 '20 at 06:48

2 Answers2

6

In my experience - and with my uses cases - I have found that for small to medium sized projects DynamoDb ends up being cheaper, and in some cases even completely free because the use fits within the free-tier that aws offers - which is pretty generous. DynamoDb is my goto for these types of applications.

On larger projects I have found it not so clear - not knowing you usage patterns, and amount of data storage used/needed, there is not an easy, one size fits all answer.

E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116
  • But i find the cost calculation compared between both sql and nosql DB is complicated, for example aws cost for DynamoDB for each / read and write request made, and on the same time, noSQL does not have a single join query ability where i can get some data from two tables using one request. so i need to first get the user info this is one request made , then make another request to get the user created bookgroups. and this will cost me more than one read request – Q8root May 28 '20 at 09:37
  • exactly -- which is why there is no single right answer - without knowing exactly your use pattern, nobody can tell you for sure. – E.J. Brennan May 28 '20 at 09:53
2

Based on the use case scenarios mentioned above, if the solution has to be developed using DynamoDB, it may require main tables and some secondary indexes to search the book by name etc. So, in terms of pricing, AWS will charge you for both main table and secondary indexes read / writes separately.

In general, DynamoDB would give better results if you find by id or key (i.e. Partition key). As soon as you need wildcard search or find some data by non key attributes, you may need to scan the full table or create some secondary index.

If you foresee wide range of features which will be added to your application to give better user experience, you should go with some typical RDBMS option. It will be cost effective and flexible to add more features as well.

You can consider AWS Mariadb if you are going to stick with AWS cloud.

notionquest
  • 37,595
  • 6
  • 111
  • 105
  • Just to understand clearly, "DynamoDB would give better results if you find by id or key" is that mean the for example if i have let say a user table with 1 million users and in that table i have an "id" and a PK index , and the same table in DynamoDB, if i query to get a specific user.id , the DynamoDB will give result faster? is that what you mean, and how much faster, part of seconds or more than 1 sec ? – Q8root May 28 '20 at 09:47