Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 37 ยท Getting Started

What Is Heroku?

Learn what Heroku is, what a platform as a service does for you, how it differs from servers and containers, and what you can and cannot practice on this site.

Heroku is a platform as a service (PaaS). You give it your application code, and it builds the app, starts it on managed machines, gives it a web address, collects its logs and restarts it when it crashes. You do not rent a server, install an operating system, configure a web server or patch anything. You push code, and a running app comes out the other side.

That trade is the whole point of the product: you give up some control and some money in exchange for a lot of time. This lesson explains what that trade looks like, where Heroku fits among other ways to host software, and how this tutorial is organized.

Honest note about this tutorial. Heroku is a hosted commercial service, and this site cannot log in to your account or deploy anything for you. The commands, menus and file formats in these lessons are described exactly, but no output is ever invented. Where a runnable example appears, it is a clearly labelled Python stand-in: a small program that models an idea (billing hours, release numbers, buildpack detection) so you can experiment with the logic. The real service is something you try in your own account.

What a PaaS does for you

Hosting a web app yourself involves a long list of jobs. A PaaS takes over most of them.

Job On your own server On Heroku
Operating system updates You Heroku (you choose a "stack" version)
Installing the language runtime You The buildpack
Process supervision and restarts You (systemd, Docker) The platform
HTTPS certificates You (or a tool) Automatic for default domains and managed for custom ones
Load balancing and routing You The Heroku router
Log collection You heroku logs and log drains
Databases You Add-ons such as Heroku Postgres
Scaling out New servers and config One command or a slider

You still write the application, choose the data model, handle security inside the app and watch the bill. A PaaS removes infrastructure toil, not engineering.

The core ideas in one picture

Almost everything in this course builds on five words: app, dyno, buildpack, release and add-on.

Heroku in four words

App Your code plus its settings.
Buildpack Turns code into a runnable build.
Dyno A small container running one process.
Release A build plus its config, versioned.

Add-ons come next. Each word gets its own lesson.

1 / 2

An app is the unit you create and name. Its source code is turned into a slug (a compressed, ready-to-run copy of your app) by buildpacks. The slug runs on dynos, which are lightweight Linux containers. Each time you deploy or change a setting, Heroku creates a numbered release. Add-ons are third-party or Heroku-run services (Postgres, Redis, logging, email) that you attach to the app with one command.

Where Heroku fits

Compare it with the other common choices:

  • Virtual server (VPS). Maximum control, maximum chores. You manage the OS, the process manager, TLS and backups. Cheapest per unit of compute when you have the skills.
  • Containers on your own orchestrator (Kubernetes, Docker Swarm). Powerful and portable, and also a lot to learn and operate.
  • Platform as a service (Heroku and similar products). You deploy code or a container image; the provider runs it. Fast to start and pleasant for small teams.
  • Serverless functions. You deploy single functions that run on demand. Great for spiky event-driven work, awkward for long-lived web apps with state.

Heroku is a good fit when you want to ship a web app, API or background worker quickly, you value a simple deploy workflow, and you can afford to pay for convenience. It is a weaker fit for very cheap hosting at large scale, workloads that need special hardware, or systems that must run in a specific region or cloud that Heroku does not offer. Later lessons, especially Heroku alternatives, come back to that decision.

Languages and workloads

Heroku supports Node.js, Ruby, Python, Java, PHP, Go, Scala, Clojure and more through official buildpacks, and anything else through community buildpacks or Docker images. The same platform runs very different workloads:

  • Web processes that receive HTTP traffic from the router.
  • Worker processes that pull jobs from a queue and never receive HTTP.
  • One-off processes such as a database migration or a data import.
  • Scheduled jobs run on a timer by an add-on or by the scheduler.

A tiny stand-in: how many dyno hours does a month have?

Prices and plan names change, so this course teaches the ideas and tells you to check the pricing page for numbers. Billing is by the second while a dyno runs, so it helps to see how running time becomes hours. The program below is a stand-in cost model. The hourly rate in it is an invented number for practice, not a real Heroku price.

Python Stand-in: dyno running time to billable hours

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The shape of the answer is what matters: cost grows with the number of dynos and with how long they run, and stopping a dyno stops the meter.

A second stand-in: the five words as data

Writing the vocabulary as data makes the relationships concrete. Notice that one app has many releases but a release points at exactly one slug.

Python Stand-in: an app, its releases and dynos

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Releases 2 and 3 share a slug because changing a config var creates a new release without rebuilding the code.

Common misunderstandings

  • "Heroku is a database." Heroku runs your code; Postgres and friends are add-ons you attach.
  • "My files are saved on the dyno." The filesystem is temporary and wiped at every restart. See dyno lifecycle and the ephemeral filesystem.
  • "It is free." The old free dyno tier was discontinued in November 2022; the cheapest plans are paid. Check the current pricing page before you build something you plan to leave running.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does a platform as a service (PaaS) mainly take off your hands?

    A PaaS handles infrastructure toil such as the OS, process supervision, routing and certificates. You still own the code, the data model and application security.
  2. 2. In Heroku vocabulary, what is a dyno?

    Dynos are small Linux containers. Each runs one process, such as a web server or a worker.
  3. 3. When you change a config var, what happens?

    Config changes create a new numbered release that reuses the existing slug, and the dynos restart with the new settings.
  4. 4. Which workload is a poor fit for relying on the dyno's own disk?

    The dyno filesystem is ephemeral and is reset on restart, so permanent files belong in an add-on or external storage.

Summary

  • Heroku is a PaaS: you supply code or a container image, and it builds, runs, routes and monitors the app.
  • The core vocabulary is app, buildpack, slug, dyno, release and add-on.
  • Convenience costs money, and the free tier no longer exists, so always read the current pricing page.
  • This course describes the real product precisely and uses labelled Python stand-ins for the ideas you can run here.

Next: How the Heroku platform works