Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

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 as beanstalk does. But are there advantages I should know about?

1 Answer

0 votes
by (44.4k points)

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 every deploy via a web console. I eventually got everything deploying via a CLI build process, but it had been a big effort. I get the sensation that nobody is using elastic beanstalk but me since I used to be all alone figuring out the fairly unhealthy CLI tools. To give a sense of 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 several painful details to overcome in that list. On Heroku, you push your repo and it does it all.
  • Tomcat! For example, the 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 every individual server you are running. But then they never appear to contain what you need. I had 2 servers and it had been 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 impressive set of add-ons (loggly centralized work, websolr hosted search, etc) makes me assume it's already worthwhile.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...