Let's say I have an RDS instance (single AZ, not Aurora) in the stopped state. The RDS subnet group of my instance has 3 different subnets (one in each AZ).
If I start the RDS instance:
- will RDS select a random subnet from the subnet group (or will it try to use the same subnet as previous) ?
- is it possible to specify a given subnet (from the subnet group) I want to start the instance in ?
Regarding instance capacity:
- What will happen if there is not enough instance capacity in the subnet where RDS is trying to start the instance ? (will it use a retry mechanism or will I simply get an error message ?)
- In that situation of RDS instance capacity error, are there any best practices to try using another AZ (in order to leverage RDS instance capacity pool of another datacenter of the AWS region) ?
Let's say I have an RDS instance (single AZ, not Aurora) in the stopped state. The RDS subnet group of my instance has 3 different subnets (one in each AZ).
If I start the RDS instance:
- will RDS select a random subnet from the subnet group (or will it try to use the same subnet as previous) ?
- is it possible to specify a given subnet (from the subnet group) I want to start the instance in ?
Regarding instance capacity:
- What will happen if there is not enough instance capacity in the subnet where RDS is trying to start the instance ? (will it use a retry mechanism or will I simply get an error message ?)
- In that situation of RDS instance capacity error, are there any best practices to try using another AZ (in order to leverage RDS instance capacity pool of another datacenter of the AWS region) ?
1 Answer
Reset to default 1Here are the responses for your queries about RDS instance subnet selection and capacity management:
Subnet Selection When Starting:
- When you start a stopped RDS instance, AWS RDS will attempt to start the instance in the same subnet where it was previously running
- This behavior is by design to maintain consistency in networking configuration
Specifying a Subnet:
- For single-AZ RDS instances, you cannot explicitly specify which subnet to use when starting the instance
- The subnet selection is managed by AWS RDS service
- If you need to run your RDS instance in a specific AZ/subnet, you would need to create a new instance with that specific configuration
Instance Capacity Issues:
- If there's insufficient capacity in the subnet/AZ where RDS tries to start the instance, you'll receive an "InsufficientDBInstanceCapacity" error
- RDS does not automatically retry in other AZs
- The operation will simply fail with an error message
Best Practices for Handling Capacity Issues (If you encounter capacity issues, you can try these approaches):
- Manually stop and start the instance again (it might work if capacity becomes available)
- Create a new RDS instance in a different AZ where capacity is available
- Consider using a different instance type that might have better availability
- If this is a recurring issue, consider using Reserved Instances to ensure capacity
- For critical workloads, consider using Multi-AZ deployment which provides better availability guarantees
Remember that using Multi-AZ deployment, while more expensive, provides better reliability and availability, including automatic failover to other AZs in case of capacity issues or other problems.