![]() In MongoDB, we had to implement transactions in the application layer, but it wasn’t efficient and was prone to errors. Without the guarantee of ACID transactions, there would be more conflicts. Our applications extend from money to virtual currency, and the level of concurrency rises drastically. ACID, which is short for atomicity, consistency, isolation, and durability, can guarantee data validity in the event of failure. But as our business expanded and our product matured, the priority shifted: efficiency, transactions, and constraints became equally important. We traded data constraints and transactions for efficiency. In other words, in the early stage of PalFish, the selection of MongoDB was a trade-off. Because we didn’t need full-fledged transactions, MongoDB met our needs. MongoDB offered various options on data consistency, which, combined with multi-version concurrency control (MVCC) on the application layer, could implement simple transactions.As a standalone database, MongoDB also performed better than MySQL, so it saved us a great deal of maintenance cost.At that time, this approach was more efficient because we needed to frequently add and delete fields. Since MongoDB was a NoSQL database, we didn’t need to use any data definition language (DDL) operations, like creating schemas or creating tables.Given the situation, MongoDB was a good fit: At PalFish, we were still exploring our business model, and our products iterated at an incredible speed. ![]() When PalFish was established in 2015, NoSQL databases were prevalent in the market. Application requirements are a significant factor in choosing the data infrastructure, including the database. To understand our migration from MongoDB to TiDB, we must first understand PalFish’s application scenarios. (In this section, the MongoDB discussion is based solely on MongoDB 2.x and 3.x.) We hope our experience can help you find the most appropriate database for your application. In this post, we’ll share with you why we chose TiDB over MongoDB and MySQL and how TiDB supports our application with doubled users. To solve these problems, we migrated from MongoDB to TiDB, an open-source, MySQL-compatible, distributed SQL database that supports Hybrid Transactional/Analytical Processing (HTAP) workloads. MongoDB (2.x and 3.x) does not support transactions and has no predefined schema to directly regulate data. As of October 2020, PalFish has over 40 million users, of which more than 2 million are paid users.Īs our business rapidly grew, the surge of data posed a severe challenge to our MongoDB database. It offers tailored English speaking experience to English as a Second Language (ESL) students. ![]() PalFish is a fast-growing online education platform that focuses on English learning. Transcreator: Ran Huang Editor: Tom Dewan Author: Xianlin Chen (Head of Technology Hub at PalFish) ![]()
0 Comments
Leave a Reply. |