Server Roles and Processes
In Blossom, servers are assigned roles that determine which processes they run from your application’s Procfile. This flexible system allows you to control how your application processes are distributed across your infrastructure.
How Roles Work
Server roles directly map to process types defined in your application’s Procfile. For example, if your Procfile contains:
web: bundle exec puma -C config/puma.rb --port $PORT
worker: bundle exec rake solid_queue:start
Then assigning the web
role to a server means it will run the web process, while assigning the worker
role means it will run the worker process.
Infrastructure vs Application Roles
Blossom distinguishes between two types of roles:
-
Infrastructure Roles: These are special roles that don’t require application code deployment. Servers with only infrastructure roles won’t have your application code deployed to them.
- Examples:
load balancer
,build
,db
,database
,service
- Examples:
-
Application Roles: These roles require application code deployment and map to processes in your Procfile.
- Examples:
web
,worker
,clock
,scheduler
- Examples:
Role Assignment
- You can assign multiple roles to a single server
- A server will only receive application code deployment if it has at least one application role
- If a server has only infrastructure roles, it won’t receive application code deployment
For more detailed information about specific roles and their purposes, see Server Roles.