Cross-border SaaS: Shenzhen Eccang Technology Co., Ltd.

Updated at:

PolarDB uses a decoupled storage and compute architecture. It provides minute-level configuration changes, second-level fault recovery, global data consistency, and free data backup and disaster recovery. PolarDB combines the stability, high performance, and scalability of commercial databases with the simplicity, openness, and iterative development of open-source cloud databases. This topic describes how Shenzhen Eccang Technology Co., Ltd. uses PolarDB to address its business challenges.

Company overview

Founded in 2013, Shenzhen Eccang Technology Co., Ltd. (Eccang) has spent a decade developing technology to help sellers expand globally. The company has supported over 1,000 sellers with billions in revenue and more than 30,000 growing sellers. Eccang provides a one-stop Enterprise Resource Planning (ERP) management system for Chinese merchants who sell on multiple platforms outside China. ECCANG ERP now integrates with more than 60 major e-commerce platforms, such as Amazon, Walmart, Shopee, and Shopify, and over 1,600 logistics and overseas warehousing providers. It provides merchants with unified and fine-grained management across their entire business, including product development, procurement, sales, advertising, inventory, logistics, supply chain, and finance.

Business challenges

To provide a better user experience, Eccang's cross-border SaaS manages tenants in different tiers and selects deployment modes based on each tenant's needs. The following figure shows the details.

image

As the cross-border e-commerce industry and Eccang's SaaS business grew, the number of tenants and business volume increased significantly. This growth led to several pain points in Eccang's database architecture:

  • Pain point 1: A single instance with a massive number of tables complicated operations and maintenance (O&M) and compromised database stability.

  • Pain point 2: Multiple tenants sharing a single database instance led to large data volumes and resource contention.

  • Pain point 3: Inefficient data migration for tenants during upgrades, downgrades, merges, or splits.

  • Pain point 4: The traditional master-slave database architecture resulted in resource fragmentation and low resource utilization.

  • Pain point 5: As the business grew, tenant data volumes increased, leading to higher storage costs.

  • Pain point 6: The traditional master-slave database architecture involved numerous instances, resulting in high data integration costs.

  • Pain point 7: Growing tenant data volumes created performance bottlenecks for queries at the single-tenant level.

Solutions

  • PolarDB Multi-master Cluster helps Eccang's cross-border SaaS build a next-generation database solution

    In March 2021, during a technical exchange with Eccang, the PolarDB team learned about the database pain points the company faced in the cross-border SaaS industry. These pain points represented a significant challenge. The PolarDB team rose to the challenge and, based on Eccang's needs, co-created the PolarDB Multi-master Cluster. This next-generation SaaS database solution helped Eccang address the previously mentioned pain points, dramatically improving the efficiency of tenant resource allocation and significantly reducing resource costs.image

  • PolarDB HTAP improves complex query performance for the operations system by 100 times

    To significantly improve operational efficiency, cross-border sellers require real-time access to order data from platforms outside China. They often perform complex, multi-dimensional statistical analyses of stores and products. Eccang Technology synchronized data from its operations system to a self-built ClickHouse system to support complex queries and analysis. However, this separate Online Transactional Processing (OLTP) and Online Analytical Processing (OLAP) architecture had issues such as data synchronization interruptions, poor real-time performance, performance bottlenecks, and complex management.

    The Hybrid Transactional/Analytical Processing (HTAP) capability of PolarDB enables mixed OLTP and OLAP workloads on a single PolarDB database. While maintaining its excellent OLTP performance, this capability significantly improves PolarDB's performance for complex queries on large data volumes. Complex query performance is more than 100 times higher than that of row stores.image

