What should the company do to eliminate this application performance issue?
Configure both of the Aurora Replicas to the same instance class as the primary DB instance. Enable cache coherence on the DB cluster, set the primary DB instance failover priority to tier-0, and assign a failover priority of tier-1 to the replicas.
Deploy an AWS Lambda function that calls the DescribeDBInstances action to establish which instance has failed, and then use the PromoteReadReplica operation to promote one Aurora Replica to be the primary DB instance. Configure an Amazon RDS event subscription to send a notification to an Amazon SNS topic to which the Lambda function is subscribed.
Configure one Aurora Replica to have the same instance class as the primary DB instance. Implement Aurora PostgreSQL DB cluster cache management. Set the failover priority to tier-0 for the primary DB instance and one replica with the same instance class. Set the failover priority to tier-1 for the other replicas.
Configure both Aurora Replicas to have the same instance class as the primary DB instance. Implement Aurora PostgreSQL DB cluster cache management. Set the failover priority to tier-0 for the primary DB instance and to tier-1 for the replicas.
Explanations:
Configuring Aurora Replicas to the same instance class as the primary DB instance can improve the capacity for handling failovers. However, enabling cache coherence and assigning failover priorities to the replicas as described is unnecessary for the application performance issue, which is more related to replica promotion or instance class matching.
Using a Lambda function to manually promote an Aurora Replica to the primary instance after a failover introduces unnecessary complexity and delays. AWS Aurora can handle failovers automatically without requiring manual intervention.
Configuring one Aurora Replica to the same instance class as the primary DB instance and adjusting failover priorities ensures that failover events are handled swiftly. The performance issue can be alleviated by having an appropriately sized replica ready to become the primary DB instance.
While configuring the same instance class for the replicas and adjusting failover priorities is correct, implementing Aurora PostgreSQL DB cluster cache management does not directly address the application performance issue. The issue is more related to failover and replica sizing rather than cache management.