HTAP Summit 2024 session replays are now live!Access Session Replays

LINE Corporation is a leading global technology company known for its LINE communication application and a host of other services, such as LINE manga, LINE GAME, and LINE GIFT. With its expansive MySQL infrastructure of roughly 7,000 instances, the company faces the ongoing challenge of scaling and managing these databases. To solve these challenges, LINE migrated some of its projects from MySQL to TiDB, a distributed SQL database.

The Problem: Challenges with Sharding

As LINE’s services expanded, their existing MySQL databases became harder to manage, and scaling became a significant challenge. 

  • Overall operational overload: The MySQL1 team, the team behind LINE’s data infrastructure, manages and operates around 7,000 MySQL instances.
  • Scaling and managing shards: The LINE team embedded sharding logic in applications to achieve high availability and scalability. This involved logically dividing a table and distributing it across multiple database servers. Sharding added complexity to the client-side programming and operation management. 
  • Operational automation: With the growing number of instances, the team needed to automate daily operations while still offering time for service development consulting.

The Solution: TiDB, a Distributed SQL Database

While seeking solutions to their sharding problem, the team discovered TiDB, an advanced open-source, distributed SQL database designed to solve sharding issues. TiDB is MySQL compatible, and effectively combines the advantages of existing relational databases with the scalability of distributed databases. After a thorough evaluation, Mr. Kitagawa, senior DBA at LINE, and his team decided that TiDB resonated well with the team’s requirements.

Benefits of TiDB

TiDB emerged as the natural choice for LINE Corporation with the following technical benefits:

  • Automated sharding with horizontal scaling capabilities:  TiDB’s horizontal scalability allows the MySQL1 Team to manage a large number of instances effortlessly. It was natural that the MySQL1 team, who was looking for a solution to the sharding challenge, turned to TiDB.
  • Enhanced performance: TiDB’s architecture was designed for high throughput. When the MySQL1 team tested TiDB, they were surprised by the write performance that MySQL would never produce.
  • High availability in multi-region configurations: With MySQL, the team had to worry about the mechanism to achieve high availability in a multi-region or multi-availability zone (AZ) configuration. TiDB handles this automatically, greatly reducing operational complexity.

Scale-in and scale-out in a cluster configuration is also easy, and the ecosystem is very rich, with operation monitoring tools such as Grafana being able to be installed immediately with the installation command (TiUP)

Kentaro Kitagawa,

Senior DBA,  LINE Corporation

The Results

Starting off cautiously, the MySQL1 Team first deployed TiDB for a smaller-scale project—managing MySQL high availability configurations across three different availability zones. They used TiDB’s migration tool to make the transition from MySQL smooth and painless.

TiDB Line architecture
LINE Corporation’s system overview of TiDB

Looking Ahead: Evolving Infrastructure with Distributed SQL  

Some team members were initially skeptical about moving away from a MySQL-only environment. The successful initial implementation of TiDB convinced the team of its merits.

At first, some team members had doubts about moving away from a MySQL-exclusive environment. However, the successful implementation of TiDB won them over.

Looking ahead, Mr. Kitagawa sees the MySQL1 Team handling even more database instances without expanding the team. Additionally, they’re focusing on optimizing operations further to allow for more time on consulting with service developers and deeper internal research. 

By embracing TiDB, LINE Corporation aims to keep pace with the evolving landscape of distributed SQL and is committed to innovating their database management strategies for the future.

Elevate modern apps with TiDB.

Book a Demo