Recently, we integrated Redis through AWS ElastiCache to power real-time updates in our AI-driven menu recommendation system. Our initial cloud setup was straightforward: a Rails 8 application deployed with Kamal on a t3a.small EC2 instance ($27.07/month) and RDS for the database ($32.47/month), totaling around $70/month across environments.
Cost Surge
What started as an "elegant solution" quickly became a concern. By July 2024, ElastiCache costs had skyrocketed to $120.53, pushing our total AWS expenses to $197.811. The graph clearly shows how ElastiCache dominated our infrastructure costs, accounting for over 60% of monthly expenses.
The Solution
After successfully implementing Solid Queue and following the release of Solid Cable at Rails World 2024, we pivoted to this database-backed alternative for real-time features. This eliminated our Redis dependency while maintaining full functionality. The data shows remarkable improvements:
- Monthly AWS costs decreased from $197.81 to $74.55
- Infrastructure costs reduced by approximately 62%
- Complete elimination of the $120.53 monthly ElastiCache expense
Beyond the Numbers
The switch to Solid Queue significantly reduced our infrastructure complexity. By eliminating Redis, we've simplified our stack, making it easier to maintain, debug, and scale. This change aligns with Rails' philosophy of convention over configuration, keeping things simple and streamlined. Following this success, we integrated Solid Cache, completing the Solid trifecta.
Key Takeaway
This migration reinforces a valuable lesson: staying aligned with framework defaults often leads to both technical and financial benefits. Our tech stack is now simpler, more maintainable, and more cost-effective while maintaining all the functionality our application requires.
The cost breakdown graph demonstrates this transformation, showing sustained lower costs from October 2024 onward, with stable expenses around $75/month
The cost breakdown graph demonstrates this transformation, showing sustained lower costs from October 2024 onward, with stable expenses around $75/month