Case Study: Librio

Architecture redesign to revive a book e-commerce
softspring-librio-cms-case.png

Initial Context

When Librio approached us, their monolithic e-commerce platform for selling, managing, and generating personalized books was in a critical state. Located on a single server in Google Cloud, its infrastructure was not only slow but also prone to crashes during traffic spikes, especially noticeable during advertising campaigns. This scenario directly affected the user experience and business stability.

The Challenge

The main challenge was to improve the performance of the e-commerce platform, ensuring high reliability and the ability to handle traffic surges without compromising speed or functionality, while optimizing operational costs.

Development Proposal

After thoroughly analyzing Librio’s infrastructure and existing code, we decided to start the project with a phased approach. In the first phase, we focused on upgrading the infrastructure without making immediate changes to the code. We implemented a new version control system and automated the deployment process to allow for frequent and automatic updates. This strategy significantly improved the infrastructure, laying the foundation for future code optimizations.

The Solution

Librio’s infrastructure restructuring began with moving the database to CloudSQL, configuring a highly available instance to meet service demands. Additionally, we integrated Redis into Memorystore to efficiently manage shared cache data. To maximize scalability and better handle the load, we migrated the server to containers within a Kubernetes cluster, allowing for dynamic scaling as needed.
A key change was segregating the book preview generation process, which caused the most system load, moving it to microservices in Cloud Functions and using Cloud Endpoints to handle these operations as a separate API. Moreover, we separated book generation tasks and other critical processes from business logic, running them in isolated containers within “worker” instances, managed through queues and cron jobs to optimize performance and efficiency.

Technologies We Used

In our effort to optimize and transform Librio’s e-commerce platform, we used a variety of tools and platforms. The main ones included:

Happy Ending

Since implementing the improvements, Librio’s e-commerce platform has shown remarkable ability to handle traffic spikes and advertising campaigns without compromising response time. Operating costs now adjust dynamically based on load and sales, providing more effective financial control. Since these solutions were implemented, the system has not experienced any downtime, significantly improving service reliability. We continue to evolve and optimize the architecture, recently migrating from Kubernetes to Cloud Run, which has further improved the system’s efficiency and adaptability. These improvements have been made in close collaboration with Librio’s team, ensuring that the solutions implemented align perfectly with the business’s changing needs.

Let’s work together!

Do you want to tell us your idea?

CONTACT US