# When should you replace your MongoDB database for Elasticsearch or Timescale?

**URL:** <https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590>\
**Category:** Databases\
**Tags:** opensearch\
**Created:** [September 22, 2022, 9:14pm UTC](https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590 "2022-09-22T21:14:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkcatpirate](https://awshq.com/letter_avatar_proxy/v4/letter/d/df705f/32.png) [@darkcatpirate](https://awshq.com/u/darkcatpirate)\
**Post date:** [September 22, 2022, 9:14pm UTC](https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590/1 "2022-09-22T21:14:45Z")

</div>

I have a logging microservices, and I was wondering if it was always a good idea to replace the MongoDB database to Elasticsearch or Timescale or there are reasons to keep your MongoDB db instead. What are the pros and cons?

* * *

**Related discussions:**

- [Does AWS opensearch serverless vectorsearch index create embeddings internally?](https://awshq.com/t/does-aws-opensearch-serverless-vectorsearch-index-create-embeddings-internally/20039)
- [Elasticsearch multi tenant](https://awshq.com/t/elasticsearch-multi-tenant/5307)
- [Best Practices for Handling PII in LLM Chatbots – Comprehend vs Bedrock Guardrails](https://awshq.com/t/best-practices-for-handling-pii-in-llm-chatbots-comprehend-vs-bedrock-guardrails/20510)
- [EBS → AWS Backup vs AWS Lifecycle Manager](https://awshq.com/t/ebs-aws-backup-vs-aws-lifecycle-manager/13190)
- [How much are you being billed for your AWS services?](https://awshq.com/t/how-much-are-you-being-billed-for-your-aws-services/6367)

---

<div class="post-metadata">

**Author:** ![The\_Luckless2](https://awshq.com/letter_avatar_proxy/v4/letter/t/ac91a4/32.png) [@The\_Luckless2](https://awshq.com/u/The_Luckless2)\
**Post date:** [September 23, 2022, 2:11am UTC](https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590/2 "2022-09-23T02:11:40Z")

</div>

I’d say simplify your stack where it makes sense but 100% depends what you want to accomplish

If I’m managing Ec2s, I usually look to get rid of them with something cloud native

What does your logging microservice do?

---

<div class="post-metadata">

**Author:** ![metarx](https://awshq.com/letter_avatar_proxy/v4/letter/m/aeb1de/32.png) [@metarx](https://awshq.com/u/metarx)\
**Post date:** [September 23, 2022, 3:04am UTC](https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590/3 "2022-09-23T03:04:03Z")

</div>

is there a specific problem your trying to overcome? tech swapping for the sake of tech swapping… its hard to take you serious

---

<div class="post-metadata">

**Author:** ![rdwarak](https://awshq.com/letter_avatar_proxy/v4/letter/r/258eb7/32.png) [@rdwarak](https://awshq.com/u/rdwarak)\
**Post date:** [September 23, 2022, 3:09am UTC](https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590/4 "2022-09-23T03:09:17Z")

</div>

from a generalist perspective, MongoDB, Elasticsearch, Timescale can cater 3 different use cases. Mongo is doc based key value store, Elasticsearch is “Lucene” based search store, TimescaleDB is postegres based timeseries database.

It would help, if you can you break down logging micro services. Example like…

What does it store? logs? or key-value data? any structured data? What are the post-use cases you are considering after storing the data? what is the avg. size of payload? reads / writes ratio? volume of data - nw / after 6 months / 1 yr? how many transactions we talking abt?

---

<div class="post-metadata">

**Author:** ![RunnyPlease](https://awshq.com/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@RunnyPlease](https://awshq.com/u/RunnyPlease)\
**Post date:** [September 23, 2022, 4:59am UTC](https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590/5 "2022-09-23T04:59:40Z")

</div>

The answers to most interesting engineering questions usually start with the words “it depends.” This is no different. There is no such thing as “always.”

How you choose to persist your data should be driven by the type of data and your expected access patterns.

---

<div class="post-metadata">

**Author:** ![vacri](https://awshq.com/letter_avatar_proxy/v4/letter/v/8e8cbc/32.png) [@vacri](https://awshq.com/u/vacri)\
**Post date:** [September 23, 2022, 8:30am UTC](https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590/6 "2022-09-23T08:30:20Z")

</div>

If you’re not feeling any pain points yet, or can’t see any looming on the horizon, keep on with what you’ve already got. If you are feeling pain points, then you know what you want the replacement solution to handle, so evaluate a new database on that.

---

<div class="post-metadata">

**Author:** ![Ani\_56](https://awshq.com/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@Ani\_56](https://awshq.com/u/Ani_56)\
**Post date:** [September 28, 2022, 9:14am UTC](https://awshq.com/t/when-should-you-replace-your-mongodb-database-for-elasticsearch-or-timescale/15590/7 "2022-09-28T09:14:31Z")

</div>

[https://www.inconceptlabs.com/blog/when-not-to-use-mongodb](https://www.inconceptlabs.com/blog/when-not-to-use-mongodb)  
This is your best answer, just read this article
