Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the advantages of the new Heroku Java support over Amazon Elastic Beanstalk

We're trying to decide whether to host our play! framework and mysql Java app on Amazon's Elastic Beanstalk or the new Heroku Java offering. I'm having trouble figuring out what the advantages of Heroku would be. One disadvantage is that Heroku doesn't auto scale nodes like beanstalk does. But are there advantages I should know about?

like image 545
Matt Hall Avatar asked Sep 15 '11 19:09

Matt Hall


People also ask

What is Elastic Beanstalk and benefits of Elastic Beanstalk?

AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, . NET, PHP, Node. js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.

What is the difference between EC2 and Elastic Beanstalk?

EC2 is Amazon's service that allows you to create a server (AWS calls these instances) in the AWS cloud. You pay by the hour and only what you use. You can do whatever you want with this instance as well as launch n number of instances. Elastic Beanstalk is one layer of abstraction away from the EC2 layer.

What is a benefit for developers using AWS Elastic Beanstalk?

Provides Productivity. AWS EBS helps you to provide security, managing and configuring servers, managing database, load balancers, firewalls, and networks. This benefits a lot as one can focus only on building code rather than performing other actions.


1 Answers

So after some painful experience with AWS elastic beanstalk, here is my answer: (tl;dr we're switching to heroku)

Beanstalk advantages:

  • Autoscaling (but make sure you actually need this, it's easy to scale on heroku, it's just manual)
  • Based on WAR format, if you're familiar with that already (but see below)

Disadvantages:

  • For play! apps the war building process is a bit of an afterthought. I had problems doing some things like custom log4j appenders and running scheduled jobs. It's not totally natural for play to operate in a servlet container so you hit some weird issues.
  • Super clunky deploy process. I was basically uploading 130MB war files for each deploy via a web console. I eventually got everything deploying via a command line build process, but it was a big effort. I get the feeling that no one is using elastic beanstalk but me since I was all alone figuring out the fairly bad command line tools. To give a sense on how to deploy a play app to beanstalk: build a war file, install some s3 tools and upload war, install beanstalk utils and use to create a new configuration, then deploy that config. There are many painful details to overcome in that list. On heroku you push your repo and it does it all.
  • Tomcat! For example, play didn't have the right permissions to run scheduled jobs under the version of tomcat deployed for beanstalk.
  • Logging is the WORST. You can go and download captured log files for each individual server you're running. But then they never seem to contain what you need. I had two servers and it was already terrible.

There's more but the short story is we're switching to heroku and it's already been a much improved experience. Dealing with the SSL certs, combined logging and awesome set of add-ons (loggly centralized logging, websolr hosted search, etc) makes me think it's already worth it.

I'll provide more specifics in the comments if people ask for more details.

like image 121
Matt Hall Avatar answered Oct 19 '22 02:10

Matt Hall