Wrapping Up

Let's highlight the main content of this section.

Deploying applications

There are many different ways to deploy an Elixir application. We can customize the deployment process to our or our company’s specific needs and still be successful. One constant in the deployment process is that code needs to be packaged and executed. We can start simple with mix commands to run our application, but we get more features using releases. Releases now come out of the box with Elixir 1.9 and are widely accepted in the community.

Multiple servers

Production applications should use multiple servers to handle requests. This increases redundancy and allows for additional scalability when needed. A load balancer is used to ensure that various back-end servers receive a fair number of requests. WebSockets cause problems with load balancers because WebSocket connections stay open for long periods, so they do not readily become balanced. We can solve this problem at the application level by reconnecting active WebSockets or at the load-balancer level.

Get hands-on with 1200+ tech skills courses.