{"id":458,"date":"2021-09-20T10:06:17","date_gmt":"2021-09-20T10:06:17","guid":{"rendered":"https:\/\/fde.cat\/?p=458"},"modified":"2021-09-20T10:06:17","modified_gmt":"2021-09-20T10:06:17","slug":"cachelib-facebooks-open-source-caching-engine-for-web-scale-services","status":"publish","type":"post","link":"https:\/\/fde.cat\/index.php\/2021\/09\/20\/cachelib-facebooks-open-source-caching-engine-for-web-scale-services\/","title":{"rendered":"CacheLib, Facebook\u2019s open source caching engine for web-scale services"},"content":{"rendered":"<p><span>Caching plays an important role in helping people access their information efficiently. For example, when an email app loads, it temporarily caches some messages, so the user can refresh the page without the app retrieving the same messages. However, large-scale caching has long been a complex engineering challenge. Companies must balance the fast experience people have come to expect from caching with keeping systems highly performant and cost-effective. Traditionally, each cache implementation is created and maintained independently by different engineering teams. This approach isn\u2019t efficient, since it ignores different caching systems\u2019 shared challenges, from deployment to maintenance.\u00a0<\/span><\/p>\n<p><span>As traditional dynamic random-access memory (DRAM) caches become more expensive and require more power to scale, companies like Facebook are exploring hardware choices such as non-volatile memory (NVM) drives to augment their caching systems. This DRAM and NVM hybrid model is a step forward, but innovative caching designs are needed to harness the full potential of the hybrid cache. This includes new caching heuristics research that must push the boundaries of traditional systems by identifying the relevant content to cache for the right duration. We have consolidated these innovations and taken them a step further through collaborations and open source work.\u00a0<\/span><\/p>\n<p><span>Today, we\u2019re announcing the release of <\/span><a href=\"https:\/\/github.com\/facebookincubator\/CacheLib\"><span>CacheLib<\/span><\/a><span>, a pluggable in-process caching engine to <\/span><a href=\"https:\/\/www.usenix.org\/conference\/osdi20\/presentation\/berg\"><span>build and scale high-performance services<\/span><\/a><span> collaboratively. <\/span><span>CacheLib\u2019s C++ library<\/span> <span>enables developers to build and customize scalable and concurrent caches through its simple API. We are also open-sourcing <\/span><a href=\"https:\/\/github.com\/facebookincubator\/CacheLib\/blob\/main\/BENCHMARKS.md\"><span>CacheBench<\/span><\/a><span>, a benchmarking tool for evaluating caching performance on diverse production workloads.<\/span><\/p>\n\n<p><span>CacheLib is leveraged as an in-process cache in more than 70 large-scale systems at Facebook, including the social graph, content delivery network, storage, and <\/span><a href=\"https:\/\/research.fb.com\/publications\/scaling-memcache-at-facebook\/\"><span>look-aside key-value caches<\/span><\/a><span>. This existing scale and the potential for open source adoption make CacheLib an aggregation point for optimizations and CacheBench an effective benchmarking tool for evaluating new ideas across diverse caching applications.<\/span><\/p>\n<h2><span>Enabling innovation through partnerships<\/span><\/h2>\n<p><span>As an open source platform, CacheLib and CacheBench have the potential to become an industry standard for caching innovations and benchmarking. To date, our collaborations with research universities, hardware manufacturers, and software companies have yielded substantial results that show the value of this toolkit.\u00a0\u00a0<\/span><\/p>\n<p><span>Over the past two years, we have partnered with many well-known organizations to push the boundaries of caching innovation. Today, we are working with Twitter on integrating CacheLib into <\/span><a href=\"https:\/\/github.com\/twitter\/pelikan\"><span>Pelikan.io<\/span><\/a><span> to enable SSDs for caching objects within the Twitter infrastructure. Pinterest is evaluating the adoption of CacheLib within its machine learning infrastructure systems to improve prediction performance and system stability.<\/span><\/p>\n<p><span>In academia, researchers at Carnegie Mellon University, Princeton University, and Yale University are using CacheLib and CacheBench to <\/span><a href=\"https:\/\/www.pdl.cmu.edu\/PDL-FTP\/NVM\/McAllister-SOSP21.shtml\"><span>prototype research ideas<\/span><\/a><span>. By evaluating their prototypes against industry caching workloads, these researchers can iterate on their projects much more quickly and accurately than before.<\/span><\/p>\n<p><span>We have also collaborated with hardware industry partners like Intel, KIOXIA, Samsung, and Western <\/span><span>Digital<\/span><span> to standardize and enhance SSD technologies which enable improved caching solutions. This work is now part of the <\/span><a href=\"https:\/\/www.opencompute.org\/documents\/nvme-cloud-ssd-specification-v1-0-3-pdf\"><span>Open Compute Project (OCP) NVMe Cloud SSD Specification<\/span><\/a><span>, which we discussed in <\/span><a href=\"https:\/\/www.opencompute.org\/events\/past-events\/webinar-data-center-nvme-ssd-and-edsff-presented-by-facebook-sk-hynix-kioxia-intel-snia\"><span>this webinar<\/span><\/a><span>. This specification, along with CacheLib, will help adapt future NVM technologies for caching workloads across the industry.\u00a0\u00a0<\/span><\/p>\n<p><span>CacheLib and CacheBench have enormous potential to shape the future of caching, thanks to its developer-friendly API, access to many benchmark workloads across the industry, and the collaborative nature of open source. We are thankful for our partners\u2019 support and contributions in using the platform to drive innovation in such an important and complex area. We are open-sourcing this work in an effort to make building the future of caching a more collaborative and open space for sharing across the entire industry. Read more about how to contribute to the project <\/span><a href=\"https:\/\/github.com\/facebookincubator\/CacheLib\/blob\/main\/CONTRIBUTING.md\"><span>here<\/span><\/a><span>.<\/span><\/p>\n<p>The post <a href=\"https:\/\/engineering.fb.com\/2021\/09\/02\/open-source\/cachelib\/\">CacheLib, Facebook\u2019s open source caching engine for web-scale services<\/a> appeared first on <a href=\"https:\/\/engineering.fb.com\/\">Facebook Engineering<\/a>.<\/p>\n<p><a href=\"https:\/\/engineering.fb.com\/2021\/09\/02\/open-source\/cachelib\/\">Read More<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Caching plays an important role in helping people access their information efficiently. For example, when an email app loads, it temporarily caches some messages, so the user can refresh the page without the app retrieving the same messages. However, large-scale caching has long been a complex engineering challenge. Companies must balance the fast experience people&hellip; <a class=\"more-link\" href=\"https:\/\/fde.cat\/index.php\/2021\/09\/20\/cachelib-facebooks-open-source-caching-engine-for-web-scale-services\/\">Continue reading <span class=\"screen-reader-text\">CacheLib, Facebook\u2019s open source caching engine for web-scale services<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-458","post","type-post","status-publish","format-standard","hentry","category-technology","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":496,"url":"https:\/\/fde.cat\/index.php\/2021\/10\/26\/kangaroo-a-new-flash-cache-optimized-for-tiny-objects\/","url_meta":{"origin":458,"position":0},"title":"Kangaroo: A new flash cache optimized for tiny objects","date":"October 26, 2021","format":false,"excerpt":"What the research is:\u00a0 Kangaroo is a new flash cache that enables more efficient caching of tiny objects (objects that are ~100 bytes or less) and overcomes the challenges presented by existing flash cache designs. Since Kangaroo is implemented within CacheLib, Facebook\u2019s open source caching engine, developers can use Kangaroo\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":299,"url":"https:\/\/fde.cat\/index.php\/2021\/08\/31\/caching-with-the-salesforce-commerce-sdk\/","url_meta":{"origin":458,"position":1},"title":"Caching with the Salesforce Commerce SDK","date":"August 31, 2021","format":false,"excerpt":"Co-written by Brian\u00a0RedmondEvery e-commerce application is going to need caching. For some of our customers, millions of shoppers may look at the same product information and, if you have to request that information from the service every time, your application will not scale. This is why we built the Commerce\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":606,"url":"https:\/\/fde.cat\/index.php\/2022\/07\/14\/owl-distributing-content-at-meta-scale\/","url_meta":{"origin":458,"position":2},"title":"Owl: Distributing content at Meta scale","date":"July 14, 2022","format":false,"excerpt":"Being able to distribute large, widely -consumed objects (so-called hot content) efficiently to hosts is becoming increasingly important within Meta\u2019s private cloud. These are commonly distributed content types such as executables, code artifacts, AI models, and search indexes that help enable our software systems. Owl is a new system for\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":817,"url":"https:\/\/fde.cat\/index.php\/2024\/01\/29\/sre-weekly-issue-409\/","url_meta":{"origin":458,"position":3},"title":"SRE Weekly Issue #409","date":"January 29, 2024","format":false,"excerpt":"View on sreweekly.com A message from our sponsor, FireHydrant: It\u2019s time for a new world of alerting tools that prioritize engineer well-being and efficiency. The future lies in intelligent systems that are compatible with real life and use conditional rules to adapt and refine thresholds, reducing alert fatigue. https:\/\/firehydrant.com\/blog\/the-alert-fatigue-dilemma-a-call-for-change-in-how-we-manage-on-call\/ Executing\u2026","rel":"","context":"In &quot;SRE&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":285,"url":"https:\/\/fde.cat\/index.php\/2021\/08\/31\/hadoop-hbase-on-kubernetes-and-public-cloud-part-ii\/","url_meta":{"origin":458,"position":4},"title":"Hadoop\/HBase on Kubernetes and Public Cloud (Part II)","date":"August 31, 2021","format":false,"excerpt":"The first part of this two part blog provided an introduction to concepts in Kubernetes and Public Cloud that are relevant to stateful application management. We also covered how Kubernetes and Hadoop features were leveraged to provide a highly available service. In this second part of the blog we will\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":728,"url":"https:\/\/fde.cat\/index.php\/2023\/06\/27\/meta-developer-tools-working-at-scale\/","url_meta":{"origin":458,"position":5},"title":"Meta developer tools: Working at scale","date":"June 27, 2023","format":false,"excerpt":"Every day, thousands of developers at Meta are working in repositories with millions of files. Those developers need tools that help them at every stage of the workflow while working at extreme scale. In this article we\u2019ll go through a few of the tools in the development process. And, as\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/comments?post=458"}],"version-history":[{"count":1,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/458\/revisions"}],"predecessor-version":[{"id":474,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/458\/revisions\/474"}],"wp:attachment":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/media?parent=458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/categories?post=458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/tags?post=458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}