Play Framework – Good or Bad?

The latest buzz word doing the rounds is Play Framework. It is deployed at high-profile companies such as LinkedIn. Chances are that you would not have heard of Play or Akka (because I hadn’t :-))

When we started work on a new product, we were asked to evaluate Play and its feasibility for our requirements. I, being over enthusiastic, took up this task and, lo & behold, what did I find out?

But before the specifics, let’s take a look at the test environment – 1 m1.large Amazon Linux EC2 instance (AppServer), 1 m1.large Amazon Linux EC2 instance (RabbitMQ Server), 1 m1.large JMeter Master Windows EC2 instance and 1 m1.large JMeter Slave Amazon Linux EC2 instance, all in the same AZ. The test environment also contains 2 AWS DynamoDB tables with an appropriately provisioned throughput. The load for the experiments mentioned below was 500 threads running in parallel with each thread looping 100 times.

Now for the details for the various test cases –

1. A sample Play project
AppServer was able to handle 4000+ requests per second at a max of 40% CPU utilization. Initial impression – Not bad!

2. A sample Play project + 1 RabbitMQ call
AppServer was able to handle 500+ requests per second. Impression – Dramatic reduction in concurrency. Is RabbitMQ Server to blame?

3. A sample Play project + 1 AWS DynamoDB call (Callback Async)
AppServer was able to handle 300 requests per second at 100% CPU utilization.

4. A sample Play project + 2 AWS DynamoDB calls (Futures Async – 100 milliseconds sleep per thread)
AppServer was able to handle 50 requests per second at 60% CPU utilization.

5. A sample Play project + 2 AWS DynamoDB calls (Futures Async – 10 milliseconds sleep per thread)
AppServer was able to handle 75 requests per second at 100% CPU utilization.

6. A sample Play project + 2 AWS DynamoDB calls (Sync) + 1 RabbitMQ call
AppServer was able to handle 90+ requests per second at 100% CPU utilization.

Test case 6 gives a throughput of 500+ requests per second on a c1.xlarge EC2 instance.

Why is Play not living up to its hype? Is m1.large not powerful enough? (Earlier experiments suggest that m1.large is a pretty mean machine!) Are my coding skills bad? 😦 Is Scala better than Java when it comes to performance? Am I missing something very trivial in Play? Lots of questions remain. But for the time being, we are going ahead with Play and using both scale-up and scale-out to meet our requirements.

Has anyone played with Play? Was it your ideal play ground? What were your experiences?

Advertisements
This entry was posted in Technical and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s