Heroku

From IndieWeb

Heroku is a platform as a service (PaaS) that supports Ruby, Java, Node.js, Scala, Clojure, Python, PHP and others. Heroku previously offered a free tier but is discontinuing that as of 2022-11-28 [1].

Costs

Heroku announced on 2022-08-25 that the free tier will be phased out and inactive accounts deleted:

โ€œ...we will be phasing out our free plan for Heroku Dynos, free plan for Heroku Postgres, and free plan for Heroku Data for Redisยฎ, as well as deleting inactive accounts.

Starting October 26, 2022, we will begin deleting inactive accounts and associated storage for accounts that have been inactive for over a year. Starting November 28, 2022, we plan to stop offering free product plans and plan to start shutting down free dynos and data services. We will be sending out a series of email communications to affected users.โ€

Previously

A 512MB dyno (approximately equivalent to a small VPS instance) is $0.05 / hour or about $36 / month, but Heroku credits each app with enough free hours to run 1 dyno for 1 month. Heroku's pricing model has changed, effective 2015-07-01[2]. Free tier apps are limited to 18 hours/day uptime, with a new "hobbyist" tier for $7 per application per a month. The new $7 tier has the advantage over the old free tier that it is not put to sleep when inactive.

Postgres storage is free up to 10k rows, and $9 a month up to 10M.

Trade Offs

Apps running on only one dyno will be spun down if they have not accessed for about an hour. This generally means that there is some latency the first time you access an app while it starts up. The amount of time depends on dependencies etc.

Heroku uses an ephemeral file system. Apps can read any files from the file system at any time. Apps can write files to the file system. But any files written to the the file system since the last `git push` can not be expected to exist after the app's dyno is spun down and then back up again. File-storage is instead encouraged to be done on an asset host (like S3) or in the app's git repo.

  • Kevin Marks gets around this by storing post content in the source repository.
  • Shane Becker uses the database to store content and S3 to store assets.

Apps can't "shell out" once they're up and running. They can do basically anything on the shell at boot time, but not after they're booted up.

Custom Domains

Because DNS CNAME-records can point to a Heroku proxy DNS name rather than hardcoding an IP address, and CNAME cannot generally apply to a root domain name, Heroku recommends the use of subdomains exclusively (e.g., www.), or a DNS provider that supports special root-level CNAME or ALIAS records. [3][4]

See also:

Amazon works around this issue by using A-records with a short TTL value, and updating them dynamically when IP addresses change.

HTTPS Support

SSL/TLS certificates may either be obtained manually or automatically using Herkou's Automated Certificate Management.

IndieWeb Examples

See Also