Dynamo Db vs Elastic Search

I was just reading about elastic search and found that it indexes every term in the document as well as all fields. Although it has some disadvantages such as it cannot secure transactions, etc. But for an application where I only need to read data from the DB and there is no write, is there any advantage to using Dynamo Db instead of Elastic Search. I used to think to use Dynamo Db, but now after seeing that it indexes every field, so why not use Elastic Search. So far, the only use case defined for my project is searching by id. But more use cases will come in the future, then it would be very difficult to add more indexes to Dynamo Db, but it would already be in Elastic Search.

Can anyone tell me some of the benefits of Dynamo Db vs. Elastic Search.

Please give your suggestions.

+3


source to share


1 answer


I've used elasticsearch and MongoDB but not a lot of Dynamodb. MongoDB performs very well in terms of indexing and strong consistency.

Few things I know about elasticsearch and DynamoDB;

elasticsearch is a search engine where you can search for any conditions or aggregate records by specific criteria, but it also serves as a repository of documents, although this was not the main purpose. And definitely great for writing less and reading.

some advantages of elasticsearch

Disadvantages of elasticsearch

  • has no atomicity (A in ACID) between multiple documents

  • you can check the security settings, last time i used it, maybe version 3 didnt have a good option

Dynamodb , on the other hand, is a data store (technically called document store / Amazon MongoDB version).



<strong> benefits

When a document is written to a DynamoDB table and receives an HTTP 200 response, all copies of the document are updated. The document will ultimately need to be consistent across all storage locations, usually within one second or less.

When you request a strictly sequential read, DynamoDB returns a response with the most recent data, reflecting updates from all previous writes that were successful. Strongly consistent reads may not be available in the event of a network delay or outage.

But it has some limitations ,

  • only supports 40KB records for 1KB / sec documents per table = which would be 400 records for 100KB / sec documents (in our eastern region)

    only supports 10K records for 1KB documents / for each table in other regions.

  • max 40K reads for 4KB / sec documents per table (in our east region)

    only supports 10K reads for 4K documents / table in other regions.

    so calculate your throughput based on average document size and see what DynamoDB is good for

  • the maximum document / item size in dynamodb is 400KB (link to s3 might do the trick if the document size is over 400KB, but it still depends if you really want to go that route) / MongoDB can be an alternative that allows up to 16M document .

  • you can only get 1000 KB

    documents from DynamoDB on one request

So basically,

  • desired throughput,
  • ACID-compliancy (DynamoDB +1),
  • the size of each document (elasticsearch +1, MongoDB +1) and
  • safety can be a deciding factor.

I would also like to consider using MongoDB vs DynamoDB as MongoDB is open source, has all non-A features in Atomicity, and is also supported by AWS .

+5


source







All Articles