5

Currently, I have several Elasticsearch nodes running on several bare metal machines containing indices at the size of TBs. We're in the process of restructuring our infrastructure and I'm not sure if this is the best way.

I have been looking at Docker, Mesos, and Vagrant as alternatives, but I'm not sure if they are even possible. There are four situations I think are relevant (along with the issue I had):

  1. Mesos-Elasticsearch: This package runs Elasticsearch on Mesos. This seems great, but it seems it only allows scaling of data nodes at small disk size. Also, there are no master/client nodes. The package is rather alpha on Github at the moment - I received a 'No route to Host' and MasterNotDiscoveredException error on their default setup. Does anybody have experience with this?
  2. Docker: I'm not too familiar with containers, but Dockerhub has several containers for Elasticsearch. Also, Mesos allows containers to be run on top of it. I'm concerned about the low disk space in each container since my data is in the scale of TBs. Also, the data is persistent. Is resizing the disk of the container feasible or is there a different setup for Docker containers?
  3. Vagrant VMs: I would imagine having a VM for each ES node being suitable to allocate resources. Is there any substantial benefits to this when compared to running on bare metal? This doesn't seem to be compatible with Mesos.
  4. Bare-metal: This is the current setup.

I would like to know which of the four is your preferred setup for an Elasticsearch cluster at the TB level. Pros and cons of each option?

2 Answers2

5

I'm the author of the Apache Mesos Elasticsearch Framework. I would recommend that you try all of these approaches and pick whichever you have the best experience with. And when it comes to performance, make sure you have performance requirements in mind and then perform tests. There are other things to consider, too. Which I'll touch upon in the questions.

  1. The Elasticsearch Framework for mesos is the most resilient of these four options. Elasticsearch nodes are run as Mesos tasks. If any of the tasks fail (hardware or software failure) they are restarted somewhere else within the Mesos cluster. If you want to add nodes (to increase performance) or remove nodes (to reduce resource use) this is as simple as sending a one-line curl request. The data is very safe. The default configuration (can be overridden) replicates all data to all nodes. So the cluster can suffer a catastrophic event and be left with a single node, and not lose any data. You can also use any Docker volume plugin to write the data to an external volume instead, so that if the tasks die, the data are still contained on the cloud volumes. There are a few other features too, check out the website. Also checkout the videos on the Container Solutions youtube channel. We're also developing tools to help make development easier, see minimesos.

  2. This is perfectly reasonable, but you have to think how you would orchestrate your cluster. And what would happen if one or more of the containers died? Can you suffer that loss? If so, this might be the best option for DevOps (i.e. you can replicate and test against a cluster that looks like the real thing).

  3. This is the only option I would be against. It would be fine for development, but you would see a significant performance issue in production. You could, potentially, have a full stack VM (vagrant) inside another VM (cloud). The overhead is unnecessary. Link 1, Link 2.

  4. This is the official Elastic-recommended method and will likely provide the highest performance for a given hardware configuration. But because these are static deployments a) much of the machines' resources would be wasted (unused RAM/CPU/etc.), b) there is a significant (especially in larger organisations!) delay in provisioning new instances (compare to a single api call) and c) if an instance fails it won't be replaced and won't be fixed until someone fixes it (compare to automated failover). If your requirements for Elasticsearch are fixed, you don't need DevOps-like flexibility and you don't mind a bit of downtime, then this is probably the simplest method (but make sure you get your ES configuration right!).

So if it was me, then I would consider the dockerized setup for testing, small POC's and maybe very small production tasks. Anything more than that then I would go for the Mesos Elasticsearch option every time.

Community
  • 1
  • 1
Phil Winder
  • 116
  • 1
  • 4
  • Thanks for the great write-up and work with the ES framework. I'm not the OP, but I'd be specifically interested in how to use RBD volumes like [contiv/volplugin](https://github.com/contiv/volplugin) for example. If I understand this correctly, you worked around the yet missing support for Docker volume drivers of the Mesos persistent volumes, is that understanding correct? – Tobi Mar 16 '16 at 09:25
  • Thanks! When I tried out Elasticsearch Framework, I saw all the benefits you listed. The issues I have with it are 1) when I tried out the demo config, it could only bring up one executor; the other two kept failing and restarting, 2) I wasn't sure how to replace the default elasticsearch.yml configuration in the package (not a big deal - just need to browse into the code to see how), 3) It didn't seem like you could create masters/client nodes (could be related to 2 or irrelevant since managed by mesos?), and 4) you couldn't kill the executors easily (but I think this is a known issue). – CaptainMcChinchillas Mar 16 '16 at 15:46
  • @Tobi: Yes, you are correct! Check out: https://github.com/mesos/elasticsearch/blob/master/docs/index.md#external-volumes CaptainMcChinchillas: Please raise an issue, or email mesos-es@container-solutions.com for support. – Phil Winder Mar 17 '16 at 09:05
  • @CaptainMcChinchillas: In short: 1) probably not enough RAM, get in touch. 2) Pass in the configuration file, see the docs, 3) Correct, masters/clients not crucial, but understand the request. On the backlog. 4) This is by design. It's really bad when es nodes die. So I did all I could to make sure they stay alive! :-) Thanks, and let use know how you get on. Appreciate all the feedback. – Phil Winder Mar 17 '16 at 09:14
  • @PhilWinder Hi! I've encountered this post by accident and thought to ask you a direct question. What's going on with the framework? I've seen no new commits in a long time. Is the project still alive and should be used? – Michal Aug 16 '17 at 11:59
  • @Michal No, it's not active. Funding was pulled. Mesosphere have published a version in dcos-universe: https://github.com/mesosphere/universe, and have now integrated a more featureful version into https://github.com/mesosphere/dcos-commons. Check out those. – Phil Winder Sep 20 '17 at 13:46
1

My company has more or less the same questions, but maybe is a litte further down the road when it comes to have a POC etc.

Currently, we're running a 3 node ES cluster on Mesos 0.27.1 via Marathon with a custom Docker image. We mount host volumes (paths) in the containers, which means that that you can mount for example a Ceph volume on the Mesos Slave's host. But this is somehow a quite manual process. The biggest issue is in my eyes the data safety, because by default the data is only stored on the host itself, and the behavior when the application is scaled in Marathon (constraints have to be used, so that only one node is run per Mesos Slave etc.).

We also tried the mentioned Mesos ES framework a few months ago, but were not satisfied with the state of the framework back then. From what I see on the docs it improved a lot during the last months, but some important features are still missing from Mesos (persistent volumes support for Docker volume drivers for example)... But this is not an issue of the framework, but with Mesos.

I'll give the Mesos framework another try soon. I especially like the possibility to set --externalVolumeDriver, which would mean that we now can probably use the Docker RBD volume driver (as we're using Ceph)...

Tobi
  • 31,405
  • 8
  • 58
  • 90
  • Tobi, the mesos ES framework does support external volumes. See https://github.com/mesos/elasticsearch/blob/master/docs/index.md#external-volumes. More feedback means more features. Let me know what you think. Thanks! – Phil Winder Mar 17 '16 at 09:08
  • @PhilWinder Thanks for your feedback. What I didn't understand is if/how the volumes are then mapped in the node's container. Is this done automatically? – Tobi Mar 17 '16 at 11:46
  • Yes, this is done automatically. Only the data directory is mapped to the volume. – Phil Winder Mar 17 '16 at 16:54