1

I have an Opsworks stack with 2 different node apps running in the same layer. One of these apps needs to be load balanced as it will be accessed by the general public, but the other is only accessed occasionally by the first so does not need load balancing.

From what I have read it seems that in Opsworks a layer is load balanced rather than a defined set of instances. Opsworks does not let me create a second node.js layer in the same stack though, so I cannot just split up the apps and load balance one of them.

My guesses are that I shouldn't have these 2 apps in the same stack, or should I be load balancing just through ec2 where I believe I could set an ELB to run on a subset of the instances in a layer. Are these correct, or is there some other answer?

Carasel
  • 111
  • 2

1 Answers1

0

If you want to fully leverage the OpsWorks features, then yes, as you stated split the apps into two stacks.

Alt option 1: You could create a custom stack if you truly wanted to keep within the same stack but then you'd have to handle on your own what's done for you by the node.js layer (this can be done and successfully but you may need to invest in custom chef cookbook/recipes).

Alt option 2: Your statement about managing them through EC2 manually is spot on but I'd add that you try to leverage multiple subnets/AZs to make it easier on yourself. So:

LBR 1 (App1) AZ1 (us-east-1a) AZ2 (us-east-1c)

LBR 2 (App2) AZ3 (us-east-1d) AZ4 (us-east-1e)

Would give you HA/Fault Tolerant framework, let you balance, give you the ability to configure subnets against LBRs but still reap the benefits of OpsWorks.

J. Lawson
  • 86
  • 10