Heroku is a cloud PaaS platform (Platform as a Service), which supports a few programming languages. It is one of the first cloud platforms, because it was being developed already from June 2007. In that time, it only supported Ruby but now it includes the Java, Node.js, Scala, Closure, Python, PHP and Go support. From that reason it is called “polyglot platform”, because it allows developers to build, execute and scale applications the similar way throughout all languages. Heroku was bought in 2010 by Salesforcel.com company.

Architecture

Applications, which run on Heroku, usually have unique domain, which is used for routing http requests to the right containers. Each application container, or dyno, is spread in dyno grid, which consists of a few servers. Git server Heroku evaluates push requests to application repositories and lets through only the approved users.

All Heroku services are hosted on EC2 cloud platform from Amazon.

Deploy

  • Main development content is the source code, connected dependencies, if they exist, and Procfile for commands.
  • Application is sent to Heroku through Git, GitHub, Dropbox or some API.
  • There are packets, which take the app together with all the dependencies and runtime language. These packets are called build-pack and they are the means for compilation process.
  • Slug is combination or association of source code, dependencies, runtime and compiled or generated output build system, which is prepared for executing.
  • Configuration file allows change of the configuration data without the interference to the source code.
  • Add-ons are services of the third parties, which are specialized and can be simply associated with application and by that to extend its functionality.
  • Release is combination of slug (application), configuration file and add-ons.
  • Heroku maintains log of release, which the developer deploys.

Runtime

  • Main unit, which ensures runtime environment are the dyno containers, which are isolated, virtualised Unix containers.
  • The creation of these containers comes from the number of executed containers, divided into the individual processes, which the developer scales.
  • Container manager is responsible for the container management throughout all applications, which are executed on Heroku.
  • One-time containers are temporary containers, which execute their input or output, which is connected to the local terminal. They are loaded with the last release.
  • Each container has own file directory with the fresh copy of the newest release. It can be used as a temporary experimental block, but changes of the file directory don’t reflect to other containers.
  • Logplex automatically connects logs of all executed application containers, similarly as components as are routers, by which creates the only source of information about the activity.
  • Scaling the application includes usage of more containers for every process type.

Advantages of using Heroku

  • Simple beginning. With the usage of Heroku is simple to begin. The is no need to deal with the infrastructure. It is ideal for start-ups, which don’t want to spend time and money by setting the configuration.
  • Scaling. Scaling is simple, specifying the number of containers, which you need, is enough.
  • Usage of standard tools. Possible migration to another service simplifies that Heroku uses standard tools.

Disadvantages of using Heroku

  • Abstraction. Abstraction is at the expense of control. Heroku doesn’t allows direct control over app configuration, in terms of hardware, operating system, firewall or versions. It is needed to use standards, which Heroku defines.
  • The price. During higher traffic, the price is high in comparison to the competing platforms.
  • Manual scaling. Scaling to high traffic is needed to solve manually.
  • SSH. It is not possible to log to the server with the help of SSH.