Overview
Heroku is a cloud platform as a service (PaaS) that facilitates the deployment, operation, and scaling of applications. Founded in 2007 and acquired by Salesforce in 2010, Heroku abstracts infrastructure management, allowing developers to focus on application code. The platform supports a variety of programming languages, including Ruby, Python, Node.js, Java, PHP, Go, Scala, and Clojure, through its buildpack system. This polyglot capability makes it suitable for diverse development teams and projects.
The core of Heroku's architecture revolves around "Dynos," which are isolated, virtualized Linux containers that run application code. Developers deploy applications by pushing code to a Heroku Git remote, triggering an automated build process that bundles the application with its dependencies and runtime. This Git-based workflow streamlines continuous deployment practices.
Heroku is often selected for rapid prototyping and the deployment of small to medium-sized web applications due to its developer-centric experience. It provides managed services for databases (Heroku Postgres, Heroku Redis), messaging queues (Heroku Data for Kafka), and data integration (Heroku Connect). The platform also offers an extensive add-on marketplace, allowing developers to integrate third-party services for monitoring, logging, and other functionalities without complex setup.
While Heroku previously offered a free tier, it was discontinued on November 28, 2022. The platform now operates on a paid-tier model, with Eco Dynos as the entry point for shared resources. Its compliance certifications, including ISO 27001, SOC 1 Type II, SOC 2 Type II, PCI DSS Level 1, and GDPR, address enterprise requirements for security and data privacy, which can be a consideration for technical buyers evaluating PaaS solutions for regulated industries. For comparison, other PaaS providers like Vercel focus on frontend frameworks and serverless functions, offering alternative deployment paradigms for specific application types, as detailed in their documentation on deployment strategies.
Key features
- Dynos: Isolated containers for running application code, available in various performance tiers (Eco, Basic, Standard, Performance) to match application demands.
- Buildpacks: Automatically detect the application's language and dependencies to compile and run code, supporting a wide range of programming environments without manual server configuration.
- Git-based Deployment: Enables deployment by simply pushing code to a Heroku Git remote, automating the build and release process.
- Add-ons Marketplace: A catalog of third-party services (databases, caching, logging, monitoring) that can be provisioned and integrated with applications through the Heroku CLI or dashboard.
- Heroku Postgres: Managed PostgreSQL database service, providing automated backups, replication, and scaling options.
- Heroku Redis: Managed Redis service for caching and transient data storage.
- Heroku Data for Kafka: Managed Apache Kafka service for real-time data streaming and event-driven architectures.
- Heroku Connect: Bi-directional data synchronization between Heroku Postgres and Salesforce organizations.
- Heroku CLI: A command-line interface for managing applications, add-ons, and configurations directly from the terminal.
- Application Metrics: Built-in dashboards to monitor application performance, response times, and resource utilization.
Pricing
Heroku's pricing structure is based on Dyno types and usage, with additional costs for managed data services and add-ons. The free tier was discontinued on November 28, 2022.
| Dyno Type | Starting Price (per month) | Description |
|---|---|---|
| Eco Dynos | $5 | Shared resources, suitable for personal projects and low-traffic applications. |
| Basic Dynos | $7 | Dedicated resources, suitable for hobby projects and small-scale applications. |
| Standard Dynos | $25 | Dedicated resources with increased memory and CPU, suitable for production applications with moderate traffic. |
| Performance Dynos | $250 | High-performance dedicated resources for demanding applications requiring consistent throughput and low latency. |
For detailed pricing information on data services, add-ons, and compute hours, refer to the official Heroku pricing page.
Common integrations
- GitHub: Direct integration for continuous deployment from GitHub repositories. Developers can configure automatic deployments on every push to a specified branch, as described in the Heroku GitHub integration guide.
- Managed Databases: Heroku Postgres, Heroku Redis, and Heroku Data for Kafka integrate seamlessly with applications deployed on the platform, offering managed data storage and streaming capabilities.
- Logging and Monitoring: Add-ons like Papertrail for log management and New Relic for application performance monitoring provide extended visibility into application health and behavior.
- CI/CD Tools: While Heroku offers direct Git deployment, it can also integrate with external CI/CD pipelines like Travis CI or CircleCI to run tests before deploying to Heroku.
- Cloudinary: An image and video management add-on for media storage, optimization, and delivery.
- SendGrid: An email delivery add-on for sending transactional and marketing emails from Heroku applications.
Alternatives
- Vercel: A cloud platform for frontend frameworks and static sites, offering serverless functions and global CDN.
- Netlify: A platform for building, deploying, and scaling modern web projects, emphasizing serverless functions and continuous deployment.
- AWS Amplify: A set of tools and services for building scalable mobile and web applications on AWS, including hosting, authentication, and serverless backends.
- Google App Engine: Google Cloud's fully managed platform for building and running scalable web applications and mobile backends.
- Azure App Service: Microsoft Azure's fully managed platform for building, deploying, and scaling web apps, mobile backends, and RESTful APIs.
Getting started
To get started with Heroku, you typically install the Heroku CLI, log in, create a new application, and deploy your code via Git. The following example demonstrates deploying a simple Node.js application.
- Install the Heroku CLI: Follow the instructions on the Heroku Dev Center for CLI installation.
- Log in to Heroku:
heroku login - Create a simple Node.js application:
Create a directory for your project and add an
index.jsfile:// index.js const express = require('express'); const app = express(); const port = process.env.PORT || 3000; app.get('/', (req, res) => { res.send('Hello from Heroku!'); }); app.listen(port, () => { console.log(`App listening on port ${port}`); });Create a
package.jsonfile:{ "name": "my-heroku-app", "version": "1.0.0", "description": "A simple Node.js app for Heroku", "main": "index.js", "scripts": { "start": "node index.js" }, "dependencies": { "express": "^4.18.2" } } - Initialize a Git repository and commit your code:
git init git add . git commit -m "Initial commit" - Create a Heroku application and deploy:
heroku create your-unique-app-name # Replace with a unique name git push heroku main - Open your application in the browser:
heroku open