Distributed SQL Arrives at Turkey’s Largest E-Commerce Platform
At the Distributed SQL Summit 2021, Hüseyin Demir, Senior Database Platform Engineer at Trendyol, talked about the business and technology needs that drove the company to look for a new relational database management system (RDBMS). The talk covered the detailed performance and technology evaluation conducted by Trendyol, and explained why YugabyteDB—an open source distributed SQL database for cloud native applications—was the optimal choice to power its business.
Trendyol: Turkey’s e-commerce leader
Trendyol is Turkey’s largest e-commerce platform. With over 45 million mobile downloads, more than 40 million visits a month, and over 6 billion visits a year, Trendyol is an e-commerce leader selling more than 300 million products in the last year. At its core, Trendyol is a technology company with a mission to help small and medium enterprises (SMEs) with their digital transformation.
Understanding Turkey’s complex e-commerce market
According to J.P Morgan’s – Ecommerce Payments Trends Report, the e-commerce market in Turkey is experiencing exponential growth – 42% in 2018, 31% in 2019, and is expected to grow 14% (CAGR) in 2023. This is primarily driven by Turkey’s younger population using mobile and social media platforms to shop. COVID-19 has also changed consumer shopping behavior, pushing even greater adoption rates for e-commerce. This has pushed SMEs to speed up digital transformation to ensure their products can reach consumers. Parallel businesses, such as logistics and physical and digital banking, are also under pressure to handle greater volumes of customers, which requires infrastructure upgrades.
To meet these demands, Trendyol needed a database that was highly available, could be scaled horizontally on demand, was cloud native and operationally efficient, had multi-region deployment options, and delivered built-in replication capabilities.
Trendyol evaluated YugabyteDB alongside other traditional RDBMS solutions. The following table summarizes their assessment:
|Criteria||Other DB Solutions||YugabyteDB|
|High availability||Partial (single datacenter)||Full (inside two or more data centers)|
|Cloud Native Platform||Partial||Fully Supported|
|Multi-region Deployment Options||Partial||Fully Supported|
The company was also impressed by YugabyteDB’s core feature set, which includes:
- ACID transactions and strong consistency: Data is automatically sharded and distributed across all the nodes in the cluster.
- PostgreSQL compatibility: YugabyteDB reuses PostgreSQL’s query layer, making it highly compatible with PostgreSQL applications. This worked well with Trendyol’s current stack as developers could easily migrate applications without having to re-build any application frameworks.
- Geo-distribution: Rich, geo-distributed deployment options make use of synchronous and asynchronous data replication to address resilience, performance, and compliance needs.
- Horizontal scalability: Organizations can effortlessly scale out even under heavy loads without any disruption or downtime by adding nodes to the YugabyteDB cluster. All nodes of a cluster can handle reads and writes, so you have no single points of failure or bottlenecks as the cluster grows.
- Resilience and continuous availability: If there is a node, zone, region, or data center failure, the database ensures there is zero downtime.
Once Trendyol completed the technology assessment of YugabyteDB, the team assessed the performance of YugabyteDB using the YCSB tool, and compared it to that of PostgreSQL using pbgench. Trendyol’s YugabyteDB architecture consisted of two, five node clusters deployed in two different regions with bi-directional asynchronous replication between the two clusters. Clusters in both regions accepted write and read requests, as illustrated below:
These tests were specifically conducted for Trendyol’s own projects and use cases to ensure validity on performance. They were not intended for general benchmarking.
The following table summarizes the results from the performance tests:
YugabyteDB was able to handle more transactions per second and performed better under heavy workloads (SELECT and UPDATE requests). This was primarily due to data being distributed among the YugabyteDB servers.
Trendyol has implemented YugabyteDB to power core platform applications. The key criteria driving their decision were YugabyteDB’s resilient distributed architecture, support for ACID transactions, horizontal scalability, and geo-distribution capabilities. Trendyol continues to evaluate YugabyteDB for subsequent use cases as it scales operations and grows in multiple regions across the globe. The company is also working on building feature sets and contributing to YugabyteDB open-source projects.
Want to learn more about YugabyteDB in action? Check out all the sessions from this year’s Distributed SQL Summit on-demand, including talks from Fiserv, General Motors, Kroger, Rakuten, Wipro, and others!