开发者

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

开发者 https://www.devze.com 2023-04-05 17:32 出处:网络
We\'re trying to decide whether to host ou开发者_C百科r 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 adv

We're trying to decide whether to host ou开发者_C百科r 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?


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.


From my point of view, with minimal experience on both platforms, it seems to me that Heroku requires less work from your part, things are more automated for you.

You pay for it, but for a small-medium sized app I believe it's worth it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号