Customer value

  • Value 1: Support for massive tables and high-performance DDL greatly reduces O&M workload

    For Eccang's scenario with a massive number of tables, the Eccang O&M team collaborated with the PolarDB team to optimize for fast restarts. The restart time for a single RW node with 1 million tables was reduced to 30 to 60 s, which is one-tenth of the original time. This significantly reduces service interruption time and ensures high availability for Eccang's cross-border SaaS. PolarDB supports adding, modifying, and deleting fields in seconds, which greatly improves the efficiency of maintaining massive tables in a SaaS environment. PolarDB for MySQL supports Parallel Data Definition Language (DDL) and concurrency control, increasing the speed of adding an index by 10 times. This greatly reduces the time window during which release changes affect the business, which in turn reduces the workload for the O&M team.

  • Value 2: Serverless support for compute and storage easily handles sudden increases in tenant service traffic

    For scenarios where tenant service traffic for Eccang's cross-border SaaS suddenly increases, the second-level CPU scale-out capability of PolarDB Serverless effectively handles the load. There is no need to reserve compute resources in advance, which continuously reduces costs and increases efficiency. All nodes in a PolarDB Multi-master Cluster share one copy of storage. The storage supports high compression and Serverless, scales out automatically, and is billed based on actual usage. This not only reduces costs and increases efficiency but also eliminates concerns about storage capacity bottlenecks.

    image

  • Value 3: Second-level cross-RW node migration for tenants resolves efficiency issues with tenant upgrades, downgrades, merges, and splits

    Create a database named db1 on RW node 1:

    CREATE DATABASE db1 POLARDB_WRITE_NODE 1;

    To create the db1 database on RW node 2, change the 1 in the preceding example to 2.

    Switch the db1 database to RW node 2:

    ALTER DATABASE db1 POLARDB_WRITE_NODE 2;

    A simple SQL statement can migrate a tenant from RW node 1 to RW node 2 in seconds. This resolves the efficiency problem of cross-instance tenant migration for Eccang's cross-border SaaS during tenant upgrades, downgrades, merges, and splits. It greatly reduces the O&M workload.

  • Value 4: On-demand addition and removal of RW and global RO nodes greatly improves resource utilization

    A PolarDB Multi-master Cluster supports up to 32 nodes. You can mix and match RW and global read-only (RO) nodes based on your service payload. After switching from the traditional master-slave database pattern to a PolarDB Multi-master Cluster, a single database cluster can now serve tens of thousands of tenants. The second-level cross-RW node tenant migration capability allows for quick load balancing across nodes, reducing resource fragmentation and greatly improving resource utilization. Resource costs are reduced by more than 30%.

  • Value 5: Smart-SSD and hot/warm/cold data tiering significantly reduce storage costs

    PolarDB storage nodes use Smart-SSD to compress data at the hardware layer, achieving a data compression ratio of 2.0 to 3.0. After Eccang switched all its PolarDB instances to Smart-SSD, storage costs were reduced by 35% without any performance degradation. In addition, PolarDB supports transparent hot, warm, and cold data tiering, which helps Eccang significantly reduce storage costs.

  • Value 6: A single binary log for all RW nodes greatly reduces downstream data integration costs

    All RW nodes in a PolarDB Multi-master Cluster generate only one set of binary logging (binlog) files. When a downstream real-time data warehouse performs data integration, a single PolarDB Multi-master Cluster requires only one DTS sync task. This resolves the problem of high data integration costs in SaaS scenarios caused by numerous database instances. After Eccang's cross-border ERP business went online with the PolarDB Multi-master Cluster, data integration costs were reduced by more than 50%.

  • Value 7: Performance of multi-dimensional statistical analysis for stores and products at the single-tenant level is greatly improved

    After implementing the PolarDB HTAP feature in the operations system, data is synchronized in milliseconds with strong consistency. Complex query performance is improved by more than 100 times compared to row store, which provides tenants with an exceptional experience. At the same time, by eliminating the need to build a ClickHouse analysis system and manage end-to-end data synchronization, costs are reduced by 15%.

Customer testimonial

"By adopting the PolarDB Multi-master Cluster and HTAP for our cross-border SaaS, we upgraded our SaaS database architecture and addressed a series of database pain points. This has not only significantly improved database resource utilization and performance but has also enabled continuous cost reduction and efficiency improvements."