How to control million containers

2 minute read

Recently guys from hashicorp (guys who have created Vagrant) presented results from a test that was meant to check their Nomad scheduler would manage to start 1 million docker containers. And it turned out it did and it made it in 5 minutes. Impressive! So after reading this article I wanted to check this Nomad and started to playing around. Here are results of my own tests.

Nomad is 10 times easier to use than Kubernetes

It realy is. They have awesome documentation which makes it easy to install and understand how it works. I’ve managed to run my first Nomad node with a sample job in less than 30 minutes, and after a few days of experimenting I had a whole cluster running with Consul integration.

You can integrate it with loadbalancers

By leveraging consul-template you can alter load balancer configurations such as HAProxy, nginx and apache. That basically means that you can create ready to use environment with one endpoint.

It is universal scheduler perfect for microservices deployments

Of course containers are great, but microservices don’t have to run inside docker containers. Nomad supports many ways of deployin your application using many drivers. If you have Java application for example that can run on a host system inside own JVM environment then you may choose to run plain java process instead. You can also run plain process isolated by cgroups and chroot. And did you know that Docker isn’t the only container engine available? Nomad supports also rkt which I personally find better than Docker. More about it in a separate article.

Integrates easily with one of the best service discovery software

If you had looked for service discovery system then probably you’d have come across Consul which is also a hashicorp product, but is considered as one of the best on the market. It has nice REST interface with built-in web UI. It offers key-value store, service discovery and monitoring. One cool feature is also DNS interface - you can query available services using DNS, how cool is that? So Nomad integrates with it natively - you just define how to check services for availability and they will be registered in Consul automatically. Whenever something bad happens with your service they will be unregistered and won’t be available for users.

High-availability and multi region/datacenter support out-of-the-box

Nomad can be set as a highly available system in multi region and multi datacenter configuration. It has support for RAFT protocol which takes care of node synchronization and cluster formation. It works really well and makes Nomad ready to use in production environments.

It doesn’t support autoscaling (yet)

It’s not perfect however, as it doesn’t allow you to autoscale your environment, but I’ve read that they are working on it and it will be available soon. Until then you can control it manually, as it has really good scheduler with rolling update options.

Don’t trust me - check it youself

I’ve published my little project on github so you can launch it and check how it works.

I plan to test other schedulers such as Kubernetes and Docker Swarm. Will publish results shortly. In the meantime have fun with Nomad!

Categories:

Updated:

Leave a comment