Dynos (App Containers)
Last updated December 09, 2024
Table of Contents
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.
Multiple Architecture Choices
With the addition of Fir, Heroku’s next platform generation, we now offer two distinct architectures for dynos. On Fir, dynos are ARM-based. On Cedar, dynos are x86-based. These two architectures can impact application performance and are suitable for specific workloads.
ARM-Based Instances: ARM processors often excel in compute-intensive workloads like data processing, machine learning, and high-performance computing. They can offer significant performance advantages, especially for workloads that can leverage the specific strengths of the ARM architecture.
x86-Based Instances: Generally provide a more mature and widely supported software ecosystem, which can be beneficial for certain workloads. However, for many modern workloads, ARM-based instances can offer comparable or even superior performance.
For Java and .NET workloads, while x86 has traditionally been the dominant architecture for these workloads, recent advancements in the Java and .NET ecosystems have made them increasingly compatible with ARM. However, it’s essential to check the specific compatibility of your applications and libraries with ARM.
Feature Support
Git Deploys
Heroku manages app deployments with Git, the popular version control system. In our Common Runtime, 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.