Deep-dive on the Next Gen Platform. Join the Webinar!

Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Node.js Behavior in Heroku
      • Troubleshooting Node.js Apps
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Heroku Architecture
  • Compute (Dynos)
  • Dyno Behavior
  • Networking

Networking

Last updated December 03, 2024

Table of Contents

  • Common Runtime Networking
  • Private Spaces Runtime Networking
  • Connecting to External Services
  • Additional Reading

Each dyno has its own network interface. The surrounding network configuration depends on the type of runtime.

Common Runtime Networking

The Common Runtime provides strong isolation by firewalling all dynos off from one another. The only traffic that can reach a dyno is web requests forwarded from the router to web processes listening on the port number specified in the $PORT environment variable. Only web dynos can receive inbound requests.

Individual processes within a dyno can bind to any address or port they want and communicate among them using standard TCP. The external networking interface, for example, eth0, for each dyno is part of a /30 private subnet in the range 172.16.0.0/12, such as 172.16.83.252/30 or 172.30.239.96/30. Processes within one dyno don’t share IPs or subnets with other dynos, nor can they observe TCP session state of other dynos.

All dyno types in the Common Runtime can make outbound requests to services running elsewhere on the internet. You can’t control the originating IP address for these requests cannot be controlled.

Private Spaces Runtime Networking

The are two generations of the Private Spaces Runtime: Cedar and Fir

Cedar Private Spaces

Dynos in Cedar-generation Private or Shield Space are all connected via a virtual private network configured as part of the space. Add-on data services installed in the space are also connected to this network.

Similar to the Common Runtime, web processes can receive web requests by listening on the port number specified in the $PORT environment variable. In addition, any process in a dyno can choose to listen on a port number of choice and receive connections from other dynos on the private network.

Use trusted IP ranges to control which client IPs can communicate with the applications in a space.

In addition, apps in Private Spaces can enable Internal Routing on app creation. Unlike other apps, these internal apps can’t receive external web traffic to their web process type. Instead, their web process type can receive traffic from:

  • your other apps running in same space
  • software running in VPC-peered or VPN-connected networks

Dynos in a space make outbound connections to other internet services via a NAT gateway, which ensures that all connections originate from a set of stable outbound IP addresses.

Fir Private Spaces

Custom Trusted IPs, Internal Routing, VPC-peering, and VPN connections are unavailable for Fir-generation Private Spaces. Subscribe to our changelog to stay informed on when we add these features to Fir.

As in Cedar Private Spaces, dynos in a Fir spaces are all connected via a virtual private network configured as part of the space. Add-on data services installed in the space are also connected to this network.

Like Common Runtime and Private Spaces, web processes can receive web requests by listening on the port number specified in the $PORT environment variable.

Dynos can connect to services running in VPC-peered or VPN-connected networks. These services can’t reach dynos in a Fir space directly. They must connect to those dynos over the internet via the apps public DNS name.

Dynos in a space make outbound connections to other internet services via a NAT gateway, which ensures that all connections originate from a set of stable outbound IP addresses.

Connecting to External Services

Applications running on dynos can connect to external services. Heroku can run apps in multiple regions, so for optimal latency run your services in the same region as the app.

Additional Reading

  • Dyno Isolation
  • Private Space Trusted IPs
  • Internal Routing

Keep reading

  • Dyno Behavior

Feedback

Log in to submit feedback.

Rolling Deploys Preboot

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices