Multi-tenancy enables sharing application instances among multiple customers, offering resource efficiency but posing challenges in cost management and allocation.
Solution introduced for managing costs in multi-tenant applications, specifically shared databases in Amazon RDS and Aurora, leveraging Performance Insights and AWS Cost and Usage Reports (CUR).
Performance Insights in Amazon RDS provides advanced performance monitoring by offering metrics on database load, helping identify performance bottlenecks and understanding database usage.
Solution workflow involves Lambda function collecting Performance Insights metrics, storing data in S3, using AWS Glue crawler to update Athena tables, and joining data to attribute costs to specific database users.
Utilizing the db.load metric helps evaluate database utilization, providing insights for capacity planning and instance optimization in multi-tenant environments.
AWS CloudFormation templates deploy resources like Lambda functions, S3 bucket, Athena views, and Amazon EventBridge rule to automate metric collection and cost allocation processes.
Queries in Athena analyze Performance Insights and CUR data to attribute costs to tenants based on database utilization, enabling accurate cost allocation and identifying under-utilized periods for potential cost savings.
Reporting costs per tenant using QuickSight visualizations helps visualize database activity and optimize resource usage, with the option to fine-tune aggregation levels for detailed reporting.
Solution provides insights into multi-tenant Amazon RDS costs, enabling accurate cost allocation, workload optimization, and data-driven decisions for capacity planning and pricing strategies.
Considerations for expanding the solution include creating custom dashboards, integrating with billing systems for automated chargeback, and setting up alerts based on resource thresholds.
Authors Davide Coccia and Andrea Filippo La Scola are AWS professionals focused on assisting customers in building secure, resilient, and cost-effective workloads on AWS, with expertise in analytics and data architectures.