Wildberries is the most popular Russian online store. The company operates in 7 countries. Wildberries has been recognized as the largest Internet retailer in Russia for four consecutive years. Wildberries has over 30 million customers; 7 million visitors place 780,000 orders per day.
In the mid-2010s, Wildberries technically was a .NET application with MS SQL servers. The monolithic backend and frontend had a performance limit, and this limit was slowly but surely approaching. With the entry to the market of Belarus, the CPU usage never went below 90%. On Black Friday, there were three times more requests.
The technical team realized that the cost of MS SQL becomes unacceptable with the increasing workload. So, they have decided to break the monoliths into microservices. When choosing a solution, the team relied on the following requirements:
During the first stage, the developers discarded paid services because of their cost: for the necessary solution and performance, the cost exceeded the IT budget. That’s where Tarantool appeared. First, the team began to transfer high-load services, where the current MS SQL database required many copies.
Today the technical team of Wildberries has its own approach to creating reliable distributed systems. For this kind of systems, Tarantool is good as a universal storage for processing high-demand data: user profiles, banners, discounts, etc. In total, there are twelve Tarantool-based microservices.
The scheme of Tarantool operation looks as follows. There are several masters on virtual or hardware machines in each data center. The connection is established according to the master-master scheme. There are interfaces, or synchronizers, that download information and write it onto the masters (e.g. information about discount coupons and their terms and conditions). The replicas on virtual machines or in Kubernetes connect to these masters. At the top, the applications access the replicas.
Each application works with two clusters. In case of a data center failure, an application can access the other cluster. There is a layer that stores the Tarantool Go driver interface and hides the logic. The layer sees all the replicas and can work with the master for reads and writes.
Tarantool is the main database for 12 microservices
The most critical service of the website is the master storage of profiles which stores data in Tarantool
12,000 RPS for the master storage of profiles
Tarantool experts will contact you shortly