Heroku is a cloud platform as a service (PaaS) that builds, runs and scales web applications from source code, so developers deploy an app without provisioning or administering servers. In hosting, Heroku is the classic example of application-centric hosting: the customer supplies code and configuration, and the platform handles operating systems, runtimes, routing and process management.
Founded in 2007 and owned by Salesforce since 2010, Heroku popularized the git push deployment model and the twelve-factor app methodology. It supports Node.js, Ruby, Python, Java, PHP, Go, Scala and Clojure through official buildpacks, and runs workloads on infrastructure provided by Amazon Web Services.
How Heroku builds and runs applications
Heroku turns source code into a running service through a build, release and run pipeline. A deployment starts when the developer pushes code to a Heroku git remote or connects a GitHub repository, after which a buildpack detects the language, installs dependencies and compiles the app into a compressed, ready-to-run package called a slug.
The slug is combined with config vars, which are environment variables holding credentials and settings, to form an immutable release. Heroku then starts the release on dynos, which are isolated Linux containers. A text file called the Procfile declares the process types, such as a web process that receives HTTP traffic and worker processes that handle background jobs.
The table below summarizes the core concepts a Heroku user works with every day.
| Concept | What it is | Why it matters |
|---|---|---|
| Dyno | Isolated Linux container running one process | Unit of compute, scaling and billing |
| Buildpack | Script set that compiles code for a language | Removes manual server setup |
| Slug | Compiled, compressed app bundle | Starts quickly on any dyno |
| Procfile | List of process types and commands | Defines web and worker roles |
| Config vars | Environment variables per app | Keeps secrets out of code |
| Add-ons | Managed services attached to an app | Databases, caching, logging, email |
Incoming requests pass through the Heroku router, which distributes HTTP traffic across all running web dynos. The router enforces a 30-second timeout for the initial response, so long-running tasks belong in worker dynos fed by a queue rather than in web requests.
Dyno types and scaling options
Heroku offers several dyno tiers that differ in memory, CPU share, isolation and features. Applications scale horizontally by adding dynos of the same type and vertically by moving to a larger type, both through the dashboard or a single command.
| Tier | Typical use | Notable traits |
|---|---|---|
| Eco | Hobby projects and prototypes | Sleeps after inactivity; shared hour pool |
| Basic | Small apps that must stay awake | No sleeping; single dyno per process type |
| Standard | Production apps with moderate traffic | Horizontal scaling and preboot |
| Performance | High-traffic or memory-heavy apps | Dedicated compute; autoscaling for web |
| Private and Shield | Regulated or isolated workloads | Private Spaces network isolation; compliance controls |
Free dynos were discontinued in November 2022, ending a long period in which Heroku served as the default sandbox for students and side projects. Since then, the low-cost Eco and Basic tiers fill that role, and exact prices should be checked at the time of purchase because they change.
Heroku compared with other hosting models
Heroku sits between raw infrastructure and fully abstracted serverless platforms. It trades control for convenience: the team gives up operating system access and fine-grained network tuning, and in return avoids patching, provisioning and most deployment scripting.
| Option | Unit of deployment | Operations burden | Best fit |
|---|---|---|---|
| Heroku | Long-running app processes | Low | Server-rendered apps, APIs, workers |
| Vercel and Netlify | Static assets and functions | Very low | Front-end frameworks and Jamstack sites |
| Virtual private server | Whole virtual machine | High | Custom stacks needing full root access |
| Managed hosting | Server administered by provider | Low to medium | Traditional sites such as WordPress |
| Container orchestration | Containers on clusters | High | Large teams with platform engineers |
Compared with Vercel and Netlify, Heroku is better suited to persistent processes, such as background workers, WebSocket servers and scheduled jobs. Compared with providers such as DigitalOcean or Hetzner, Heroku usually costs more per unit of compute, which the team pays to avoid administration work.
When Heroku is the right choice
Heroku fits best when developer time is scarcer than compute budget. Small teams, startups validating a product and agencies maintaining many modest applications benefit most, because a deployment pipeline, a managed Heroku Postgres database and log access are available within minutes.
Useful workflow features include pipelines that promote the same slug from staging to production, review apps that create a temporary environment for each pull request, and a release phase that runs database migrations before new dynos receive traffic. These features encourage repeatable releases with fast rollbacks to any previous release.
The decision table below matches common situations with a recommendation.
| Situation | Recommendation | Reason |
|---|---|---|
| Early-stage product with a small team | Use Heroku | Fast setup, no server administration |
| Steady high traffic with tight margins | Consider infrastructure as a service | Compute costs grow quickly at scale |
| Purely static front end | Use static site hosting | Lower cost and global CDN delivery |
| Need for custom kernel or system packages | Use a virtual server or containers | Dynos restrict system-level changes |
| Strict data residency outside offered regions | Evaluate other providers | Region choice is limited |
Limitations and common pitfalls on Heroku
The most frequent surprise for newcomers is the ephemeral filesystem. Files written to a dyno disappear when the dyno restarts, and dynos are restarted at least once a day in a process called dyno cycling, so uploads and generated files must go to external object storage.
- Request timeouts at 30 seconds break slow report generation or large uploads handled inside web requests.
- Memory quotas per dyno trigger errors and slowdowns when an app exceeds its allowance.
- Cost growth at scale often prompts migration once traffic becomes large and predictable.
- Vendor-specific conventions, such as add-on provisioning, require rework when moving elsewhere, although twelve-factor apps port relatively easily.
- Limited regions constrain latency-sensitive or data-residency requirements.
Most of these limits are design constraints rather than defects. Applications built as stateless processes with external storage and queues run reliably on Heroku and remain portable to other platforms.
Understanding it simply
Running a website usually means renting a server, installing software and keeping it updated. Heroku takes that job away. A developer hands over the code, and Heroku packages it, starts it and keeps it running on the internet.
It is similar to renting a fully furnished, serviced apartment instead of buying a house and fixing the plumbing yourself. You pay more per month, but you spend your time on your own work, not on maintenance. When more visitors arrive, you simply add more running copies of the app.
Applied in practice
A three-person startup builds a booking API in Python with a background worker that sends confirmation emails. Instead of hiring an operations engineer, the team deploys to Heroku with a Procfile defining one web process and one worker, attaches Heroku Postgres and a key-value store as add-ons, and stores API keys in config vars.
Each pull request gets a review app for testing, and approved changes are promoted from staging to production through a pipeline. When a marketing campaign triples traffic, the team scales from two to six Standard web dynos in under a minute and scales back afterward. Customer photos go to external object storage because of the ephemeral filesystem. The team ships features weekly with no dedicated infrastructure staff.