Answer the question
In order to leave comments, you need to log in
How is MongoDB better than ElasticSearch?
We set the task to deploy mongo in cluster mode. I read the documentation on offsite mongi. Raised 2 VMs with Monga. I found an article about this whole thing on Habré and this one .
I do not quite understand why such wild dances with a tambourine. We get configs on one server, proxying requests on another server, the data itself on a third server.
I'm really sorry, but this sucks. After the elastic, it seems like some kind of bicycle.
Without going into hollivars, please explain in a nutshell how MongoDB is cooler than ElasticSearch.
Explanation for those not in the know:
In elastic, the node role is configured in the config file. ALL. In the config, I set what I need - 5 lines. Launched the node, launched the second one. Opened the web face of the plugin on any of these nodes. And you watch how they gathered in a cluster and scattered shards. (I set up a cluster with 4 nodes)
In mongo, you need to tweak mongos, you need to configure the configuration server, you need to start the server shard .... Then I was killed by the line in the documentation "Add each shard to the cluster using the sh.addShard() method , "
What's the REAL - to add with your hands? And where to observe the operation of the cluster? In general, I'm not thrilled with Monga yet.
So if someone can express their personal opinion based on the experience of managing and using mongi and elastic, I will listen with pleasure.
Answer the question
In order to leave comments, you need to log in
I agree with un1t and with lega , but there are a couple of remarks:
- elasticsearch: fulltext and complex search by projections (reader model). as the main storage, I do not really recommend it, because. kill nodes is 2 random clicks in the web face.
- mongodb: main storage (write model), flexible data structure, write speed.
Have a look at mms.mongodb.com - mongodb deployment, monitoring and backup system.
Of course, there is no point in comparing full-text search here.
But if we consider Mongu and ElasticSearch as a database, then inserting records into Mongu is much faster.
And Mongolian was much more convenient than sending JSON with a curl. There is also such a cool thing as bulk operations .
People use elastic as a database, but the syntax for such purposes seems monstrous.
Another schemaless monga, mappings must be specified in the elastic.
Sharding is not a “tool” for beginners, which is probably why monge has a low-level approach to building an architecture with the expectation of nodes falling, etc., what will happen to the elastic if one of the 4 nodes dies?
In any case, you can make a script (or take a ready-made one somewhere) where by "one click" the sharding will be assembled and expanded.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question