Lightbend Activator

Reactive Scales

Activator will be EOL-ed on May 24, 2017.

We’re making it easier and simpler for developers to get started with Lightbend technologies. This unfortunately means that future releases of Play, Akka and Scala will no longer include Activator support, and Lightbend’s Activator server will be decommissioned by the end of 2017. Instead of supporting Activator to create and set up development projects, we'll be supporting standard Giter8 templates for sbt users and Maven archetypes for Maven users. So going forward,

To create new Lightbend projects

Instead of using the Activator command, make sure you have sbt 0.13.13 (or higher), and use the “sbt new” command, providing the name of the template. For example, “$ sbt new akka/hello-akka.g8”. You can find a list of templates here.

Also, as a convenience, the Lightbend Project Starter allows you to quickly create a variety of example projects that you just unzip and run.

To create new templates

If you want to create new templates, you can now do that in Giter8.

To migrate templates from Activator to Giter8

If you created Activator templates in the past, please consider migrating them to Giter8 with this simple process.

Reactive Scales

March 18, 2014
demo reactive

A demonstration of how Reactive scales with the Typesafe Reactive Platform.

How to get "Reactive Scales" on your computer

There are several ways to get this template.

Option 1: Choose reactive-scales in the Lightbend Activator UI.

Already have Lightbend Activator (get it here)? Launch the UI then search for reactive-scales in the list of templates.

Option 2: Download the reactive-scales project as a zip archive

If you haven't installed Activator, you can get the code by downloading the template bundle for reactive-scales.

  1. Download the Template Bundle for "Reactive Scales"
  2. Extract the downloaded zip file to your system
  3. The bundle includes a small bootstrap script that can start Activator. To start Lightbend Activator's UI:

    In your File Explorer, navigate into the directory that the template was extracted to, right-click on the file named "activator.bat", then select "Open", and if prompted with a warning, click to continue:

    Or from a command line:

     C:\Users\typesafe\reactive-scales> activator ui 
    This will start Lightbend Activator and open this template in your browser.

Option 3: Create a reactive-scales project from the command line

If you have Lightbend Activator, use its command line mode to create a new project from this template. Type activator new PROJECTNAME reactive-scales on the command line.

Option 4: View the template source

The creator of this template maintains it at

Option 5: Preview the tutorial below

We've included the text of this template's tutorial below, but it may work better if you view it inside Activator on your computer. Activator tutorials are often designed to be interactive.

Preview the tutorial

Reactive Scales

The Reactive Scales application has been created! This application illustrates the great performance of Reactive applications built with the Typesafe Reactive Platform.

Right now the server is running in development mode which provides a productive environment where you just hit refresh in your browser to see your code changes. Check the server status by going to Run. In development mode every request checks the file system for changes to see if something needs to be recompiled. To run a performance test we need to disable this by running in production mode. To do that first stop the app in Run. From a command line in this project's root directory run this application in production mode:

  • On Linux and Mac:
    ./activator -Dpidfile.path=MY_PID start
  • On Windows:
    activator -Dpidfile.path=MY_PID start

The application should be started and you can open it in your browser: http://localhost:9000

There you should see three charts, one that tracks the number of requests per second, a chart that indicates how much memory this application is using, and one that shows how much CPU the application is using. These values are pushed from the server to the client every 100 milliseconds using a Comet channel.

To test the performance of this application lets send one million requests to it (100 concurrent).

  • On Linux:
  • On Mac:
  • On Windows:

You should see the charts begin to dial up. It will take 100,000 or so requests before the JVM is warmed up. Then you should get around 40k requests per second. (These results can vary based on number of CPUs, JVM version, and operating system.) You will see the memory bounce around as the JVM garbage collector does it's job. (Note: The JVM will usually try to use as much memory as it can but you can but you can hit the "Garbage Collect" button and it should always come back down to a pretty small base footprint.) During the performance test the CPU usage should be around 75% which is not full utilization because the actual load tester is also consuming some CPU.

It is great that you can slam the application and get around 40k requests per second but what is really cool is that while totally saturating the app with requests the charts are still being updated every 100 milliseconds with values being pushed from the same saturated server!