Dynos (App Containers)
Last updated October 28, 2024
Dynos are Heroku-managed Linux containers that provide secure, scalable compute for your applications. All Heroku applications run on dynos.
Use Cases
Each dyno can have one of the following configurations that allow for a variety of use cases:
- Web dynos are containers where your application code runs. They handle incoming HTTP requests and serve responses. Use them to run your web applications, API services, microservices, and more.
- Worker dynos are typically used to run background jobs, queueing systems, and timed jobs. You can have multiple kinds of worker dynos in your application.
- One-off dynos are temporary dynos that can run detached, or with their input/output attached to your local terminal. Use them for administrative tasks, such as database migrations and console sessions. You can also run occasional background work with them, as with Heroku Scheduler.
You can designate process types for your dynos in your Procfile.
Benefits
Managed
Heroku’s dyno managers keep dynos running automatically. Operating your app is generally hands-off and maintenance-free. The Common Runtime has a single dyno manager per region responsible for managing all dynos for all customers running in a region. The Private Spaces Runtime has a dedicated dyno manager per space. Each dyno manager only manages the dynos that run within its space.
Scalable
On Heroku, you can scale your app by adjusting the size and number of dynos.
You can scale your app vertically by changing its dyno size to match its memory and compute needs. For more information, see Guidance for Choosing a Dyno.
To scale horizontally, you can change the number of dynos. For example, adding more web dynos allows you to handle more concurrent HTTP requests, and therefore higher volumes of traffic. Horizontal scaling is unavailable for Eco and Basic dynos. For more information, see Scale Your Dyno Formation.
Isolated and Secure
All dynos are strongly isolated from one another for security purposes. Heroku uses OS containerization, with additional custom hardening to restrict access. Some dyno tiers also have their own dedicated compute instance or networking.
Feature Support
Git Deploys
Heroku manages app deployments with Git, the popular version control system. In addition, we also support deploying apps that use Docker images.
Automatic Base Image Updates
Heroku automatically updates officially supported base images with changes such as OS patching. Most apps automatically pick up the updates when their dynos restart. Only apps using Docker must rebuild their Docker images to pick up the updates. See the Base Image Update Policy for more info.
Language Version Support Updates
Heroku provides regular and timely updates to support new language versions as they become available. Subscribe to our changelog or check each language’s support docs to see currently supported versions.
Free SSL and Automated Certificate Management
Heroku SSL is a combination of features that enables SSL for all Heroku apps. Heroku SSL uses Server Name Indication (SNI), an extension of the widely supported TLS protocol. You can use Heroku’s Automated Certificate Management (ACM) feature or manually upload your own certificates.
Custom Domain Support
You can add custom domains to any Heroku app.
Logging
Heroku aggregates your app’s logs from the output streams of all of its running processes, system components, and backing services. Log lines emitted by your dynos show up in a particular format and you can filter logs by a specific dyno.
Ephemeral Filesystem
Each dyno gets its own ephemeral filesystem, with a fresh copy of the most recently deployed code. During the dyno’s lifetime, its running processes can use the filesystem as a temporary scratchpad, but no files that are written are visible to processes in any other dyno. Any files written get discarded the moment the dyno stops or restarts, including automatic restarts.
Additional Features
Heroku provides a number of different dyno sizes each with a set of unique properties and performance characteristics. Certain features are available for specific tiers of dynos, such as Metrics, Autoscaling, Preboot, and Rolling Deploys. You can also choose dynos with dedicated compute resources, dedicated networking, or HIPAA compliance. See Dyno Tiers and Technical Specifications by Dyno Size for more info.
Pricing and Billing
We limit access to Performance dynos to customers with an established payment history. Private and Shield dynos are only available with Private Spaces and Shield Spaces.
Heroku charges for dynos based on usage, except for the Eco Dynos Plan. See Dynos Usage & Costs for more info, or Dyno Units if you’re an Heroku Enterprise customer.