0

I have a very basic question but I have been searching the internet for days without finding what I am looking for.

I currently run one instance on AWS.

That instance has my node server and my database on it.

I would like to make use of ELB by separating the one machine that hosts both the server and the database:

  1. One machine that is never terminated, which hosts the database
  2. One machine that runs the basic node server, which as well is never terminated
  3. A policy to deploy (and subsequently terminate) additional EC2 instances that run the server when traffic demands it.

First of all I would like to know if this setup makes sense.

Secondly,

I am very confused about the way this should work in practice:

Do all deployed instances run using the same volume or is a snapshot of the volume is used?

In general, how do I set such a system? Again, I searched the web and all of the tutorials and documentations are so generalized for every case that I cannot seem to figure out exactly what to do in my case.

Any tips? Links? Articles? Videos?

Thank you!

1 Answer 1

2

You would have an AutoScaling Group with a minimum size of 1, that is configured to use an AMI based on your NodeJS server. The AutoScaling Group would add/remove instances to the ELB as instances are created and deleted.

EBS volumes can not be attached to more than one instance at a time. If you need a shared disk volume you would need to look into the EFS service.

Yes you need to move your database onto a separate server that is not a member of the AutoScaling Group.

Sign up to request clarification or add additional context in comments.

2 Comments

So the deployed instances receive a new ebs volume based on a snapshot?
Yes, every instance would be created from an AMI you specify. An AMI specifies one or more EBS snapshots that will be used to create one or more EBS volumes. The instances that get created by the AutoScaling Group are no different from the instances you would be able to create manually from an AMI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.