Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Running an Akka cluster in an EC2 Autoscaling Group (chrisloy.net)
23 points by chrisloy on May 17, 2014 | hide | past | favorite | 13 comments


Excellent post. We made the mistake of trying to use Chef to deal with seed node discovery in our Akka cluster and that was a terrible idea. Really wish we'd gone with the AWS SDK instead.


Thanks! The SDK has some "quirks" (and isn't especially Scala-friendly) but I reckon it's ultimately pretty powerful. My main gripe is the lack of real-world examples in the docs - hence my desire to write this up.


Hi, I didn't see an obvious way to reach you on the blog bit just FYI, it looks weird on iPhone Safari

Edit http://imgur.com/oX0CzuZ http://imgur.com/WsqEVxA


Hi, thanks for the feedback! Yeah I'm aware the look on Chrome on my Android is pretty terrible, which is on my list to get sorted. Looks like it's even worse on iOS! At the moment its basically using the default site template from Jekyll which is apparently very much not mobile first!

Also re: contact, there's a link to my Twitter account but not much more. Cheers for letting me know anyway!

Edit: Grokked media queries; hopefully a little nicer on mobile now.


One question: how do you deal with crashed JVMs? You can't rejoin a new JVM if it has the same address and port but I can't think of a good way to communicate the new port using the AWS SDK.


The way we have it set up, if the JVM crashes then it will mean that the health check url used by the load balancer will become unresponsive. This would lead to the auto scaling group downing the instance and replacing it with a new one. So, the same node wouldn't ever need to rejoin.


Were you using Chef inside of OpsWorks? I'm curious about what problems you're having.

I'd think that hooking the configure lifecycle event on your cluster layer in OpsWorks would work just fine.


No, just Chef Solo. We only had four nodes at the time.


Nice post. Would love to more about your application of Akka Cluster -- it's far and away the most interesting part of Akka to me, and something we have plans to build some very interesting systems on top of.


I work for a large organisation and am not really in a position to go into details about what we'd be using it for at the moment, sorry.

Suffice it to say that we're pretty early on in the project and so far we're using Akka Cluster for sharing transient state between nodes, without the need for any kind of persistence store being used. My post was in response to the pain I had in getting over the initial hurdle of getting a prototype running.


Does Akka cluster do load balancing between nodes yet?


You should turn this post into an Activator template.


Excellent post! How do you ensure that you don't split the cluster - do you have to configure the ASG to add the 2nd node only when the first one is already up? If so, how exactly do you do that?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: