Real architecture · Mid
Magalu: 113 applications migrated before Black Friday 2018
The business problem is concrete: from 50 thousand to 4.3 million SKUs, with an API gateway decoupling front end and back end.
Short answer
The business problem is concrete: from 50 thousand to 4.3 million SKUs, with an API gateway decoupling front end and back end. According to a case study published by Google Cloud, Magazine Luiza already had, in 2013, an e-commerce platform and an API library.
01 · CONTEXT
An overloaded back end behind the APIs
According to a case study published by Google Cloud, Magazine Luiza already had, in 2013, an e-commerce platform and an API library. The problem was that these APIs connected to an overloaded back-end application, built with 150,000 lines of code.
In the diagram, clients call the API library.
The APIs connected to a back-end application.
The back end is described as overloaded.
The study adds that deploying the new APIs was slow and that the company faced undesirable dependencies, scalability challenges, and responsibilities spread across isolated teams.
02 · DECOUPLING
A small team and an API platform
Also according to the study, the then operations director assigned a small team of developers, detached from IT management processes and organizational obstacles, with access to all of the company's e-commerce operations.
That team started using the Apigee API management platform, which helped decouple the front end from the back-end systems and made it easier to iterate on the new applications, while other teams kept the legacy systems of record.
The new applications sit at the front-end edge.
The API platform sits between the front end and the back-end systems and helps decouple them.
The legacy systems of record continue to be maintained by other teams.
The summary of a talk on InfoQ Brasil tells a similar story from the organizational side: Luizalabs went from a department focused on research and development to Magazine Luiza's technology and innovation company, motivated by helping the retailer through a technological and cultural transformation.
03 · MIGRATION
113 applications before Black Friday
According to the study, after GCP launched its region in Brazil, Magazine Luiza began deploying workloads on it. The company already used Kubernetes, which was useful for the multi-cloud strategy, and the data migration went smoothly because they used Kubernetes together with their own open-source PaaS.
To improve performance and stability in the face of Black Friday's traffic increase, the company decided to migrate 113 applications to GCP in less than 60 days before that date.
In the diagram, the client represents all the platforms served.
The API platform gives visibility into API and application activity.
The migrated applications now run on Google Cloud.
The diagram combines two pieces of the case study, the API platform and the migrated applications, without stating the exact path of each request.
The reported result is that Black Friday 2018 was the biggest in the company's history, with API traffic levels well above before. The study says Apigee helped with execution, meeting customer demand across all platforms.
04 · SCALE
Catalog, sellers, and small teams
The study compares the current catalog with that of the legacy sales and distribution system and reports the reach of the seller ecosystem. The comparison below uses the numbers as the vendor presents them.
| Medida | Reported value |
|---|---|
| SKUs in the legacy sales and distribution system, in 2016 | 50.000 SKUs |
| SKUs offered today, according to the study | 4.3 million SKUs |
| Sellers supported | More than 3,300 |
| Applications migrated to GCP | 113, in less than 60 days before Black Friday |
Other merchants join this ecosystem through the API platform. The study also says that, with the ease of creating services, teams can work in groups of five or six people who handle segments of an application, and that Firebase helped reduce the complexity of building the applications that reach customers.
05 · LESSONS
What to take into a design
This case does not state how the gateway was sized, which applications were migrated first, or how traffic was measured. What it supports is the combination of an API layer between front and back, small teams, and a migration on a tight deadline.
Frequently asked questions
What is Magalu: 113 applications migrated before Black Friday 2018?
The business problem is concrete: from 50 thousand to 4.3 million SKUs, with an API gateway decoupling front end and back end.
What does the Magalu: 113 applications migrated before Black Friday 2018 design cover?
It is organized in these sections: An overloaded back end behind the APIs, A small team and an API platform, 113 applications before Black Friday, Catalog, sellers, and small teams, and What to take into a design.
How long is Magalu: 113 applications migrated before Black Friday 2018 and what level is it?
It takes about 15 minutes to read and is rated Mid level.
Now design it yourself
Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.