From DBA to Architecture Lead: MySQL Scaling Secrets from BabyTree’s Ops Director
In this interview, Liu Qiuqi shares his journey from a DBA at Sogou to Architecture Operations Director at BabyTree, revealing how MySQL powers massive e‑commerce and community sites, the high‑availability designs, storage strategies, and performance tuning techniques that keep services running smoothly.
Host PiPi welcomes Liu Qiuqi, the Architecture Operations Director of BabyTree, to the IT Hall of Fame series. Liu recounts his career path, starting with a goal set in university to become a DBA, progressing through Oracle training, internships at Accenture and Lucent, and landing his first DBA role at Sogou. Within five years he transitioned from DBA to architecture leadership, overseeing large‑scale MySQL deployments.
MySQL in Large‑Scale Internet Services
Liu explains that MySQL’s maturity makes it a core component for high‑traffic sites such as Facebook, Taobao, Alibaba, and BabyTree. He notes that while MySQL is open‑source and cost‑effective, certain financial systems still require Oracle for stricter transaction guarantees.
High‑Availability and Scaling Practices
At Sogou, Liu managed a database cluster that grew from 8 to over 300 servers. He introduced high‑availability features including keepalived, HAProxy, LVS, read/write splitting, DBProxy, and extensive monitoring. The architecture evolved to include sharding, partitioning, and large memory + SSD storage with XFS file systems and RAID configurations.
BabyTree’s Architecture Overview
BabyTree’s platform consists of modules such as the main site, advertising, logging, email, and a distributed image system, built on Linux, Apache/Nginx, Memcached/Redis, and PHP. Databases include MySQL and MariaDB, with CDN services from Blue Cloud and Wangsu.
High availability is achieved through redundant hardware load balancers, dual‑Nginx reverse proxies, clustered Apache/Nginx, and a memcached cache layer. MySQL clusters use HAProxy/LVS with keepalived for failover, and asynchronous tasks are offloaded to a highly available message queue.
Massive Photo Storage
BabyTree stores over 2.1 billion photos, each replicated three times across distributed image servers (≈25 TB per server). Metadata paths are kept in the database, while the actual image data resides in the storage cluster.
Scaling Sogou Input Method
The Sogou input method serves over 300 million users. Liu’s team employed database sharding across 64 servers (32 master, 32 slave) using MD5‑based user‑ID hashing to distribute tables, initially into 16 tables and later expanding to 256 tables to handle growth.
Why E‑Commerce Sites Prefer MySQL
Transactional integrity is essential for order processing, and MySQL provides ACID compliance without licensing costs, making it attractive for large e‑commerce platforms like Taobao and Lanting. Custom patches and open‑source flexibility further reduce operational expenses.
Performance and Hardware Optimizations
MySQL parameter tuning: innodb_flush_log_at_trx_commit, innodb_write_io_threads, innodb_flush_method=O_DIRECT, innodb_old_blocks_time=1000.
File system: XFS with noatime,nodiratime,nobarrier mount options.
NUMA disabled.
Memory: 128 GB minimum, preferably 256 GB for e‑commerce workloads.
Storage: SSD for data, PCIe‑Flash for logs (see comparison image).
Personal Reflections
Liu reflects on the cultural differences across Sogou, Lanting, and BabyTree, highlighting Sogou’s geeky tech atmosphere, Lanting’s maritime‑spirit e‑commerce focus, and BabyTree’s love‑driven mission in the mother‑and‑baby space. He emphasizes continuous learning, balancing long work hours with personal health, and the importance of setting goals and tracking growth.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
