With Heroku, developers don’t need to worry about dyno or container operations while their app is running. Dynos are automatically managed by the platform. A dyno is composed of an isolated virtualized runtime environment and file system. Dynos are ephemeral by design. They are cycled (restarted) at least once a day to help maintain the health of your app and overall system, and they permit graceful exit to process remaining requests. For apps running multiple dynos, each will be cycled at different intervals.
Dyno cycling happens automatically and transparently by the Dyno Manager, and is logged. In addition to scheduled cycling, dynos are automatically restarted with every new code release, add-on change, or config vars change. They can also be restarted manually.
Dyno Runtime
Heroku provides two Dyno Runtimes that are responsible for provisioning, running, monitoring, and managing the lifecycle of each dyno. They also handle dyno crash scenarios. The main difference between the two is the network topology and level of isolation from other tenants:
- Common Runtime – the default, which manages dynos in a single multi-tenant network per region. Each dyno is secured with strong firewall rules to ensure isolation. The are two regions available: EU and US.
- Private Spaces Runtime – is dedicated to managing dynos running in Heroku Private Spaces. On the Private Spaces Runtime, each customer has one or more Private Spaces, each of which has an isolated network, routing layer, and control plane not shared with other apps outside the space. There are ten regions available: Dublin, Frankfurt, London, Montreal, Mumbai, Oregon, Singapore, Sydney, Tokyo, and Virginia.
Dyno Manager
The Dyno Manager is responsible for managing dynos across all applications running on Heroku. It keeps dynos running and cycles them, either automatically or in response to a fault detected in a running application (e.g. out of memory exceptions). For developers, this means that operating apps is generally hands-off and maintenance free. Similar to the Dyno Runtime, there is one Dyno Manager per region and a dedicated Dyno Manager per Private Space.