Skip to content

Vertical Scaling

0

Consider I have an databased hosted (self managed) on ec2 machine of r6i.8xlarge. Now due to more work load I want to upgrade the size of ec2 machine to r6i.12xlarge for this scenario do I need to stop ec2 machine or else without stopping can we upgrade its size. If we need to stop the ec2 machine and select new machine then do I need to setup everything from the beginning like installing Database server and copying database storage to new machine how this works.

If we consider serverless like RDS above scenario is managed.

1 Answer
1
Accepted Answer

For vertical scaling of an EC2 instance from r6i.8xlarge to r6i.12xlarge, you would need to stop the EC2 instance. Vertical scaling, also known as scaling up or down, involves changing the instance type to one with more or fewer resources. This process cannot be done while the instance is running.

Here's the general process:

  1. Stop the EC2 instance
  2. Change the instance type to r6i.12xlarge
  3. Start the instance

The good news is that you don't need to set up everything from the beginning or reinstall the database server. When you stop and start an EC2 instance, it retains its configuration, including the root volume and any attached EBS volumes. This means your database server and data should remain intact.

However, it's crucial to note a few important points:

  1. Always take a backup of your data before performing any scaling operations.
  2. Ensure that your database is properly shut down before stopping the EC2 instance to prevent data corruption.
  3. After starting the instance with the new type, you may need to adjust your database configuration to take advantage of the additional resources.

You're correct that if you were using a managed service like Amazon RDS, this process would be handled for you. RDS supports vertical scaling with minimal downtime, and in many cases, it can be done online without stopping the database instance. RDS manages the underlying infrastructure, making it easier to scale your database resources up or down as needed.

In summary, while vertical scaling an EC2 instance requires stopping and starting the instance, you don't need to reinstall or reconfigure your database from scratch. However, using a managed service like RDS can simplify this process significantly.

Sources
Scaling Applications on AWS | AWS re:Post
Development phase - Development and Test on Amazon Web Services
EC2 Instance upgrade or auto scale? | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.