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

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?

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?

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

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?

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.

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.

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