{"id":1030,"date":"2017-05-27T00:00:00","date_gmt":"2017-05-27T00:00:00","guid":{"rendered":"https:\/\/en.pingcap.com\/blog\/rust-in-tikv\/"},"modified":"2024-07-02T10:18:55","modified_gmt":"2024-07-02T17:18:55","slug":"rust-in-tikv","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/rust-in-tikv\/","title":{"rendered":"Rust in TiKV"},"content":{"rendered":"<p>This is the speech Siddon Tang gave at the 1st Rust Meetup in Beijing on April 16, 2017.<\/p>\n<p>Hello everyone, today I will talk about how we use Rust in <a href=\"https:\/\/github.com\/pingcap\/tikv\">TiKV<\/a>.<\/p>\n<p>Before we begin, let me introduce myself. My name is Siddon Tang, the Chief Architect of PingCAP. Before I joined PingCAP, I had worked at Kingsoft and Tencent. I love open source and have developed some projects like LedisDB, go-mysql, etc&#8230;<\/p>\n<p>At first, I will explain the reason why we chose Rust to develop TiKV, then show you the architecture of TiKV briefly and the key technologies. In the end, I will introduce what we plan to do in the future.<\/p>\n<h3>What&#8217;s TiKV?<\/h3>\n<p>All right, let&#8217;s begin. First, what is TiKV. TiKV is a distributed Key-Value database with the following features:<\/p>\n<ul>\n<li><strong>Geo-replication:<\/strong> We use Raft and Placement Driver to replicate data geographically to guarantee data safety.<\/li>\n<li><strong>Horizontal scalability:<\/strong> We can add some nodes directly if we find that the rapidly growing data will soon exceed the system capacity.<\/li>\n<li><strong>Consistent distributed transaction:<\/strong> We use an optimized, two phase commit protocol, based on Google Percolator, to support distributed transactions. You can use &#8220;begin&#8221; to start a transaction, then do something, then use &#8220;commit&#8221; or &#8220;rollback&#8221; to finish the transaction.<\/li>\n<li><strong>Coprocessor for distributed computing:<\/strong> Just like HBase, we support a coprocessor framework to let user do computing in TiKV directly.<\/li>\n<li><strong>Working with TiDB like Spanner with F1:<\/strong> Using TiKV as a backend storage engine of TiDB, we can provide the best distributed relational database.<\/li>\n<\/ul>\n<h3>We need a language with&#8230;<\/h3>\n<p>As you see, TiKV has many powerful features. To develop these features, we also need a powerful programming language. The language should have:<\/p>\n<ul>\n<li><strong>Fast speed:<\/strong> We take the performance of TiKV very seriously, so we need a language which runs very fast at runtime.<\/li>\n<li><strong>Memory safety<\/strong>: As a program that is going to run for a long time, we don&#8217;t want to meet any memory problem, such as dangling pointer, memory leak, etc&#8230;<\/li>\n<li><strong>Thread safety<\/strong>: We must guarantee data consistency all the time, so any data race problem must be avoided.<\/li>\n<li><strong>Binding C efficiency<\/strong>: We depend on RocksDB heavily, so we must be able to call the RocksDB API as fast as we can, without any performance reduction.<\/li>\n<\/ul>\n<h3>Why not C++?<\/h3>\n<p>To develop a high performance service, C++ may be the best choice in most cases, but we didn&#8217;t choose it. We figured we might spend too much time avoiding the memory problem or the data race problem. Moreover, C++ has no official package manager and that makes the maintaining and compiling third dependences very troublesome and difficult, resulting in a long development cycle.<\/p>\n<h3>Why not Go?<\/h3>\n<p>At first, we considered using Go, but then gave up this idea. Go has GC which fixes many memory problems, but it might stop the running process sometimes. No matter how little time the stop takes, we can&#8217;t afford it. Go doesn&#8217;t solve the data race problem either. Even we can use double dash race in test or at runtime, this isn&#8217;t enough.<\/p>\n<p>Besides, although we can use Goroutine to write the concurrent logic easily, we still can&#8217;t neglect the runtime expenses of the scheduler. We met a problem a few days ago: we used multi goroutines to select the same context but found that the performance was terrible, so we had to use one sub context for one goroutine, then the performance became better.<\/p>\n<p>More seriously, CGO has heavy expenses, but we need to call RocksDB API without delay. For the above reasons, we didn&#8217;t choose Go even this is the favorite language in our team.<\/p>\n<h3>So we turned to Rust&#8230;<\/h3>\n<h3>But Rust&#8230;<\/h3>\n<p>Rust is a system programming language, maintained by Mozilla. It is a very powerful language, however, you can see the curve, the learning curve is very very steep.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"257\" height=\"193\" class=\"wp-image-1032\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg\" alt=\"Steep learning curve of Rust\" \/>\n<p>I have been using many programming languages, like C++, Go, python, lua, etc. and Rust is the hardest language for me to master. In PingCAP, we will let the new colleague spend at least one month to learn Rust, to struggle with the compiling errors, and then to rise above it. This would never happen for Go.<\/p>\n<p>Besides, the compiling time is very long, even longer than C++. Each time when I type cargo build to start building TiKV, I can even do some pushups.<\/p>\n<p>Although Rust is around for a long time, it still lacks of libraries and tools, and some third projects have not been verified in production yet. These are all the risks for us. Most seriously, it is hard for us to find Rust programmer because only few know it in China, so we are always shorthanded.<\/p>\n<h3>Then, Why Rust?<\/h3>\n<p>Although Rust has the above disadvantages, its advantages are attractive for us too. Rust is memory safe, so we don&#8217;t need to worry about memory leak, or dangling pointer any more.<\/p>\n<p>Rust is thread safe, so there won&#8217;t be any data race problem. All the safety are guaranteed by compiler. So in most cases, when the compiling passes, we are sure that we can run the program safely.<\/p>\n<p>Rust has no GC expenses, so we won&#8217;t meet the &#8220;stop the world&#8221; problem. Calling C through FFI is very fast, so we don&#8217;t worry the performance reduction when calling the RocksDB API. At last, Rust has an official package manager, Cargo, we can find many libraries and use them directly.<\/p>\n<h3>We made a hard but great decision: Use Rust!<\/h3>\n<h3>TiKV Timeline<\/h3>\n<img loading=\"lazy\" decoding=\"async\" width=\"555\" height=\"214\" class=\"wp-image-1033\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/timeline.jpg\" alt=\"TiKV timeline\" srcset=\"https:\/\/static.pingcap.com\/files\/2017\/05\/timeline.jpg 555w, https:\/\/static.pingcap.com\/files\/2017\/05\/timeline-300x116.jpg 300w\" sizes=\"auto, (max-width: 555px) 100vw, 555px\" \/>\n<p>Here you can see the TiKV timeline. We first began to develop TiKV January 1st, 2016, and made it open source on April 1st, 2016, and this is not a joke like Gmail at All April Fool&#8217;s Day. TiKV was first used in production in October, 2016, when we had not even released a beta version. In November, 2016, we released the first beta version; then RC1 in December, 2016, RC2 in February, this year. Later we plan to release RC3 in April and the first GA version in June.<\/p>\n<p>As you can see, the development of TiKV is very fast and the released versions of TiKV are stable. Choosing Rust has already been proved a correct decision. Thanks, Rust.<\/p>\n<h3>TiKV Architecture<\/h3>\n<img loading=\"lazy\" decoding=\"async\" width=\"291\" height=\"252\" class=\"wp-image-1034\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/kvarchi.jpg\" alt=\"TiKV architecture\" \/>\n<p>Now let&#8217;s go deep into TiKV. You can see from the TiKV architecture that the hierarchy of TiKV is clear and easy to understand.<\/p>\n<p>At the bottom layer, TiKV uses RocksDB, a high performance, persistent Key-Value store, as the backend storage engine.<\/p>\n<p>The next layer is Raft KV. TiKV uses the Raft to replicate data geographically. TiKV is designed to store tons of data which one Raft group can&#8217;t hold. So we split the data with ranges and use each range as an individual Raft group. We name this approach: Multi-Raft groups.<\/p>\n<p>TiKV provides a simple Key-Value API including SET, GET, DELETE to let user use it just as any distributed Key-Value storage. The upper layer also uses these to support advanced functions.<\/p>\n<p>Above the Raft layer, it is MVCC. All the keys saved in TiKV must contain a globally unique timestamp, which is allocated by Placement Driver. TiKV uses it to support distributed transactions.<\/p>\n<p>On the top layer, it is the KV and coprocessor API layer for handling client requests.<\/p>\n<h3>Multi-Raft<\/h3>\n<img loading=\"lazy\" decoding=\"async\" width=\"703\" height=\"248\" class=\"wp-image-1035\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/multi.jpg\" alt=\"Multi-Raft\" srcset=\"https:\/\/static.pingcap.com\/files\/2017\/05\/multi.jpg 703w, https:\/\/static.pingcap.com\/files\/2017\/05\/multi-300x106.jpg 300w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/>\n<p>Here is an example of Multi-Raft.<\/p>\n<p>You can see that there are four TiKV nodes. Within each store, we have several regions. Region is the basic unit of data movement and is replicated by Raft. Each region is replicated to three nodes. These three replicas of one Region make a Raft group.<\/p>\n<h3>Scale Out<\/h3>\n<h4>Scale-out (initial state)<\/h4>\n<img loading=\"lazy\" decoding=\"async\" width=\"796\" height=\"265\" class=\"wp-image-1036\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/scale2.jpg\" alt=\"Scale-out (initial state)\" srcset=\"https:\/\/static.pingcap.com\/files\/2017\/05\/scale2.jpg 796w, https:\/\/static.pingcap.com\/files\/2017\/05\/scale2-300x100.jpg 300w, https:\/\/static.pingcap.com\/files\/2017\/05\/scale2-768x256.jpg 768w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/>\n<p>Here is an example of horizontal scalability. At first, we have four nodes, Node A has three regions, others have two regions.<\/p>\n<p>Of course, Node A is busier than other nodes, and we want to reduce its stress.<\/p>\n<h4>Scale-out (add new node)<\/h4>\n<img loading=\"lazy\" decoding=\"async\" width=\"837\" height=\"336\" class=\"wp-image-304\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/10\/scale3.jpg\" alt=\"Scale-out (add a new node)\" srcset=\"https:\/\/static.pingcap.com\/files\/2017\/10\/scale3.jpg 837w, https:\/\/static.pingcap.com\/files\/2017\/10\/scale3-300x120.jpg 300w, https:\/\/static.pingcap.com\/files\/2017\/10\/scale3-768x308.jpg 768w\" sizes=\"auto, (max-width: 837px) 100vw, 837px\" \/>\n<p>So we add a new Node E, and begin to move the region 1 in Node A to Node E. But here we find that the leader of region 1 is in Node A, so we will first transfer the leader from Node A to Node B.<\/p>\n<h4>Scale-out (balancing)<\/h4>\n<img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"335\" class=\"wp-image-305\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/10\/scale4.jpg\" alt=\"Scale-out (balancing)\" srcset=\"https:\/\/static.pingcap.com\/files\/2017\/10\/scale4.jpg 794w, https:\/\/static.pingcap.com\/files\/2017\/10\/scale4-300x127.jpg 300w, https:\/\/static.pingcap.com\/files\/2017\/10\/scale4-768x324.jpg 768w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/>\n<p>After that, the leader of region 1 is in Node B now, then we add a new replica of region 1 in Node E.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"796\" height=\"344\" class=\"wp-image-306\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/10\/scale5.jpg\" alt=\"Remove a replica from Node A\" srcset=\"https:\/\/static.pingcap.com\/files\/2017\/10\/scale5.jpg 796w, https:\/\/static.pingcap.com\/files\/2017\/10\/scale5-300x130.jpg 300w, https:\/\/static.pingcap.com\/files\/2017\/10\/scale5-768x332.jpg 768w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/>\n<p>Then we remove the replica of region 1 from Node A. All these are executed by the Placement Driver automatically. What we only need is to add node, if we find the system is busy. Very easy, right?<\/p>\n<h3>A simple write flow<\/h3>\n<img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"468\" class=\"wp-image-1037\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/write.jpg\" alt=\"A simple write flow\" srcset=\"https:\/\/static.pingcap.com\/files\/2017\/05\/write.jpg 608w, https:\/\/static.pingcap.com\/files\/2017\/05\/write-300x231.jpg 300w\" sizes=\"auto, (max-width: 608px) 100vw, 608px\" \/>\n<p>Here is a simple write flow: when a client sends a write request to TiKV, TiKV first parses the protocol and then dispatches the request to the KV thread, then the KV thread executes some transaction logics and sends the request to Raft thread, after TiKV replicates the Raft log and applies it to RocksDB, the write request is finished.<\/p>\n<h3>Key technologies<\/h3>\n<p>Now let&#8217;s move on to the key technologies:<\/p>\n<p>For networking, we use a widely used protocol, Protocol Buffers, to serialize or unserialize data fastly.<\/p>\n<p>At first, we used <strong>MIO<\/strong> to build up the network framework. Although MIO encapsulates low level network handling, it is still a very basic library that we need to receive or send data manually, and to decode or encode our customized network protocol. It is not convenient actually. So from RC2, we have been refactoring networking with gRPC. The benefit of gRPC is very obvious. We don&#8217;t need to care how to handle network anymore, only focusing on our logic, and the code looks simple and clear. Meanwhile, users can build their own TiKV client with other programming languages easily. We have already been developing a TiKV client with Java.<\/p>\n<p>For <strong>asynchronous framework<\/strong>. After receiving the request, TiKV dispatches the request to different threads to handle it asynchronously. At first, we used the MIO plus callback to handle the asynchronous request, but callback may break the code logic, and it is hard to read and write correctly, so now we have been refactoring with tokio-core and futures, and we think this style is more modern for Rust in the future. Sometimes, we also use the thread pool to dispatch simple tasks, and we will use futures-cpupool later.<\/p>\n<p>For <strong>storage<\/strong>, we use rust-rocksdb to access RocksDB.<\/p>\n<p>For <strong>monitoring<\/strong>, we wrote a rust client for Prometheus, and this client is recommended in the official wiki. For profiling, we use the jemallocator with enabling profile feature and use clippy to check our codes.<\/p>\n<h3>TODO&#8230;<\/h3>\n<p>Ok, that&#8217;s what we have done and are doing. Here are what we will do in the future:<\/p>\n<ul>\n<li>Make TiKV faster, like removing Box. we have used many boxes in TiKV to write code easily, this is not efficient. In our benchmark, dynamic dispatch is at least three times slower than static dispatch, so later we will use Trait Trait directly.<\/li>\n<li>Make TiKV more stable, like introducing Rust sanitizer.<\/li>\n<li>Contribute more Rust open source modules, like raft library, open-tracing, etc.<\/li>\n<li>Participate in other Rust projects more deeply, like rust-gRPC<\/li>\n<li>Write more articles about Rust on Chinese social media and organize more Rust meetups.<\/li>\n<li>Be a strong advocate of Rust in China.<\/li>\n<\/ul>\n<img loading=\"lazy\" decoding=\"async\" width=\"643\" height=\"343\" class=\"wp-image-1038\" src=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/group.jpg\" alt=\"Attendees at the 1st Rust Meetup\" srcset=\"https:\/\/static.pingcap.com\/files\/2017\/05\/group.jpg 643w, https:\/\/static.pingcap.com\/files\/2017\/05\/group-300x160.jpg 300w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/>","protected":false},"excerpt":{"rendered":"<p>This is the speech Siddon Tang gave at the 1st Rust Meetup in Beijing on April 16, 2017.<\/p>","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","footnotes":""},"categories":[6],"tags":[23,22],"class_list":["post-1030","post","type-post","status-publish","format-standard","hentry","category-engineering","tag-rust","tag-tikv"],"acf":[],"featured_image_src":null,"author_info":{"display_name":"Siddon Tang","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/siddon-tang\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rust in TiKV | TiDB<\/title>\n<meta name=\"description\" content=\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post &quot;Rust in TiKV&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\/blog\/rust-in-tikv\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rust in TiKV | TiDB\" \/>\n<meta property=\"og:description\" content=\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post &quot;Rust in TiKV&quot; here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/rust-in-tikv\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-27T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-02T17:18:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg\" \/>\n<meta name=\"author\" content=\"Siddon Tang\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Siddon Tang\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/\"},\"author\":{\"name\":\"Siddon Tang\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/bf9e2b12ee766148f14e18ebe395d94c\"},\"headline\":\"Rust in TiKV\",\"datePublished\":\"2017-05-27T00:00:00+00:00\",\"dateModified\":\"2024-07-02T17:18:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/\"},\"wordCount\":1866,\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg\",\"keywords\":[\"Rust\",\"TiKV\"],\"articleSection\":[\"Engineering\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/\",\"url\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/\",\"name\":\"Rust in TiKV | TiDB\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg\",\"datePublished\":\"2017-05-27T00:00:00+00:00\",\"dateModified\":\"2024-07-02T17:18:55+00:00\",\"description\":\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \\\"Rust in TiKV\\\" here.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#primaryimage\",\"url\":\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg\",\"contentUrl\":\"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rust in TiKV\"}]},{\"@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\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/bf9e2b12ee766148f14e18ebe395d94c\",\"name\":\"Siddon Tang\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"caption\":\"Siddon Tang\"},\"description\":\"Siddon Tang is the SVP of Product &amp; Engineering at PingCAP and one of the earliest engineers on the TiDB and TiKV projects. He has been instrumental in TiKV's storage engine design, leading the adoption of RocksDB and Rust for high-performance distributed storage. Before PingCAP, Siddon worked at Kingsoft and Tencent, and has authored several widely-used open-source projects including LedisDB, go-mysql, and go-mysql-elasticsearch. He is a frequent speaker at database and systems engineering events, including Percona Live and RocksDB meetups. On GitHub as @siddontang, he is an active contributor to the distributed systems community with a focus on Rust, Go, and storage engine internals.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/siddontang\/\"],\"url\":\"https:\/\/www.pingcap.com\/ko\/blog\/author\/siddon-tang\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rust in TiKV | TiDB","description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Rust in TiKV\" 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\/blog\/rust-in-tikv\/","og_locale":"ko_KR","og_type":"article","og_title":"Rust in TiKV | TiDB","og_description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Rust in TiKV\" here.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/rust-in-tikv\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2017-05-27T00:00:00+00:00","article_modified_time":"2024-07-02T17:18:55+00:00","og_image":[{"url":"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg","type":"","width":"","height":""}],"author":"Siddon Tang","twitter_card":"summary_large_image","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"Written by":"Siddon Tang","Est. reading time":"9\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/"},"author":{"name":"Siddon Tang","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/bf9e2b12ee766148f14e18ebe395d94c"},"headline":"Rust in TiKV","datePublished":"2017-05-27T00:00:00+00:00","dateModified":"2024-07-02T17:18:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/"},"wordCount":1866,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#primaryimage"},"thumbnailUrl":"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg","keywords":["Rust","TiKV"],"articleSection":["Engineering"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/","url":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/","name":"Rust in TiKV | TiDB","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#primaryimage"},"thumbnailUrl":"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg","datePublished":"2017-05-27T00:00:00+00:00","dateModified":"2024-07-02T17:18:55+00:00","description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Rust in TiKV\" here.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#primaryimage","url":"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg","contentUrl":"https:\/\/en.pingcap.com\/wp-content\/uploads\/2017\/05\/curve.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/rust-in-tikv\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Rust in TiKV"}]},{"@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"]},{"@type":"Person","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/bf9e2b12ee766148f14e18ebe395d94c","name":"Siddon Tang","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/","url":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","caption":"Siddon Tang"},"description":"Siddon Tang is the SVP of Product &amp; Engineering at PingCAP and one of the earliest engineers on the TiDB and TiKV projects. He has been instrumental in TiKV's storage engine design, leading the adoption of RocksDB and Rust for high-performance distributed storage. Before PingCAP, Siddon worked at Kingsoft and Tencent, and has authored several widely-used open-source projects including LedisDB, go-mysql, and go-mysql-elasticsearch. He is a frequent speaker at database and systems engineering events, including Percona Live and RocksDB meetups. On GitHub as @siddontang, he is an active contributor to the distributed systems community with a focus on Rust, Go, and storage engine internals.","sameAs":["https:\/\/www.linkedin.com\/in\/siddontang\/"],"url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/siddon-tang\/"}]}},"grav_blocks":false,"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/rust-in-tikv\/\"><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Engineering<\/div><\/div><h5 class=\"card-resource__title\">Rust in TiKV<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/1030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=1030"}],"version-history":[{"count":2,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/1030\/revisions"}],"predecessor-version":[{"id":18036,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/1030\/revisions\/18036"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=1030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=1030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=1030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}