{"id":945,"date":"2021-02-18T00:00:00","date_gmt":"2021-02-18T00:00:00","guid":{"rendered":"https:\/\/en.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/"},"modified":"2024-07-16T21:04:18","modified_gmt":"2024-07-17T04:04:18","slug":"reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database","status":"publish","type":"case-study","link":"https:\/\/www.pingcap.com\/ko\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/","title":{"rendered":"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Autohome is the leading online destination for automobile consumers in China. It&#8217;s one of the most visited auto websites in the world. We provide professionally produced and user-generated content, a comprehensive automobile library, and extensive automobile listing information, covering the entire car purchase and ownership cycle.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Autohome community forum is one of our oldest applications, with 100 million+ daily visits and 1 billion+ daily interface calls. As our data size rapidly grew, SQL Server became our database bottleneck. <strong>Sharding didn&#8217;t meet our app requirements<\/strong>, \uadf8\ub9ac\uace0 <strong>scaling database capacity affected apps.<\/strong> We looked for a new database solution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After we compared <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/overview\">\ud2f0DB<\/a>, Apache Ignite, and CockroachDB, we chose TiDB, an open-source, distributed, Hybrid Transactional\/Analytical Processing (HTAP) database. Thanks to its horizontal scalability, now we can easily scale out our database, and our transactional <strong>99th percentile latency is within 12 ms.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In 2020, TiDB also served as the underlying storage for our big sales promotion <strong>with hundreds of thousands of Queries Per Second (QPS)<\/strong>. <strong>Our real-time query latency was reduced from 0.5 s to 0.01 s. TiDB&#8217;s 99th percentile latency was within 20 ms<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Our_pain_points_for_the_community_forum_reply_app\"><\/span>Our pain points for the community forum reply app<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Over the past 14 years, the Autohome community forum has grown to 100 million+ posts and 1 billion+ replies. It has 10 million+ daily active users, 100 million+ visits per day, and 1 billion+ average daily interface calls. We stored the forum&#8217;s data in SQL Server. As our businesses quickly grew, we encountered more and more database problems. We needed to resolve two urgent issues: sharding and scaling.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Database sharding didn&#8217;t meet our app requirements<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Autohome forum reply database stores replies to posts. When SQL Server&#8217;s single table was too large, database performance degraded. To solve this issue, we sharded the reply database based on the post ID. The result was 100+ shards and 1,000+ tables in the reply database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, our applications developed and application requirements changed, and <strong>when we wanted to implement some application requirements, sharding couldn&#8217;t meet our needs<\/strong>. We hoped that data was logically in a single table.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scaling database capacity affected applications<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In recent years, as our businesses rapidly grew, our data size increased remarkably. But hard disks had limited capacity, and on each server, we could only add limited disks. As a result, every once in a while we had to add storage servers of larger capacity. However, this approach was complicated, and <strong>every time we changed servers, we still needed to pay attention to related applications<\/strong>. We hoped that scaling database storage would not affect applications. In addition, large-capacity database servers were expensive.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Our_exploration_of_distributed_SQL_databases\"><\/span>Our exploration of distributed SQL databases<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Why we chose TiDB over Apache Ignite and CockroachDB<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In 2019, we investigated three popular distributed SQL databases: TiDB, Apache Ignite, and CockroachDB. After many tests, we chose TiDB, because:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>TiDB is compatible with the MySQL protocol, so we can use TiDB as we used MySQL.<\/li>\n\n\n\n<li>TiDB&#8217;s architectural design is better than Ignite and CockroachDB.<\/li>\n\n\n\n<li>TiDB has a vibrant community and rich documentation.<\/li>\n\n\n\n<li>The TiDB team is easy to work with and responsive to our needs.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">TiDB features we value most<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/overview\">\ud2f0DB<\/a> is an open-source, cloud-native, distributed SQL database built by <a href=\"https:\/\/www.pingcap.com\/ko\/\">PingCAP<\/a> and its open-source community. It is MySQL compatible and features <strong>\uc218\ud3c9\uc801 \ud655\uc7a5\uc131<\/strong>, <strong>strong consistency<\/strong>, \uadf8\ub9ac\uace0 <strong>high availability<\/strong>. It&#8217;s a one-stop solution for both Online Transactional Processing (OLTP) and Online Analytical Processing (OLAP) workloads. You can learn more about TiDB&#8217;s architecture <a href=\"https:\/\/docs.pingcap.com\/tidb\/v4.0\/architecture\">\uc5ec\uae30<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Among TiDB&#8217;s features, we think these are the most attractive:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li> <span style=\"font-size: revert; color: initial; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">Horizontal scalability<\/span><p>We can add nodes to the cluster at any time, and it&#8217;s easy to change nodes.<\/p> <\/li>\n\n\n\n<li> <span style=\"font-size: revert; color: initial; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">Massive data support<\/span> <p>It can easily handle 10 billion+ rows of data. For example, you can check out the <a href=\"https:\/\/www.pingcap.com\/ko\/case-studies\/lesson-learned-from-queries-over-1.3-trillion-rows-of-data-within-milliseconds-of-response-time-at-zhihu\/\">Zhihu case study<\/a>.<\/p> <\/li>\n\n\n\n<li> <span style=\"font-size: revert; color: initial; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">High availability<\/span> <p>SQL Server uses the Publish\/Subscribe replication model, while TiDB uses the Raft algorithm to achieve 100% strong data consistency. When the majority of data replicas are available, TiDB can implement automatic fault recovery.<\/p> <\/li>\n\n\n\n<li> <span style=\"font-size: revert; color: initial; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">Real-time HTAP<\/span> <p>TiDB is an HTAP database that targets both OLTP and OLAP scenarios. <a href=\"https:\/\/docs.pingcap.com\/tidb\/dev\/tiflash-overview\">TiFlash<\/a>, TiDB&#8217;s analytical engine, lets users perform real-time analytics.<\/p> <\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Testing TiDB in OLTP, OLAP, and exception scenarios<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We conducted many functionality, performance, exception, and application access tests on TiDB. Our test results in OLTP, OLAP, and exception scenarios showed that TiDB met our database requirements.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">OLTP testing for TiDB<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">We tested TiDB against 20 million rows of data and 500 concurrent threads in an OLTP scenario.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As the following figure shows, <strong>TiDB&#8217;s 99th percentile response time was within 16 ms<\/strong>. This met our application requirement. <strong>When the amount of data increased, TiDB showed even greater advantages.<\/strong> In addition, we can add TiDB or <a href=\"https:\/\/docs.pingcap.com\/tidb\/dev\/tikv-overview\">TiKV<\/a> nodes to improve read and write performance.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"463\" src=\"https:\/\/www.pingcap.com\/core\/uploads\/2021\/11\/tidb-oltp-query-response-time-autohome-1024x463.jpeg\" alt=\"\" class=\"wp-image-2712\" srcset=\"https:\/\/static.pingcap.com\/files\/2021\/11\/tidb-oltp-query-response-time-autohome-1024x463.jpeg 1024w, https:\/\/static.pingcap.com\/files\/2021\/11\/tidb-oltp-query-response-time-autohome-300x136.jpeg 300w, https:\/\/static.pingcap.com\/files\/2021\/11\/tidb-oltp-query-response-time-autohome-768x347.jpeg 768w, https:\/\/static.pingcap.com\/files\/2021\/11\/tidb-oltp-query-response-time-autohome.jpeg 1407w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">TiDB&#8217;s query response time<br><\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">OLAP testing for TiDB<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To compare TiDB vs. MySQL, we ran a 50 GB TPC-H test. The test results showed that TiDB had a great advantage over MySQL. In the table below, the superior performance for each query is shown in bold:<\/p>\n\n\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 1432px;\">\n<tbody>\n<tr style=\"height: 23px;\">\n<td style=\"width: 13.6905%; height: 46px; text-align: center;\" rowspan=\"2\"><strong>Query<\/strong><\/td>\n<td style=\"width: 68.5715%; height: 23px; text-align: center;\" colspan=\"2\"><strong>Query response time (seconds)<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 53.0953%; height: 23px; text-align: center;\">&nbsp;\ud2f0DB<\/td>\n<td style=\"width: 15.4762%; height: 23px; text-align: center;\">MySQL<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">1<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>201.89<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">1285.14<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">2<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>30.62<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">35.78<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">3<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>133.73<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">1789.76<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">4<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>31.47<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">311.68<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">5<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>600.01<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">553.70<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">6<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>77.13<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">298.15<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">7<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>78.81<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">818.32<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">8<\/td>\n<td style=\"width: 53.0953%; height: 63px;\">\n<p style=\"text-align: center;\">512.43<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">1542.10<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">9<\/td>\n<td style=\"width: 53.0953%; height: 63px;\">\n<p style=\"text-align: center;\">309.06<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">3478.29<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">10<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>48.31<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">595.37<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">11<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>37.86<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">201.42<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">12<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>600.01<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">385.05<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">13<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>121.17<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">648.64<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">14<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>68.92<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">336.48<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">15<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>0.01<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">1080.20<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">16<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>90.70<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">192.12<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">17<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>315.73<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">94.43<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">18<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>600.00<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">308.18<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">19<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>94.02<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">139.46<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">20<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>87.58<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">569.54<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">21<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>600.012<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">1410.61<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 13.6905%; height: 63px; text-align: center;\">22<\/td>\n<td style=\"width: 53.0953%; height: 63px; text-align: center;\">\n<p>62.07<\/p>\n<\/td>\n<td style=\"width: 15.4762%; height: 63px; text-align: center;\">47.89<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Exception testing for TiDB<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">We tested the performance of PD and TiKV during abnormal downtime. We found that PD&#8217;s and TiKV&#8217;s downtime had little impact on applications, and the cluster could automatically recover from failures.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_we_use_TiDB_in_the_Autohome_forum_reply_application\"><\/span>How we use TiDB in the Autohome forum reply application<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We made a detailed migration plan and migrated from SQL Server to TiDB. If you&#8217;d like to learn more about our migration process, you can join the <a href=\"https:\/\/slack.tidb.io\/invite?team=tidb-community&amp;channel=everyone&amp;ref=pingcap-blog\">TiDB community on Slack<\/a>. To guarantee that faults would not occur after we deployed applications to production, we made several changes to our applications. Then, we optimized each SQL statement, so that they could hit the optimal index. By doing so, <strong>for one billion rows of data, our OLTP applications&#8217; 99th percentile response time was within 12 ms, and the 99.9th percentile response time was within 62 ms<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1411\" height=\"627\" src=\"https:\/\/www.pingcap.com\/core\/uploads\/2021\/02\/tidb-99th-and-99.9th-percentile-response-times.jpg\" alt=\"TiDB's 99th and 99.9th percentile response times\" class=\"wp-image-946\" srcset=\"https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-99th-and-99.9th-percentile-response-times.jpg 1411w, https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-99th-and-99.9th-percentile-response-times-300x133.jpg 300w, https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-99th-and-99.9th-percentile-response-times-1024x455.jpg 1024w, https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-99th-and-99.9th-percentile-response-times-768x341.jpg 768w\" sizes=\"auto, (max-width: 1411px) 100vw, 1411px\" \/><\/figure>\n\n\n\n<div class=\"caption-center\">TiDB&#8217;s 99th and 99.9th percentile response times<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">In September 2019, we ran the distributed database TiDB in the production environment. Since then, it has been running stably.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we&#8217;ll introduce how we use TiDB in our yearly big sales promotion party.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introducing_TiDB_to_our_big_sales_promotion\"><\/span>Introducing TiDB to our big sales promotion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On August 18, 2020, Autohome held a three-hour sales promotion party. This promotion party included multiple interactive activities, such as bargain rushes, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Red_envelope\">red envelopes<\/a>, and lucky draws. These applications involved <strong>millions of users<\/strong>, and the system reached <strong>a peak of hundreds of thousands of QPS<\/strong>. The promotional activities issued millions of prizes and red envelopes. Because each round of bargain rushes and lucky draws was short, its traffic was intense, and these applications involved reconciliation and write-off, this set high requirements for system design.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why we chose TiDB<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Based on these application scenarios, the system design needed a suitable data persistence layer. As I explain in detail below, we deployed TiDB in three data centers (DCs) across two cities as the underlying storage.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Cross-city high availability<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The three DCs across two cities architecture is a high-availability disaster recovery solution for production DCs, intra-city disaster recovery centers, and remote disaster recovery centers. In this deployment, the three DCs are interconnected. If one DC fails or a disaster occurs, the other DCs can normally operate and take over critical applications or all applications. Compared with the multi-DCs in the same city plan, the three DCs in two cities deployment has cross-city high availability and can survive urban natural disasters.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Real-time HTAP<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">TiDB provides two storage engines: the <a href=\"https:\/\/docs.pingcap.com\/tidb\/dev\/tikv-overview\">TiKV<\/a> row storage engine and the <a href=\"https:\/\/docs.pingcap.com\/tidb\/dev\/tiflash-overview\">TiFlash<\/a> column storage engine. TiDB replicates updated data from TiKV to TiFlash in real time to ensure data strong consistency between TiKV and TiFlash. For HTAP resource isolation, we can deploy TiKV and TiFlash on different machines as needed.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Scaling out and scaling in easily<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The TiDB architecture separates computing from storage, so we can separately scale out or scale in the computing or storage capacity online as needed. The scaling process is transparent to application operations and maintenance staff.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Compatible with the MySQL 5.7 protocol and MySQL ecosystem<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">TiDB is compatible with the MySQL 5.7 protocol, common features of MySQL, and the MySQL ecosystem. We were able to migrate our applications to TiDB with minimal code changes, and, in some cases, no changes at all. In addition, TiDB provides a series of <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/migration-overview\">data migration tools<\/a> to help migrate application data easily into TiDB.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Good reputation and use experience<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">At Autohome, the User Product Center was the first business unit to use TiDB, and it migrated the core application forum replies from SQL Server to TiDB. The car owner price application migrated from MySQL to TiDB. We have experience in migrating to, using, and optimizing TiDB. TiDB has a good reputation in Autohome.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The TiDB cluster architecture for our big sales promotion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">TiDB uses the Raft algorithm to support the three DCs in two cities configuration and ensure that TiDB cluster data is consistent and highly available. In addition, because DCs in the same city have low network latency, we can distribute application traffic to them simultaneously and control the distribution of the <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/glossary#regionpeerraft-group\">Region<\/a> <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/glossary#leaderfollowerlearner\">leader<\/a> and PD leader. This lets DCs in the same city co-load application traffic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the sales promotion, we deployed TiDB in three DCs across two cities, with five replicas for data. Our cluster components were as follows:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Component<\/strong><\/td><td><strong>Version<\/strong><\/td><td><strong>Instance count<\/strong><\/td><\/tr><tr><td>\ud2f0DB<\/td><td>4.0.3<\/td><td>10<\/td><\/tr><tr><td>PD<\/td><td>4.0.3<\/td><td>5<\/td><\/tr><tr><td>TiKV<\/td><td>4.0.3<\/td><td>10<\/td><\/tr><tr><td>TiFlash<\/td><td>4.0.3<\/td><td>2<\/td><\/tr><tr><td>TiCDC<\/td><td>4.0.3<\/td><td>4<\/td><\/tr><tr><td>MySQL<\/td><td>5.7.25<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1491\" height=\"869\" src=\"https:\/\/www.pingcap.com\/core\/uploads\/2021\/02\/tidb-tiflash-ticdc.jpg\" alt=\"TiDB + TiFlash + TiCDC\" class=\"wp-image-947\" srcset=\"https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-tiflash-ticdc.jpg 1491w, https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-tiflash-ticdc-300x175.jpg 300w, https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-tiflash-ticdc-1024x597.jpg 1024w, https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-tiflash-ticdc-768x448.jpg 768w, https:\/\/static.pingcap.com\/files\/2021\/02\/tidb-tiflash-ticdc-1440x839.jpg 1440w\" sizes=\"auto, (max-width: 1491px) 100vw, 1491px\" \/><\/figure>\n\n\n\n<div class=\"caption-center\">TiDB + TiFlash + TiCDC<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As this diagram shows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\n<p>TiFlash is TiDB&#8217;s columnar storage engine. This makes TiDB a true HTAP database. TiFlash provides the same snapshot isolation level of consistency as TiKV and ensures that the latest data is read.<\/p>\n<p>During the big sales promotion party, we used TiFlash to display real-time data on a large screen.<\/p>\n<\/li>\n\n\n\n<li>\n<p><a href=\"https:\/\/docs.pingcap.com\/tidb\/dev\/ticdc-overview\/\">TiCDC<\/a> is an open-source feature that replicates TiDB&#8217;s incremental changes to downstream platforms by subscribing to change logs in TiKV. It also provides <a href=\"https:\/\/www.pingcap.com\/ko\/docs\/dev\/ticdc\/ticdc-open-protocol\/\">TiCDC Open Protocol<\/a> to support other systems that subscribe to TiKV&#8217;s data changes.<\/p>\n<p>In our cluster, it replicated TiDB cluster data to the downstream MySQL database in real time. TiCDC&#8217;s replication latency was within seconds, which satisfied our real-time requirements for online sales promotion applications.<\/p>\n<\/li>\n\n\n\n<li>\n<p>The MySQL database was used as a backup in case of failures to improve the applications&#8217; capacity to tolerate disasters.<\/p>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">TiDB stress tests<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before we put TiDB into production for the big sales promotion, we performed multiple tests on TiDB 3.0.16, 4.0.1, 4.0.2, and 4.0.3 in three DCs across two cities. In these tests, we encountered a problem and a bug. With the PingCAP team&#8217;s help, we fixed them quickly.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Test tools<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Because Sysbench didn&#8217;t have reconnection functionality, we couldn&#8217;t use it to test some scenarios. We used Sysbench and an application simulation program.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Tool<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>Sysbench<\/td><td>Performance tests and some functionality tests<\/td><\/tr><tr><td>Application simulation program<\/td><td>Application simulation, functionality tests, and performance tests<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Test items<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">We developed a test plan based on actual application scenarios. The main test items were as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><p>Single node failure tests simulated:<\/p>\n<ul class=\"wp-block-list\">\n<li>A tidb-server failure<\/li>\n\n\n\n<li>A PD follower failure<\/li>\n\n\n\n<li>A PD leader failure<\/li>\n\n\n\n<li>A tikv-server failure<\/li>\n\n\n\n<li>Two tikv-server failures<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><p>Internet data center (IDC) failure tests simulated:<\/p>\n<ul class=\"wp-block-list\">\n<li>All servers&#8217; downtime in IDC 2, with the PD leader in IDC 1<\/li>\n\n\n\n<li>All servers&#8217; downtime in IDC 2, with the PD leader in IDC 2<\/li>\n\n\n\n<li>IDC 2 network isolation, with the PD leader in IDC 1<\/li>\n\n\n\n<li>IDC 2 network isolation, with the PD leader in IDC 2<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><p>Performance tests:<\/p>\n<ul class=\"wp-block-list\">\n<li><code>oltp_read_write<\/code> test, five replicas, optimistic transactions<\/li>\n\n\n\n<li><code>oltp_read_write<\/code> test, five replicas, pessimistic transactions<\/li>\n\n\n\n<li><code>oltp_read_write<\/code> test, three replicas, optimistic transactions<\/li>\n\n\n\n<li><code>oltp_read_write<\/code> test, three replicas, pessimistic transactions<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Test conclusion<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">We won&#8217;t discuss test results in detail here, but our conclusion was that <strong>whether it was a single node failure or an IDC failure, the cluster could recover within about 30 seconds<\/strong> and continue to provide services to meet application needs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">TiDB&#8217;s performance metrics in production<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">During the big sales promotion, TiDB showed good performance and supported our bargain rush, red envelopes, and lucky draw activities very well:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>TiFlash reduced the query response time for panel real-time analytics from 0.5 s to 0.01 s.<\/strong><\/li>\n\n\n\n<li><strong>TiCDC replicated TiDB&#8217;s data to MySQL downstream with about 2 s latency.<\/strong><\/li>\n\n\n\n<li><strong>TiDB&#8217;s 99th percentile response time was within 20 ms, with 9,000+ connections.<\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As our community forum&#8217;s visits and posts continued to increase, the huge data size placed great pressure on our SQL Server database. To scale out our database, we migrated from SQL Server to TiDB. We no longer need to worry about troublesome database sharding.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ve run TiDB for more than two years, and it&#8217;s used in important applications such as forum replies, resource pools, and friend management. We also deployed TiDB in three DCs across two cities for our 2020 big sales promotion applications. This solution guaranteed our data high availability and helped us achieve real-time HTAP. We could scale out or scale in our database as needed. In addition, TiCDC&#8217;s high availability and low latency, as well as support for large-scale clusters has made a big impression on us.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have any questions or want detailed information about our experience, you could join the <a href=\"https:\/\/slack.tidb.io\/invite?team=tidb-community&amp;channel=everyone&amp;ref=pingcap-blog\">TiDB community on Slack<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>As Autohome&#8217;s businesses quickly grew, their huge data size placed great pressure on their SQL Server database. To scale out their database and perform real-time analytics, they migrated from SQL Server to TiDB and use TiDB in multiple important apps.<\/p>","protected":false},"author":102,"featured_media":948,"template":"","tags":[55,10,26,11,9],"customer":[83],"industry":[8],"class_list":["post-945","case-study","type-case-study","status-publish","has-post-thumbnail","hentry","tag-high-availability","tag-htap","tag-no-sharding","tag-real-time-analytics","tag-scalability","customer-autohome","industry-internet"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database | TiDB<\/title>\n<meta name=\"description\" content=\"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study &quot;Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database&quot; here.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database | TiDB\" \/>\n<meta property=\"og:description\" content=\"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study &quot;Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database&quot; here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-17T04:04:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2021\/02\/mysql-horizontal-scaling-database-autohome.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data1\" content=\"11\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/case-study\\\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\\\/\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/case-study\\\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\\\/\",\"name\":\"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database | TiDB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/case-study\\\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/case-study\\\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/02\\\/mysql-horizontal-scaling-database-autohome.jpg\",\"datePublished\":\"2021-02-18T00:00:00+00:00\",\"dateModified\":\"2024-07-17T04:04:18+00:00\",\"description\":\"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study \\\"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database\\\" here.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/case-study\\\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\\\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pingcap.com\\\/case-study\\\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/case-study\\\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/02\\\/mysql-horizontal-scaling-database-autohome.jpg\",\"contentUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/02\\\/mysql-horizontal-scaling-database-autohome.jpg\",\"width\":2000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/case-study\\\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pingcap.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Case Studies\",\"item\":\"https:\\\/\\\/www.pingcap.com\\\/customers\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#website\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pingcap.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/11\\\/pingcap-logo.png\",\"contentUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/11\\\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/pingcap2015\",\"https:\\\/\\\/x.com\\\/PingCAP\",\"https:\\\/\\\/linkedin.com\\\/company\\\/pingcap\",\"https:\\\/\\\/youtube.com\\\/channel\\\/UCuq4puT32DzHKT5rU1IZpIA\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database | TiDB","description":"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study \"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database\" here.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/","og_locale":"ko_KR","og_type":"article","og_title":"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database | TiDB","og_description":"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study \"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database\" here.","og_url":"https:\/\/www.pingcap.com\/ko\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_modified_time":"2024-07-17T04:04:18+00:00","og_image":[{"width":2000,"height":667,"url":"https:\/\/static.pingcap.com\/files\/2021\/02\/mysql-horizontal-scaling-database-autohome.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@PingCAP","twitter_misc":{"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"11\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/","url":"https:\/\/www.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/","name":"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database | TiDB","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2021\/02\/mysql-horizontal-scaling-database-autohome.jpg","datePublished":"2021-02-18T00:00:00+00:00","dateModified":"2024-07-17T04:04:18+00:00","description":"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study \"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database\" here.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2021\/02\/mysql-horizontal-scaling-database-autohome.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/02\/mysql-horizontal-scaling-database-autohome.jpg","width":2000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Case Studies","item":"https:\/\/www.pingcap.com\/customers\/"},{"@type":"ListItem","position":3,"name":"Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]}]}},"card_markup":"<div class=\"card-case-study\"><div class=\"card-case-study__image-container\"><img class=\"card-case-study__image\" alt=\"autohome-logo.png\" src=\"https:\/\/static.pingcap.com\/files\/2021\/10\/autohome-logo.png\" loading=\"lazy\" width=1909 height=1134 \/><\/div><span class=\"card-case-study__title\">Reducing Real-Time Query Latency from 0.5 s to 0.01 s with a Scale-Out HTAP Database<\/span><div class=\"card-case-study__button\"><a class=\"button--secondary\" href=\"https:\/\/www.pingcap.com\/ko\/case-study\/reduce-real-time-query-latency-from-0-5s-to-0-01s-with-scale-out-htap-database\/\" target=\"_blank\">View Case Study<\/a><\/div><\/div>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/case-study\/945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/case-study"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/case-study"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/102"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/948"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=945"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=945"},{"taxonomy":"customer","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/customer?post=945"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/industry?post=945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}