OTP Releases vs Containerisation, and other thoughts about 'Prod'

I’m currently working on an Elixir application and having been thinking a far amount about deployment options. In the end, I’ve settled on using the new Elixir release feature to create OTP applications which I will then push to a VM.

That said, the common fashion appears to be containerisation…
Do you think I’d be making a mistake in overlooking Dockerising?

I gain encapsulation via the OTP release for a start, so I don’t see that as an advantage. I also feel it will be easier to directly account for the resources the app will use on a given machine (CPU cores, RAM, ports, etc) without Docker. But I’m very interested in other opinions on this.

Also, as an aside (though possibly related), I’m planning to serve the application on a load balanced cluster. Should I ever need to scale up (:rofl:), especially modestly, what should I favour?

Vertical or horizontal scaling first?

My instinct is to want to scale vertically to start, until it becomes clear that the network resource for a single unit is the bottle neck, but I’m sure there are better heuristics available than that…

Any advice or anecdotes regarding either concern (Docker vs OTP and scaling) will be welcome.

1 Like

Usually it is easier to downscale horizontally than vertically, so if you consider dynamic scaling, then you should go by that until you have the feeling you need to upscale your baseline nodes.

Watch this talk ElixirConf 2018 - Docker and OTP Friends or Foes - Daniel Azuma

We at work are building a release in Docker, and also deploying it as a Docker image.

3 Likes

This is pretty interesting. Thanks.