ElasticSearch vs MongoDB vs Cassandra for mailer logs

夙愿已清 提交于 2019-12-26 02:43:06

问题


I have a mailer system where in we send 1-2 lakhs mail everyday and then we store all the clicks / opens actions of those mail.

This is currently working fine in MySQL.

But now with increasing traffic, we are facing some performance issue with Mysql.

So we are thinking of shifting to Elastic / Cassandra / Mongo.

My possible queries include a) Getting user which have opened / clicked a specific mail or not. b) Calculating open rate / click rate for mail

I think cassandra might not fit here perfectly as it is well suited for applications with high concurrent writes but with less read queries.

Here there can be many types of read queries so it will be difficult to decide on partitioning key / clustering, so too mzny aggregations will be running on cassandra.

What should we use in this case and why?

We are anyhow working on both elastic / mongo to design the data model for both and then run some benchmarks around it.


回答1:


ELK stack (Elastic Search, LogStash, Kibana) is the best solution for this. As far as I have used ELK stack, it is fast for log processing.

Cassandra is definitely not the right option.

You can use MongoDB since most of the queries are GET queries.

But I have a few points why Elastic search gains power over Mongo for Log Processing.

  1. Full-text search : Elastic Search implements a lot of features, such as customized splitting text into words, customized stemming, facetted search, etc.

  2. Fuzzy Searching : A fuzzy search is good for spelling errors. You can find what you are searching for even though you have a spelling mistake.

  3. Speed : Elastic search is able to execute complex queries extremely fast.

As the name itself suggests Elastic search is made for searching purpose. And Searching in mongo is not as fast as Elastic Search.

But Maintaining Elastic Search also has its own problems.

refer: https://apiumhub.com/tech-blog-barcelona/elastic-search-advantages-books/ https://interviewbubble.com/elasticsearch-pros-and-cons-advantages-and-disadvantages-of-elasticsearch/

Thanks, I think this will help.



来源:https://stackoverflow.com/questions/56777796/elasticsearch-vs-mongodb-vs-cassandra-for-mailer-logs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!