A software-as-a-service (SaaS) collaboration platform uses an Amazon RDS for PostgreSQL DB instance to manage user workspaces, active tasks, and team permissions. During peak business hours, the database experiences severe performance degradation, with CPU utilization exceeding 90% and query response times increasing significantly.
A database analysis reveals two main contributors to the bottleneck:
1. A massive volume of repetitive, read-only queries from application servers fetching static team permission configurations.
2. Exhaustion of database connection limits due to thousands of transient AWS Lambda functions frequently opening and closing connections to verify user session tokens.
The session token verification data changes dynamically and must be cached with high availability. The cache must support replication and automatic failover across multiple Availability Zones to prevent user session loss if a primary cache node fails.
Which architecture should a solutions architect implement to address these performance bottlenecks while meeting the high availability requirements?
- Deploy an Amazon RDS Proxy between the Lambda functions and the PostgreSQL database to manage connection pooling, and implement an Amazon ElastiCache for Redis replication group with Multi-AZ enabled to cache the team permission rules and user session tokens.Answer
- BDeploy an Amazon RDS Proxy between the Lambda functions and the PostgreSQL database to manage connection pooling, and implement an Amazon ElastiCache for Memcached cluster to cache the team permission rules and user session tokens.
- CEnable Multi-AZ deployment on the Amazon RDS for PostgreSQL DB instance, route the read-only queries for the team permission rules to the standby replica, and configure AWS Lambda reserved concurrency to limit the database connection count.
- DDeploy an Amazon ElastiCache for Memcached cluster with automatic replication across multiple Availability Zones to cache the team permission rules and user session tokens, and configure the Lambda functions to use an RDS Read Replica for database connection pooling.