Learn how to deploy an application to production.
We'll cover the following
We’ll first cover the current landscape of Elixir application deployment and the specific challenges that real-time applications will encounter.
Our (or our company’s) specific needs will dictate how we deploy and run our application—there isn’t a silver bullet for all situations. Deployment techniques also change as new libraries, tools, and platforms emerge. This section is not a guide to deploying Elixir applications, and we won’t code deployment in it. Instead, we’ll receive an overview of current deployment options before we cover more specific real-time problems:
- Load balancing WebSockets.
- Deployment strategies.
- BEAM Node clustering options.
Deployment can be daunting—there’s a lot of things to consider when we first set up an application. However, we’ll gain a reusable set of deployment strategies after we complete our first real-world deployment. It may be frustrating at first, but the reward of a running application is worth it.
We’ll start this section with today’s lay of the land for deploying Elixir applications. We’ll cover topics such as Mix releases versus Distillery and what services can run our application. After that, we’ll discuss load balancing WebSockets and the challenges with persistent connections during deployment. Finally, we’ll see what tools can help us cluster our production BEAM nodes together.
Let’s start with the current landscape for deploying Elixir applications.
The lay of the land
Deploying an app for the first time is a great feeling—it’s one of the final steps to bringing our application to users. However, it’s also daunting. There are many different techniques, platforms, and technologies to deploy, so we’ll need to find what works for us and then implement it. Much of this may already be decided for us based on our company’s decisions, but we may be in a position of greenfield development, with many available options.