Optimizing Infrastructure Costs and Performance for Booktr.ee
- Vlad Nistorica
- Casework
- February 16, 2024
We pride ourselves on our ability to optimize infrastructure and operations for our clients.
In this case study, we present the improvements we made for Booktr.ee, resulting in a sixfold decrease in monthly costs.
Booktr.ee is a marketplace for buying and selling used books between private individuals. Leveraging our expertise in DevOps, we completely transformed Booktr.ee’s infrastructure. This not only reduced costs but also significantly improved the overall application performance.
Challenge
Initially, Booktr.ee operated on a Kubernetes cluster on Google Cloud (GKE). However, the startup’s fluctuating traffic patterns, particularly during periods of no usage, led to high infrastructure costs, reaching 300 EUR/month.
The challenge was to find a cost-effective solution without compromising performance.
Solution
After careful analysis, we recommended a transition to a serverless architecture, specifically opting for Google Cloud Run. This move allowed Booktr.ee to pay only for the resources consumed during active periods, eliminating costs during low or 0 traffic periods. Additionally, the free tier associated with Google Cloud Run offered further cost savings.
Implementation
To expedite the migration process, we utilized Docker images already in use on the Kubernetes cluster. The separation of databases with Cloud SQL and an external Redis resource ensured a seamless transition. Within just one week, we successfully implemented the serverless solution.
While the serverless approach proved highly cost-effective, it presented challenges. Those consist particularly of cold starts and the delayed startup time for frontend and backend services.
To address this, we focused on optimizing startup times in the API by separating the update procedure from the main API. For the Angular-based frontend, we implemented server-side rendering, ensuring a swift initial load.
Results
The result was remarkable. We achieved an immediate decrease in infrastructure costs from 300 EUR/month to just 50 EUR/month. The implementation of serverless architecture not only slashed Booktr.ee’s monthly infrastructure costs but also improved overall system efficiency.
Eager to try this solution? Check out our article on the requirements of serverless technologies for more insights.
Conclusion
We successfully transformed Booktr.ee’s infrastructure, showcasing our commitment to delivering cost-effective and high-performance DevOps solutions.
Our strategic shift to serverless architecture on Google Cloud Run, coupled with optimizations for startup times, resulted in tangible benefits for Booktr.ee.
As we continue to drive innovation in DevOps, our focus remains on providing tailored solutions that empower businesses to thrive in the ever-evolving digital landscape.