How do Clusters work?

Hatchbox.io organizes deployments using Clusters

Written by Chris Oliver
Updated over a week ago
A cluster is a group of servers. Each server is given a set of roles to define its responsibilities in the cluster.

When Hatchbox deploys an application to a cluster, it will be deployed according to the roles on the servers. For example, let's say you have a cluster with a load balancer, 2 web servers, cron & background server, and a database server. Hatchbox will deploy your application code to the 2 web servers and the cron & background server because all of those need your application code. If you add a cron job, Hatchbox will log in to the cron server and add the new cron job to it. If you add another web server, the load balancer will be updated with the new IP address of the web server and we'll also deploy code to it.

Multiple Apps on the Same Cluster
Deploying multiple apps to the same cluster means each application gets deployed to the web, cron, and worker servers at the same. This is handy if you're hosting lots of side projects or hosting apps for clients. You save money by using fewer servers.

Separate Staging and Production Environments
If you want separate staging and production environments, you will create two separate clusters. Your staging cluster might be a single server that runs everything to keep costs down. These will be totally separate allowing you to change them independently.

Was this article helpful?