{"id":4529,"date":"2022-02-03T01:29:31","date_gmt":"2022-02-03T09:29:31","guid":{"rendered":"https:\/\/en.pingcap.com\/?post_type=case-study&#038;p=4529"},"modified":"2025-05-07T19:33:48","modified_gmt":"2025-05-08T02:33:48","slug":"reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms","status":"publish","type":"case-study","link":"https:\/\/www.pingcap.com\/ko\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/","title":{"rendered":"Reducing P99 Latency to 150 \u03bcs and Hardware Cost by 75% with a Scale-Out DBMS"},"content":{"rendered":"<p>Tuya Smart is a global Internet of Things (IoT) development platform. It builds interconnectivity standards to bridge the intelligent needs of brands, original equipment manufacturers, developers, and retail chains across a broad range of smart devices and industries. By the end of June 2021, the Tuya IoT Development Platform served 384,000+ developers around the world. Now, smart devices \u201cPowered by Tuya\u201d are available in 200+ countries and regions in 100,000+ stores all over the world.<\/p>\n\n\n\n<p>As our business developed, our data volume grew sharply. We needed to ensure that our average query response time was less than 10 milliseconds. We tried AWS Aurora and Apache Ignite, but they didn\u2019t meet our business requirements. Thanks to TiKV, a highly scalable, low latency, key-value database, we solved our database problem. <strong>With TiKV,\u00a0 we reduced our hardware cost by 75%. Our P99 query latency was 150 microseconds, and the write latency was 360 microseconds.<\/strong><\/p>\n\n\n\n<p>In this post, I\u2019ll share our business pain point, why we chose TiKV, our challenge with using TiKV, and our future plans.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"our-business-challenge-real-time-responses-to-massive-data\"><span class=\"ez-toc-section\" id=\"Our_business_challenge_real-time_responses_to_massive_data\"><\/span>Our business challenge: real-time responses to massive data<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Our equipment processes 84 billion requests every day around the world. The average peak transactions per second (TPS) reached 1.5 million. We need to ensure that our average response time for queries is less than 10 milliseconds. We\u2019re in the IoT industry where there is no off-peak traffic, and the amount of writes is very large. We spent six years looking for the most suitable data architecture solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"database-exploration\"><span class=\"ez-toc-section\" id=\"Database_exploration\"><\/span>Database exploration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We tried Aurora for three years. But as our data size grew, it didn\u2019t meet our business requirements. Then, we switched to Ignite and used it for two years. But it was not ideal, either.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"aws-aurora-couldn-t-withstand-our-data-volume-surge\">AWS Aurora couldn\u2019t withstand our data volume surge<\/h3>\n\n\n\n<p>Previously, we used AWS Aurora. Its architecture separated storage and computing layers. Our application ran stably on Aurora for three years. In these years, Aurora fully met our application demands. This is because six or seven years ago IoT was unpopular, and smart home devices were not widely used.<\/p>\n\n\n\n<p>However, as our business developed, in recent years, our devices have increased exponentially. Every year, the number of our devices increases by three to five times. <strong>Aurora couldn\u2019t withstand the data volume surge. Not to mention that IoT devices\u2019 response times should be within 10 milliseconds. Even if we sharded our database and split the cluster, we couldn\u2019t meet our business needs.<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"671\" src=\"https:\/\/static.pingcap.com\/files\/2023\/04\/14004110\/image-34-1024x671.png\" alt=\"\" class=\"wp-image-11561\" srcset=\"https:\/\/static.pingcap.com\/files\/2023\/04\/14004110\/image-34-1024x671.png 1024w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004110\/image-34-300x197.png 300w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004110\/image-34-768x504.png 768w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004110\/image-34-1536x1007.png 1536w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004110\/image-34-1440x944.png 1440w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004110\/image-34.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>The AWS Aurora-based architecture<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"apache-ignite-scaling-risked-data-loss\">Apache Ignite scaling risked data loss<\/h3>\n\n\n\n<p>We also tried Apache Ignite, a key-value system similar to TiKV, but it couldn&#8217;t meet our business needs, either. Its partition size was large; one partition stored 1 GB of data. <strong>Unlike TiKV, its scalability was not linear. When our business volume doubled and we needed to scale out our database, we had to shut down our machines. There was a risk of data loss<\/strong>; this is unacceptable to IoT devices. To solve this issue, we used Aurora behind an Ignite server for disaster recovery, and data was written to Aurora synchronously.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"652\" src=\"https:\/\/static.pingcap.com\/files\/2023\/04\/14004124\/image-36-1024x652.png\" alt=\"\" class=\"wp-image-11563\" srcset=\"https:\/\/static.pingcap.com\/files\/2023\/04\/14004124\/image-36-1024x652.png 1024w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004124\/image-36-300x191.png 300w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004124\/image-36-768x489.png 768w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004124\/image-36-1536x977.png 1536w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004124\/image-36-1440x916.png 1440w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004124\/image-36.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>The Apache Ignite-based architecture<\/em><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"tikv-is-an-optimal-solution\">TiKV is an optimal solution<\/h3>\n\n\n\n<p><a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\">\ud2f0DB<\/a> is an open-source distributed SQL database built by <a href=\"https:\/\/www.pingcap.com\/ko\/\">PingCAP<\/a> and its open-source community. We tested TiDB 3.0 and TiDB 4.0, but they didn\u2019t meet our requirements for low query latency and high throughput. The PingCAP team analyzed these problems and found that the SQL parser layer consumed most of the time, while <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/tidb-architecture#tikv-server\">TiKV<\/a>, TiDB\u2019s underlying storage engine, was completely idle.&nbsp;<\/p>\n\n\n\n<p>We thought we could remove the SQL layer (<a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/tidb-architecture#tidb-server\">\ud2f0DB<\/a>) and write directly to TiKV, because:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Latency existed in the SQL layer.<\/li>\n\n\n\n<li>Although IoT devices\u2019 data had high TPS, their application logic was not that complex.<\/li>\n<\/ul>\n\n\n\n<p>After we used TiKV in production, we found the result was exciting and recognized by the whole company.<\/p>\n\n\n\n<p>Then, we launched TiKV 4.0 in various regions around the world. After a year of testing, no problems occurred, and our systems ran normally. If we hadn\u2019t used TiKV, we would have needed 12 machines. But with TiKV, under the same configuration, only three machines were enough. This means that <strong>our hardware cost was reduced by 75%<\/strong>.<\/p>\n\n\n\n<p>When we used TiKV in the production environment, our throughput was already 200,000 TPS. At that time, we used TiKV 4.0.8 in our cluster located in North America. <strong>The P99 query latency was 150 microseconds, and the write latency was 360 microseconds (both less than one millisecond).<\/strong> If you have similar scenarios, you can also try it.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"312\" src=\"https:\/\/static.pingcap.com\/files\/2023\/04\/14004136\/image-37.png\" alt=\"\" class=\"wp-image-11565\" srcset=\"https:\/\/static.pingcap.com\/files\/2023\/04\/14004136\/image-37.png 864w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004136\/image-37-300x108.png 300w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004136\/image-37-768x277.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>Seek duration in TiKV<\/em><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"307\" src=\"https:\/\/static.pingcap.com\/files\/2023\/04\/14004148\/image-38.png\" alt=\"\" class=\"wp-image-11566\" srcset=\"https:\/\/static.pingcap.com\/files\/2023\/04\/14004148\/image-38.png 876w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004148\/image-38-300x105.png 300w, https:\/\/static.pingcap.com\/files\/2023\/04\/14004148\/image-38-768x269.png 768w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>Write duration in TiKV<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"our-new-challenge-deploying-tikv-across-regions\"><span class=\"ez-toc-section\" id=\"Our_new_challenge_deploying_TiKV_across_regions\"><\/span>Our new challenge: deploying TiKV across regions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>All of our applications were deployed in three regions, and we needed cross-region calls. The communication between three replicas consumed network traffic, and we must pay for that traffic. But TiKV did not support calls within a region. Even though our hardware cost was reduced by 75%, our network cost was higher than before.<\/p>\n\n\n\n<p>Our solution was to enable gRPC message compression to reduce network traffic. But this traffic was for replicating <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/glossary#regionpeerraft-group\">Regions<\/a> (the basic unit of key-value data movement in TiKV). This solution didn\u2019t reduce application code\u2019s cross-region replication traffic.<\/p>\n\n\n\n<p>The reason for this problem was that TiKV did not perform server-side filtering. We needed to retrieve the data stored in TiKV to the local machine for application filtering and then put the data back. We communicated with the TiKV R&amp;D team about this problem. TiKV\u2019s later versions may introduce server-based filtering to reduce server load. The traffic cost may also decrease.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"upgrading-our-architecture-from-x86-to-arm-to-reduce-costs-and-increase-efficiency\"><span class=\"ez-toc-section\" id=\"Upgrading_our_architecture_from_x86_to_Arm_to_reduce_costs_and_increase_efficiency\"><\/span>Upgrading our architecture from x86 to Arm to reduce costs and increase efficiency<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The reason why the IoT industry focuses on reducing costs is that the gross profit margin of this industry is very low. In June 2020, AWS launched Amazon EC2 C6g instances. They declared that C6g instances delivered up to 40% better price-performance over C5 instances.<\/p>\n\n\n\n<p>We tried C6g instances, but when we compiled and deployed TiKV using <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/tiup-overview\">TiUP<\/a>, the package manager of the TiDB ecosystem, the response time was six to seven times longer than the x86 architecture. That is, TiUP deployed a universal compiled version, which was not so appropriate to the hardware. After we tested TiKV, we found that TiKV 4.0 and its RocksDB version did not support the SSE instruction set.<\/p>\n\n\n\n<p>At that time, the compromise solution was mixed deployment. TiKV used the x86 architecture, and other nodes used the Arm architecture. But this was inconvenient. If we upgraded TiKV\u2019s version, the pointed mirror would be sometimes x86 and sometimes Arm. This would be troublesome, so we switched back to the x86 architecture.<\/p>\n\n\n\n<p>In 2021, TiKV 5.0 was released. The internal RocksDB version of TiKV 5.0 was updated to 6.4.6 which supports the AArch64-optimized CRC32C SSE4.2 instruction set. It&#8217;s expected to solve the latency issue we encountered in TiKV 4.0. We\u2019ll test it in the second half of 2021, and we expect that our cost may be significantly reduced.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"our-future-plans\"><span class=\"ez-toc-section\" id=\"Our_future_plans\"><\/span>Our future plans<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the future, with the help of TiKV 5.0 and 5.1, we\u2019re confident that we can handle our large business volume. We estimate that by the end of 2021, TiKV\u2019s traffic will increase by two to three times.&nbsp;<\/p>\n\n\n\n<p>Our big data platform also uses TiDB for large-screen display. To make the application easier to use, we\u2019re thinking of using TiKV 5.1 for storage in our IoT device pipeline. In the second half of 2021, we plan to deploy the TiDB Arm version.<br>If you\u2019d like to know more about our story or have any questions, you&#8217;re welcome to join the <a href=\"https:\/\/slack.tidb.io\/invite?team=tikv-wg&amp;channel=general&amp;ref=pingcap-blog\">TiKV community on Slack<\/a> and send us your feedback.<\/p>","protected":false},"excerpt":{"rendered":"<p>Tuya Smart needed to ensure their average query latency was less than 10 ms. While AWS Aurora and Apache Ignite didn\u2019t meet their requirements, TiKV helps reduce their P99 latency to 150 \u03bcs and write latency to 360 \u03bcs.<\/p>","protected":false},"author":178,"featured_media":17220,"template":"","tags":[9,22],"customer":[150],"industry":[8],"class_list":["post-4529","case-study","type-case-study","status-publish","has-post-thumbnail","hentry","tag-scalability","tag-tikv","customer-tuya-smart","industry-internet"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How Tuya Reduces Latency to 150 \u03bcs &amp; Hardware Cost by 75%<\/title>\n<meta name=\"description\" content=\"While AWS Aurora and Apache Ignite didn\u2019t meet Tuya&#039;s requirements, TiKV helps reduce their P99 latency to 150 \u03bcs and write latency to 360 \u03bcs.\" \/>\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\/reducing-p99-latency-to-150-\u03bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How Tuya Reduces Latency to 150 \u03bcs &amp; Hardware Cost by 75%\" \/>\n<meta property=\"og:description\" content=\"Tuya Smart needed to ensure their average query latency was less than 10 ms. While AWS Aurora and Apache Ignite didn\u2019t meet their requirements, TiKV helps reduce their P99 latency to 150 \u03bcs and write latency to 360 \u03bcs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/case-study\/reducing-p99-latency-to-150-\u03bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/\" \/>\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=\"2025-05-08T02:33:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2024\/05\/27003943\/tuya.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"Tuya Smart needed to ensure their average query latency was less than 10 ms. While AWS Aurora and Apache Ignite didn\u2019t meet their requirements, TiKV helps reduce their P99 latency to 150 us and write latency to 360 us.\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7\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\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/\",\"url\":\"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/\",\"name\":\"How Tuya Reduces Latency to 150 \u03bcs & Hardware Cost by 75%\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2024\/05\/27003943\/tuya.jpg\",\"datePublished\":\"2022-02-03T09:29:31+00:00\",\"dateModified\":\"2025-05-08T02:33:48+00:00\",\"description\":\"While AWS Aurora and Apache Ignite didn\u2019t meet Tuya's requirements, TiKV helps reduce their P99 latency to 150 \u03bcs and write latency to 360 \u03bcs.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#primaryimage\",\"url\":\"https:\/\/static.pingcap.com\/files\/2024\/05\/27003943\/tuya.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2024\/05\/27003943\/tuya.jpg\",\"width\":1500,\"height\":500,\"caption\":\"tuya\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#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 P99 Latency to 150 \u03bcs and Hardware Cost by 75% with a Scale-Out DBMS\"}]},{\"@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":"How Tuya Reduces Latency to 150 \u03bcs & Hardware Cost by 75%","description":"While AWS Aurora and Apache Ignite didn\u2019t meet Tuya's requirements, TiKV helps reduce their P99 latency to 150 \u03bcs and write latency to 360 \u03bcs.","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\/reducing-p99-latency-to-150-\u03bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/","og_locale":"ko_KR","og_type":"article","og_title":"How Tuya Reduces Latency to 150 \u03bcs & Hardware Cost by 75%","og_description":"Tuya Smart needed to ensure their average query latency was less than 10 ms. While AWS Aurora and Apache Ignite didn\u2019t meet their requirements, TiKV helps reduce their P99 latency to 150 \u03bcs and write latency to 360 \u03bcs.","og_url":"https:\/\/www.pingcap.com\/ko\/case-study\/reducing-p99-latency-to-150-\u03bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_modified_time":"2025-05-08T02:33:48+00:00","og_image":[{"width":1500,"height":500,"url":"https:\/\/static.pingcap.com\/files\/2024\/05\/27003943\/tuya.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_description":"Tuya Smart needed to ensure their average query latency was less than 10 ms. While AWS Aurora and Apache Ignite didn\u2019t meet their requirements, TiKV helps reduce their P99 latency to 150 us and write latency to 360 us.","twitter_site":"@PingCAP","twitter_misc":{"Est. reading time":"7\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/","url":"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/","name":"How Tuya Reduces Latency to 150 \u03bcs & Hardware Cost by 75%","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2024\/05\/27003943\/tuya.jpg","datePublished":"2022-02-03T09:29:31+00:00","dateModified":"2025-05-08T02:33:48+00:00","description":"While AWS Aurora and Apache Ignite didn\u2019t meet Tuya's requirements, TiKV helps reduce their P99 latency to 150 \u03bcs and write latency to 360 \u03bcs.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2024\/05\/27003943\/tuya.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2024\/05\/27003943\/tuya.jpg","width":1500,"height":500,"caption":"tuya"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/#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 P99 Latency to 150 \u03bcs and Hardware Cost by 75% with a Scale-Out DBMS"}]},{"@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=\"tuya smart\" src=\"https:\/\/static.pingcap.com\/files\/2023\/12\/14220703\/tuya-smart.png\" loading=\"lazy\" width=1560 height=780 \/><\/div><span class=\"card-case-study__title\">Reducing P99 Latency to 150 \u03bcs and Hardware Cost by 75% with a Scale-Out DBMS<\/span><div class=\"card-case-study__button\"><a class=\"button--secondary\" href=\"https:\/\/www.pingcap.com\/ko\/case-study\/reducing-p99-latency-to-150-%ce%bcs-and-hardware-cost-by-75-with-a-scale-out-dbms\/\" target=\"_blank\">View Case Study<\/a><\/div><\/div>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/case-study\/4529","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\/178"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/17220"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=4529"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=4529"},{"taxonomy":"customer","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/customer?post=4529"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/industry?post=4529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}