How We Scale Out Databases and Get Big Data Queries 6x Faster with a MySQL Alternative

pingcap.com
6 min read
fairly easy
As Huya Live's business grew, their storage capacity became a bottleneck. Their live broadcasts had high latency, and their database maintenance cost was high. Learn how TiDB helps them achieve database scalability, high availability, and strong consistency with low costs.
Industry: Live Streaming

Author: Hualiang Huang (Head of the Database Team & Architect at Huya Live)

Transcreator: Caitin Chen; Editor: Tom Dewan

Huya Live, China's Twitch, is one of the largest live streaming platforms in China. It mainly focuses on video game live streaming, covering 3,800 games. In addition, it offers a wide range of other live broadcasts, including traditional sports, cooking, music, beauty, outdoor, and reality shows. It has 178 million+ monthly active users. It operates globally as Nimo TV, with 30 million+ monthly active users.

At Huya Live, we use MySQL as our main database. As our business grew, our storage capacity became a bottleneck. We tried sharding, but it had many drawbacks. In Online Transactional Processing (OLTP) scenarios, our live broadcasts had high latency, and our database maintenance cost was high.

To solve these problems, we chose TiDB, an open-source, high-performance, distributed SQL database. Now, we use TiDB in real-time Online Analytical Processing (OLAP), database sharding, and big data offline scenarios. It helps us achieve database scalability, high availability, and strong consistency with low costs. In our big data offline application, our queries are 6x faster. In our near real-time OLAP application, our query performance improved by more than 2x.

In this post, I'll share our database challenges, why we chose TiDB to solve our pain points, how we use it, and our future plans. I hope our experience can inspire you if you ever need to select a database.

Our pain points

Difficult to scale out storage capacity

We had many instances with 1 TB+ of data in order processing, private messaging, video-on-demand, payment, and other applications. This caused the data scalability issue. To solve this problem, we tried MySQL sharding based on applications. But this solution was not ideal, because:

It was intrusive to the applications.

As our data continuously grew, we had to reshard databases.

We had high…
Read full article