{
    "componentChunkName": "component---src-templates-issues-tsx",
    "path": "/issues/136",
    "result": {"data":{"issuesJson":{"id":"753e0024-16bc-53aa-8902-0dee3993f1d7","title":"dragonflydb/dragonfly: Dragonfly是一种针对现代应用程序负荷需求而构建的内存数据库，完全兼容Redis和Memcached的 API，迁移时无需修改任何代码。相比于这些传统的内存数据库，Dragonfly提供了其25倍的吞吐量，高缓存命中率和低尾延迟，并且对于相同大小的工作负载运行资源最多可减少80%。","number":136,"bodyHTML":"<div align=\"center\" dir=\"auto\">\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\"><img src=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\" width=\"100%\" height=\"3\" data-animated-image=\"\" data-canonical-src=\"https://cdn.jsdelivr.net/gh/eryajf/tu@main/img/image_20240420_214408.gif\" style=\"max-width: 100%; height: auto; max-height: 3px;\"></a><br><br></p>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th align=\"right\">Repos</th>\n<th align=\"left\"><a href=\"https://github.com/dragonflydb/dragonfly\">dragonflydb/dragonfly</a></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"right\"><strong>Views</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/871b4d4a1e88796e03f4e6f81ea5740ebbf41db596f14ae0377e9af52136170a/68747470733a2f2f76696577732e77686174696c656172656e65642e746f6461792f76696577732f6769746875622f647261676f6e666c7964622f647261676f6e666c792e737667\" alt=\"views\" data-canonical-src=\"https://views.whatilearened.today/views/github/dragonflydb/dragonfly.svg\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>Stars</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/d6966f6a08b4cda71fcaf2d1b8a030b251ab7b00b83340a62bfab802e6edb2e3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f647261676f6e666c7964622f647261676f6e666c793f636f6c6f723d663266303864266c6f676f3d556e64657274616c65266c6f676f436f6c6f723d656234363330\" alt=\"stars\" data-canonical-src=\"https://img.shields.io/github/stars/dragonflydb/dragonfly?color=f2f08d&amp;logo=Undertale&amp;logoColor=eb4630\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>Forks</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/82c8a1efdb9ac2797cdc783d44010123232019759cd721f46b1a4e36a5eda12d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f647261676f6e666c7964622f647261676f6e666c793f636f6c6f723d626138366562266c6f676f3d48616e647368616b65266c6f676f436f6c6f723d656136616136\" alt=\"forks\" data-canonical-src=\"https://img.shields.io/github/forks/dragonflydb/dragonfly?color=ba86eb&amp;logo=Handshake&amp;logoColor=ea6aa6\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>License</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/0c93ca71e73bb599dbfbd81eb5bbb82f63a427dc55ced5d8a7de2d4025f1f1c5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c2d4e4f4e452d626c75653f6c6f676f3d756e6c6963656e7365\" alt=\"license\" data-canonical-src=\"https://img.shields.io/badge/L-NONE-blue?logo=unlicense\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>UpdatedAt</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/9642d49541fa321b85f64692b42a05b2d4981d992d49f676b4f6934b85a962d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f647261676f6e666c7964622f647261676f6e666c793f646973706c61795f74696d657374616d703d636f6d6d6974746572266c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e5355684555674141414234414141416543415941414141374d4b3669414141414358424957584d41414173544141414c457745416d7077594141414648556c45515652346e4c5658375539615678776d3236646c582532466468627825324232253246516e626b7655627264554151674a4a496655444e574454546d4f76314651554661504a346b7573725630314a7431734e70637453327533626f745a746d786439744a5346536f714b71494635625944464c436f76436c656673747a4a387758524c445a4c7a6e6b634f343535376e3364332532466e655a3472454f515a74315771462532423858467234253242664f4c4565326a6f59307a776638546f795a50766a45676b4c592532426b306d6d72584f36644b696e787a476b30666a5430782532425279723055716e6359637a4d317263347451253242497270324c4758646f344e4334567657715453373277716c632532427231334f527269364b6458646e624f484c6c776c7a4a70524b6e3657342532424b36706f4f434e6e494166486a253246253242776168495a4234764b6e715a6630714a704e49716c2532467638545530634e6c3572627963337730516e54703379324c54614a374d314e617844723266526e315370504736476961323174664533345463614f617931694d55564f5146624659714957536f31573854694156616e43306576584f4542375770313448466232327a453566714c4f433545524c515769644e614e49347545636339693768634a6c644868324e57725135674464624f6c7061756d49754c62326174415144506e7a3062384e6257636d785656524a33486d7870536377777a4f4a6d4b44524765384c6c435a444c4739673754496e5631516c376462586256316533675430574b697243466f6d6b5079767758466c5a474a4f6a563625324253743634757564445a4f55354555636f782532464d455144567674364d62634e3237593341797a687633737061557242365a3971724a534f3139657a6a387032704c426b4a792532426343484a7857493567573574636652527a31645531394766476b6f7539505a4f34736d52396a4746777065783444793362766e6d4b79706f74625531335669646a71595a68726a343972764d457425324625324659714c7a396430304e6a57253246637a67796f394f35317a7336614e6c6f354644747530445a675146686c47584a30644241446f4e6864367576703657686f617967374e394c564748386d443462253246486e667455516f4e4734764c51306769784d716c5725324234714f6a744e48446733723166365969525347785279375576714c62395534716b716e78504f4e7661356c447048723125324279794b524e4b57425a793565644d554842326d3572792532422532424551772532427a6766347a6f39253246306f634e3357527a4c4277344a2532424a7950574372716d4967475974554f735744346f785a46516f50556a4770564871493425324661666b51504336665a5165654d31253242764c7549516e6a754257514444437363726d485039656f4e5041744271664f6e5875614b25324268364a45624772732532427076764d6d78654962683836336162565065597953456f39464a48704e4d464a59253242503563575a6b6667374f3174537759436553514c54593345385130392532464256504a556c78516a7368543142736343593032723955445542667643484236367063665041336c794165336e6772332532463437584467614a7a736c7937787741364e5a746c555550437541487161536a5549502532427375653842525741432532464e6651374a5a505a35397330476a3756747049537a34685125324243706658474d4b685a63764c70554b7866574d386f68766637702532464f446a4842666356463849736b383267314648796b63564645253242555a414158343761452532464d6c34504f3530506e75683025324678346e6d637957507364774468427836436d6b4c562532466746446a594b784f4a4f4674623077517949684c39527943774b33414f664947703159464542686e4d4a634c525745624b644b516f55366e63545a6b494544696341792532463831645675454d3552775066657934784f7830496b25324649324e6e466b692532425761664f6f464959466367595a43797864376543556a626334416d46363566742532466b4d686b336f25324235686337734d4a79716a4a45477659466151464972375930775077384246415925324236253242766d6b3377367a7a5275444d6d5a5652736668385274413075455453443775434254364459514e36697665553066706b594c6a453671725672744f78654e4b553954484c5a4a396b4255324a427342685635416976422532466f4b61514e4b675043427744596149665a4334616454684f71463457454e56694c4a77566f586f62664c424b56773637414f6154734c6336355461564b32317651344c613939654b6359673576627873624f627a5451394e37554b4467554f3177446a6944494942736868357a746733396e514d4c535a4248344f7a424f55444551586d323036643366634c67737762585141345068634b336e6873775531427a3877765130395248472532466f597933656a6677424e6d746f59714c4130586741414141424a52553545726b4a676767253344253344266c6162656c3d557064617465644174\" alt=\"last-commit\" data-canonical-src=\"https://img.shields.io/github/last-commit/dragonflydb/dragonfly?display_timestamp=committer&amp;logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHUlEQVR4nLVX7U9aVxwm26dlX%2Fdhbx%2B2%2FQnbkvUbrdUAQgJJIfUDNWDTTmOv1FQUFaPJ4kusrV01Jt1sNpctS2u3botZtmxd9tJSFSoqKqIF5bYDFLCovClefstzJ8wXRLDZLznkcO4557n3d3%2FneZ4rEOQZt1WqF%2B8XFr4%2BfOLEe2joY0zwf8ToyZPvjEgkLY%2Bk0mmrXO6dKinxzGk0fjT0x%2BRyr0UqncYczM1rc4tQ%2BIrp2LGXdo4NC4VvWqTS72wqlc%2Br13ORri6KdXdnbOHLlwlzJpRKn6W4%2BK6poOCNnIAfHj%2F%2BwahIZB4vKnqZf0qJpNIql%2Fv8TU0cNl5rbyc3w0QnTp3y2LTaJ7M1NaxDr2fRn1SpPG6Gia21tfE34TcaOay1iMUVOQFbFYqIWSo1W8TiAVanC0evXOEB7Wp14HFb22zE5fqLOC5ERLQWidNaNI4uEcc9i7hcJldHh2NWrQ5gDdbOlpaumIuLb2atAQDPnz0b8NbWcmxVVRJ3HmxpScwwzOJmKDRGe8LlCZDLG9g7TInV1Ql7dbXbV1e3gT0WKirCFomkPyvwXFlZGJOjV6%2BSt64uudDZOU5EUcox%2FMEQDVvt6MbcN27Y3Ayzhv3spaUrB6Z9qrJSO19ezj8p2pLBkJy%2BcCHJxWI5gW5tcfRRz1dU19GfGkou9PZO4smR9jGFwpex4Dy3bvnmKypotbU13VidjqYZhrj49rvMEt%2F%2FYqLz9d00NjW%2Fczgyo9O51zs6aNlo5FDtu0DZgQFhlGXJ0dBADoNhd6uvp6Whoayg7N9LVGH8mD4b%2FHnftUQoNG4vLQ0gixMqlW%2B4qOjtNHDg3r1f6YiRSGxRy7UvqLb9U4qkqnxPONva5lDpHr1%2ByyKRNKWBZy5edMUHB2m5ry%2B%2BEQw%2Bzgf4zo9%2F0ocN3WRzLBw4J%2BJyPWCrqmIgGYtUOsWD4oxZFQoPUjGpVHqI4%2FafkQPC6fZQeeM1%2BvLuIQnjuBWQDDCscrmHP9eoNPAtBqfOnXuaK%2Bh6JEbGrs%2BpvvMmxeIbh863abVPeYySEo9FJHpNMFJY%2BP5cWZkfg7O1tSwYCeSQLTY3E8Q09%2FBVPJUlxQjshT1BscCY02r9UDUBfvCHB66pcfPA3lyAe3ngr3%2F47XDgaJzsly7xwA6NZtlUUPCuAHqaSjUIP%2Bsue8BRWAC%2FNfQ7JZPZ59s0Gj7VtpISz4hQ%2BCpfXGMKhZcvLpUKxfWM8ohvf7p%2FODjHBfcVF8Isk82g1FHykcVFE%2BUZAAX47aE%2FMl4PO50Pnuh0%2Fx4nmcyWPsdwDhBx6CmkLV%2FgFDjYKxOJOFtb0wQyIhL9RyCwK3AOfIGp1YFEBhnMJcLRWEbKdKQoU6ncTZkIEDicAy%2F81dVuEM5RwPfey4xOx0Ik%2FI2NnFki%2BWafOoFIYFcgYZCyxd7eCUjbc4AmF65ft%2FkMhk3o%2B5hc7sMJyqjJEGvYFaQFIr7Y0wPw8BFAY%2B6%2Bvmk3w6zzRuDMmZVRsfh8RtA0uETSD7uCBT6DYQN6iveU0fpkYLjE6qrVrtOxeNKU9THLZJ9kBU2JBsBhV5AivB%2FoKaQNKgPCBwDYaIfZC4adThOqF4WENViLJwVoXobfLBKVw67AOaTsLc65TaVK21vQ4La99eKcYg5vbxsbObzTQ9N7UKDgUO1wDjiDIIBshh5ztg39nQMLSZBH4OzBOUDEQXm206d3fcLgswbXQA4PhcK3nhswU1Bz8wvQ09RHG%2FoYy3ejfwBNmtoYqLA0XgAAAABJRU5ErkJggg%3D%3D&amp;label=UpdatedAt\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>CreatedAt</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/0541d55166b73418b3835ca4d0fe192a22bcccc9306ea2916e5ac4bd3be647a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f637265617465642d61742f647261676f6e666c7964622f647261676f6e666c793f6c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e5355684555674141414234414141416543415941414141374d4b3669414141414358424957584d41414173544141414c457745416d7077594141414648556c45515652346e4c5658375539615678776d3236646c582532466468627825324232253246516e626b7655627264554151674a4a496655444e574454546d4f76314651554661504a346b7573725630314a7431734e70637453327533626f745a746d786439744a5346536f714b71494635625944464c436f76436c656673747a4a387758524c445a4c7a6e6b634f343535376e3364332532466e655a3472454f515a74315771462532423858467234253242664f4c4565326a6f59307a776638546f795a50766a45676b4c592532426b306d6d72584f36644b696e787a476b30666a5430782532425279723055716e6359637a4d317263347451253242497270324c4758646f344e4334567657715453373277716c632532427231334f527269364b6458646e624f484c6c776c7a4a70524b6e3657342532424b36706f4f434e6e494166486a253246253242776168495a4234764b6e715a6630714a704e49716c2532467638545530634e6c3572627963337730516e54703379324c54614a374d314e617844723266526e315370504736476961323174664533345463614f617931694d55564f5146624659714957536f31573854694156616e43306576584f4542375770313448466232327a453566714c4f433545524c515769644e614e49347545636339693768634a6c644868324e57725135674464624f6c7061756d49754c62326174415144506e7a3062384e6257636d785656524a33486d7870536377777a4f4a6d4b44524765384c6c435a444c4739673754496e5631516c376462586256316533675430574b697243466f6d6b5079767758466c5a474a4f6a563625324253743634757564445a4f55354555636f782532464d455144567674364d62634e3237593341797a687633737061557242365a3971724a534f3139657a6a387032704c426b4a792532426343484a7857493567573574636652527a31645531394766476b6f7539505a4f34736d52396a4746777065783444793362766e6d4b79706f74625531335669646a71595a68726a343972764d457425324625324659714c7a396430304e6a57253246637a67796f394f35317a7336614e6c6f354644747530445a675146686c47584a30644241446f4e6864367576703657686f617967374e394c564748386d443462253246486e667455516f4e4734764c51306769784d716c5725324234714f6a744e48446733723166365969525347785279375576714c62395534716b716e78504f4e7661356c447048723125324279794b524e4b57425a793565644d554842326d3572792532422532424551772532427a6766347a6f39253246306f634e3357527a4c4277344a2532424a7950574372716d4967475974554f735744346f785a46516f50556a4770564871493425324661666b51504336665a5165654d31253242764c7549516e6a754257514444437363726d485039656f4e5041744271664f6e5875614b25324268364a45624772732532427076764d6d78654962683836336162565065597953456f39464a48704e4d464a59253242503563575a6b6667374f3174537759436553514c54593345385130392532464256504a556c78516a7368543142736343593032723955445542667643484236367063665041336c794165336e6772332532463437584467614a7a736c7937787741364e5a746c555550437541487161536a5549502532427375653842525741432532464e6651374a5a505a35397330476a3756747049537a34685125324243706658474d4b685a63764c70554b7866574d386f68766637702532464f446a4842666356463849736b383267314648796b63564645253242555a414158343761452532464d6c34504f3530506e75683025324678346e6d637957507364774468427836436d6b4c562532466746446a594b784f4a4f4674623077517949684c39527943774b33414f664947703159464542686e4d4a634c525745624b644b516f55366e63545a6b494544696341792532463831645675454d3552775066657934784f7830496b25324649324e6e466b692532425761664f6f464959466367595a43797864376543556a626334416d46363566742532466b4d686b336f25324235686337734d4a79716a4a45477659466151464972375930775077384246415925324236253242766d6b3377367a7a5275444d6d5a5652736668385274413075455453443775434254364459514e36697665553066706b594c6a453671725672744f78654e4b553954484c5a4a396b4255324a427342685635416976422532466f4b61514e4b675043427744596149665a4334616454684f71463457454e56694c4a77566f586f62664c424b56773637414f6154734c6336355461564b32317651344c613939654b6359673576627873624f627a5451394e37554b4467554f3177446a6944494942736868357a746733396e514d4c535a4248344f7a424f55444551586d323036643366634c67737762585141345068634b336e6873775531427a3877765130395248472532466f597933656a6677424e6d746f59714c4130586741414141424a52553545726b4a676767253344253344266c6162656c3d437265617465644174\" alt=\"create-at\" data-canonical-src=\"https://img.shields.io/github/created-at/dragonflydb/dragonfly?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHUlEQVR4nLVX7U9aVxwm26dlX%2Fdhbx%2B2%2FQnbkvUbrdUAQgJJIfUDNWDTTmOv1FQUFaPJ4kusrV01Jt1sNpctS2u3botZtmxd9tJSFSoqKqIF5bYDFLCovClefstzJ8wXRLDZLznkcO4557n3d3%2FneZ4rEOQZt1WqF%2B8XFr4%2BfOLEe2joY0zwf8ToyZPvjEgkLY%2Bk0mmrXO6dKinxzGk0fjT0x%2BRyr0UqncYczM1rc4tQ%2BIrp2LGXdo4NC4VvWqTS72wqlc%2Br13ORri6KdXdnbOHLlwlzJpRKn6W4%2BK6poOCNnIAfHj%2F%2BwahIZB4vKnqZf0qJpNIql%2Fv8TU0cNl5rbyc3w0QnTp3y2LTaJ7M1NaxDr2fRn1SpPG6Gia21tfE34TcaOay1iMUVOQFbFYqIWSo1W8TiAVanC0evXOEB7Wp14HFb22zE5fqLOC5ERLQWidNaNI4uEcc9i7hcJldHh2NWrQ5gDdbOlpaumIuLb2atAQDPnz0b8NbWcmxVVRJ3HmxpScwwzOJmKDRGe8LlCZDLG9g7TInV1Ql7dbXbV1e3gT0WKirCFomkPyvwXFlZGJOjV6%2BSt64uudDZOU5EUcox%2FMEQDVvt6MbcN27Y3Ayzhv3spaUrB6Z9qrJSO19ezj8p2pLBkJy%2BcCHJxWI5gW5tcfRRz1dU19GfGkou9PZO4smR9jGFwpex4Dy3bvnmKypotbU13VidjqYZhrj49rvMEt%2F%2FYqLz9d00NjW%2Fczgyo9O51zs6aNlo5FDtu0DZgQFhlGXJ0dBADoNhd6uvp6Whoayg7N9LVGH8mD4b%2FHnftUQoNG4vLQ0gixMqlW%2B4qOjtNHDg3r1f6YiRSGxRy7UvqLb9U4qkqnxPONva5lDpHr1%2ByyKRNKWBZy5edMUHB2m5ry%2B%2BEQw%2Bzgf4zo9%2F0ocN3WRzLBw4J%2BJyPWCrqmIgGYtUOsWD4oxZFQoPUjGpVHqI4%2FafkQPC6fZQeeM1%2BvLuIQnjuBWQDDCscrmHP9eoNPAtBqfOnXuaK%2Bh6JEbGrs%2BpvvMmxeIbh863abVPeYySEo9FJHpNMFJY%2BP5cWZkfg7O1tSwYCeSQLTY3E8Q09%2FBVPJUlxQjshT1BscCY02r9UDUBfvCHB66pcfPA3lyAe3ngr3%2F47XDgaJzsly7xwA6NZtlUUPCuAHqaSjUIP%2Bsue8BRWAC%2FNfQ7JZPZ59s0Gj7VtpISz4hQ%2BCpfXGMKhZcvLpUKxfWM8ohvf7p%2FODjHBfcVF8Isk82g1FHykcVFE%2BUZAAX47aE%2FMl4PO50Pnuh0%2Fx4nmcyWPsdwDhBx6CmkLV%2FgFDjYKxOJOFtb0wQyIhL9RyCwK3AOfIGp1YFEBhnMJcLRWEbKdKQoU6ncTZkIEDicAy%2F81dVuEM5RwPfey4xOx0Ik%2FI2NnFki%2BWafOoFIYFcgYZCyxd7eCUjbc4AmF65ft%2FkMhk3o%2B5hc7sMJyqjJEGvYFaQFIr7Y0wPw8BFAY%2B6%2Bvmk3w6zzRuDMmZVRsfh8RtA0uETSD7uCBT6DYQN6iveU0fpkYLjE6qrVrtOxeNKU9THLZJ9kBU2JBsBhV5AivB%2FoKaQNKgPCBwDYaIfZC4adThOqF4WENViLJwVoXobfLBKVw67AOaTsLc65TaVK21vQ4La99eKcYg5vbxsbObzTQ9N7UKDgUO1wDjiDIIBshh5ztg39nQMLSZBH4OzBOUDEQXm206d3fcLgswbXQA4PhcK3nhswU1Bz8wvQ09RHG%2FoYy3ejfwBNmtoYqLA0XgAAAABJRU5ErkJggg%3D%3D&amp;label=CreatedAt\" style=\"max-width: 100%;\"></a></td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<a href=\"https://github.com/opsre/awesome-ops\">\n</a><p dir=\"auto\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/b964a36ea4078c39f603d46a29436371c7541a2f26e0228d7b21b9d9805b43d3/68747470733a2f2f736f6369616c6966792e6769742e63692f6f707372652f617765736f6d652d6f70732f696d6167653f6465736372697074696f6e3d3126666f6e743d42697474657226666f726b733d31266973737565733d31266c616e67756167653d31266c6f676f3d6874747073253341253246253246617661746172732e67697468756275736572636f6e74656e742e636f6d25324675253246313838353638303230266e616d653d31266f776e65723d31267061747465726e3d436972637569742b426f6172642670756c6c733d31267374617267617a6572733d31267468656d653d4c69676874\" alt=\"\" data-canonical-src=\"https://socialify.git.ci/opsre/awesome-ops/image?description=1&amp;font=Bitter&amp;forks=1&amp;issues=1&amp;language=1&amp;logo=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F188568020&amp;name=1&amp;owner=1&amp;pattern=Circuit+Board&amp;pulls=1&amp;stargazers=1&amp;theme=Light\" style=\"max-width: 100%;\"></a></p>\n<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\"><img src=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\" width=\"100%\" height=\"3\" data-animated-image=\"\" data-canonical-src=\"https://cdn.jsdelivr.net/gh/eryajf/tu@main/img/image_20240420_214408.gif\" style=\"max-width: 100%; height: auto; max-height: 3px;\"></a>\n</div>\n<p align=\"center\" dir=\"auto\">\n  <a href=\"https://dragonflydb.io\" rel=\"nofollow\">\n    <img src=\"/.github/images/logo-full.svg\" width=\"284\" border=\"0\" alt=\"Dragonfly\" style=\"max-width: 100%;\">\n  </a>\n</p>\n<p dir=\"auto\"><a href=\"https://github.com/dragonflydb/dragonfly/actions/workflows/ci.yml\"><img src=\"https://github.com/dragonflydb/dragonfly/actions/workflows/ci.yml/badge.svg\" alt=\"ci-tests\" style=\"max-width: 100%;\"></a> <a href=\"https://twitter.com/dragonflydbio\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/4265efe796569ea4b2157cfbf90cbeb722c8a1fdafd3222252da0db9d3124bb5/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f647261676f6e666c796462696f3f7374796c653d736f6369616c\" alt=\"Twitter URL\" data-canonical-src=\"https://img.shields.io/twitter/follow/dragonflydbio?style=social\" style=\"max-width: 100%;\"></a></p>\n<blockquote>\n<p dir=\"auto\">Before moving on, please consider giving us a GitHub star ⭐️. Thank you!</p>\n</blockquote>\n<p dir=\"auto\">Other languages:  <a href=\"README.zh-CN.md\">简体中文</a> <a href=\"README.ja-JP.md\">日本語</a> <a href=\"README.ko-KR.md\">한국어</a></p>\n<p dir=\"auto\"><a href=\"https://www.dragonflydb.io/\" rel=\"nofollow\">Website</a> • <a href=\"https://dragonflydb.io/docs\" rel=\"nofollow\">Docs</a> • <a href=\"https://www.dragonflydb.io/docs/getting-started\" rel=\"nofollow\">Quick Start</a> • <a href=\"https://discord.gg/HsPjXGVH85\" rel=\"nofollow\">Community Discord</a> • <a href=\"https://dragonfly.discourse.group/\" rel=\"nofollow\">Dragonfly Forum</a> • <a href=\"https://www.dragonflydb.io/community\" rel=\"nofollow\">Join the Dragonfly Community</a></p>\n<p dir=\"auto\"><a href=\"https://github.com/dragonflydb/dragonfly/discussions\">GitHub Discussions</a> • <a href=\"https://github.com/dragonflydb/dragonfly/issues\">GitHub Issues</a> • <a href=\"https://github.com/dragonflydb/dragonfly/blob/main/CONTRIBUTING.md\">Contributing</a> • <a href=\"https://www.dragonflydb.io/cloud\" rel=\"nofollow\">Dragonfly Cloud</a></p>\n<h2 dir=\"auto\">The world's most efficient in-memory data store</h2>\n<p dir=\"auto\">Dragonfly is an in-memory data store built for modern application workloads.</p>\n<p dir=\"auto\">Fully compatible with Redis and Memcached APIs, Dragonfly requires no code changes to adopt. Compared to legacy in-memory datastores, Dragonfly delivers 25X more throughput, higher cache hit rates with lower tail latency, and can run on up to 80% less resources for the same sized workload.</p>\n<h2 dir=\"auto\">Contents</h2>\n<ul dir=\"auto\">\n<li><a href=\"#benchmarks\">Benchmarks</a></li>\n<li><a href=\"https://github.com/dragonflydb/dragonfly/tree/main/docs/quick-start\">Quick start</a></li>\n<li><a href=\"#configuration\">Configuration</a></li>\n<li><a href=\"#roadmap-status\">Roadmap and status</a></li>\n<li><a href=\"#design-decisions\">Design decisions</a></li>\n<li><a href=\"#background\">Background</a></li>\n<li><a href=\"./docs/build-from-source.md\">Build from source</a></li>\n</ul>\n<h2 dir=\"auto\"><a name=\"user-content-benchmarks\"></a>Benchmarks</h2>\n<p dir=\"auto\">We first compare Dragonfly with Redis on <code class=\"notranslate\">m5.large</code> instance which is commonly used to run Redis<br>\ndue to its single-threaded architecture. The benchmark program runs from another<br>\nload-test instance (c5n) in the same AZ using <code class=\"notranslate\">memtier_benchmark  -c 20 --test-time 100 -t 4 -d 256 --distinct-client-seed</code></p>\n<p dir=\"auto\">Dragonfly shows a comparable performance:</p>\n<ol dir=\"auto\">\n<li>SETs (<code class=\"notranslate\">--ratio 1:0</code>):</li>\n</ol>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>Redis</th>\n<th>DF</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>QPS: 159K, P99.9: 1.16ms, P99: 0.82ms</td>\n<td>QPS:173K, P99.9: 1.26ms, P99: 0.9ms</td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<ol start=\"2\" dir=\"auto\">\n<li>GETs (<code class=\"notranslate\">--ratio 0:1</code>):</li>\n</ol>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>Redis</th>\n<th>DF</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>QPS: 194K, P99.9: 0.8ms, P99: 0.65ms</td>\n<td>QPS: 191K, P99.9: 0.95ms, P99: 0.8ms</td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<p dir=\"auto\">The benchmark above shows that the algorithmic layer inside DF that allows it to scale vertically<br>\ndoes not take a large toll when running single-threaded.</p>\n<p dir=\"auto\">However, if we take a bit stronger instance (m5.xlarge), the gap between DF and Redis starts growing.<br>\n(<code class=\"notranslate\">memtier_benchmark  -c 20 --test-time 100 -t 6 -d 256 --distinct-client-seed</code>):</p>\n<ol dir=\"auto\">\n<li>SETs (<code class=\"notranslate\">--ratio 1:0</code>):</li>\n</ol>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>Redis</th>\n<th>DF</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>QPS: 190K, P99.9: 2.45ms, P99: 0.97ms</td>\n<td>QPS: 279K , P99.9: 1.95ms, P99: 1.48ms</td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<ol start=\"2\" dir=\"auto\">\n<li>GETs (<code class=\"notranslate\">--ratio 0:1</code>):</li>\n</ol>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>Redis</th>\n<th>DF</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>QPS: 220K, P99.9: 0.98ms , P99: 0.8ms</td>\n<td>QPS: 305K, P99.9: 1.03ms, P99: 0.87ms</td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<p dir=\"auto\">Dragonfly throughput capacity continues to grow with instance size,<br>\nwhile single-threaded Redis is bottlenecked on CPU and reaches local maxima in terms of performance.</p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/44e0f750736bd2a08997b9b404841a6329805c65921bac05f64407e48356605b/687474703a2f2f7374617469632e647261676f6e666c7964622e696f2f7265706f2d6173736574732f6177732d7468726f7567687075742e737667\"><img src=\"https://camo.githubusercontent.com/44e0f750736bd2a08997b9b404841a6329805c65921bac05f64407e48356605b/687474703a2f2f7374617469632e647261676f6e666c7964622e696f2f7265706f2d6173736574732f6177732d7468726f7567687075742e737667\" width=\"80%\" border=\"0\" data-canonical-src=\"http://static.dragonflydb.io/repo-assets/aws-throughput.svg\" style=\"max-width: 100%;\"></a></p>\n<p dir=\"auto\">If we compare Dragonfly and Redis on the most network-capable instance c6gn.16xlarge,<br>\nDragonfly showed a 25X increase in throughput compared to Redis single process, crossing 3.8M QPS.</p>\n<p dir=\"auto\">Dragonfly's 99th percentile latency metrics at its peak throughput:</p>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>op</th>\n<th>r6g</th>\n<th>c6gn</th>\n<th>c7g</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>set</td>\n<td>0.8ms</td>\n<td>1ms</td>\n<td>1ms</td>\n</tr>\n<tr>\n<td>get</td>\n<td>0.9ms</td>\n<td>0.9ms</td>\n<td>0.8ms</td>\n</tr>\n<tr>\n<td>setex</td>\n<td>0.9ms</td>\n<td>1.1ms</td>\n<td>1.3ms</td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<p dir=\"auto\"><em>All benchmarks were performed using <code class=\"notranslate\">memtier_benchmark</code> (see below) with number of threads tuned per server and instance type. <code class=\"notranslate\">memtier</code> was run on a separate c6gn.16xlarge machine. We set the expiry time to 500 for the SETEX benchmark to ensure it would survive the end of the test.</em></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"  memtier_benchmark --ratio ... -t &lt;threads&gt; -c 30 -n 200000 --distinct-client-seed -d 256 \\\n     --expiry-range=...\"><pre class=\"notranslate\">  memtier_benchmark --ratio ... -t <span class=\"pl-k\">&lt;</span>threads<span class=\"pl-k\">&gt;</span> -c 30 -n 200000 --distinct-client-seed -d 256 \\\n     --expiry-range=...</pre></div>\n<p dir=\"auto\">In pipeline mode <code class=\"notranslate\">--pipeline=30</code>, Dragonfly reaches <strong>10M QPS</strong> for SET and <strong>15M QPS</strong> for GET operations.</p>\n<h3 dir=\"auto\">Dragonfly vs. Memcached</h3>\n<p dir=\"auto\">We compared Dragonfly with Memcached on a c6gn.16xlarge instance on AWS.</p>\n<p dir=\"auto\">With a comparable latency, Dragonfly throughput outperformed Memcached throughput in both write and read workloads. Dragonfly demonstrated better latency in write workloads due to contention on the <a href=\"docs/memcached_benchmark.md\">write path in Memcached</a>.</p>\n<h4 dir=\"auto\">SET benchmark</h4>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th align=\"center\">Server</th>\n<th align=\"center\">QPS(thousands qps)</th>\n<th align=\"center\">latency 99%</th>\n<th align=\"center\">99.9%</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"center\">Dragonfly</td>\n<td align=\"center\">🟩 3844</td>\n<td align=\"center\">🟩 0.9ms</td>\n<td align=\"center\">🟩 2.4ms</td>\n</tr>\n<tr>\n<td align=\"center\">Memcached</td>\n<td align=\"center\">806</td>\n<td align=\"center\">1.6ms</td>\n<td align=\"center\">3.2ms</td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<h4 dir=\"auto\">GET benchmark</h4>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>Server</th>\n<th align=\"center\">QPS(thousands qps)</th>\n<th align=\"center\">latency 99%</th>\n<th align=\"center\">99.9%</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Dragonfly</td>\n<td align=\"center\">🟩 3717</td>\n<td align=\"center\">1ms</td>\n<td align=\"center\">2.4ms</td>\n</tr>\n<tr>\n<td>Memcached</td>\n<td align=\"center\">2100</td>\n<td align=\"center\">🟩 0.34ms</td>\n<td align=\"center\">🟩 0.6ms</td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<p dir=\"auto\">Memcached exhibited lower latency for the read benchmark, but also lower throughput.</p>\n<h3 dir=\"auto\">Memory efficiency</h3>\n<p dir=\"auto\">To test memory efficiency, we filled Dragonfly and Redis with ~5GB of data using the <code class=\"notranslate\">debug populate 5000000 key 1024</code> command, sent update traffic with <code class=\"notranslate\">memtier</code>, and kicked off the snapshotting with the <code class=\"notranslate\">bgsave</code> command.</p>\n<p dir=\"auto\">This figure demonstrates how each server behaved in terms of memory efficiency.</p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/0794425fe2b89c9f67f4b2bd1f72d326166434cb9a5f22590ad9d931e2ae5f09/687474703a2f2f7374617469632e647261676f6e666c7964622e696f2f7265706f2d6173736574732f6267736176652d6d656d75736167652e737667\"><img src=\"https://camo.githubusercontent.com/0794425fe2b89c9f67f4b2bd1f72d326166434cb9a5f22590ad9d931e2ae5f09/687474703a2f2f7374617469632e647261676f6e666c7964622e696f2f7265706f2d6173736574732f6267736176652d6d656d75736167652e737667\" width=\"70%\" border=\"0\" data-canonical-src=\"http://static.dragonflydb.io/repo-assets/bgsave-memusage.svg\" style=\"max-width: 100%;\"></a></p>\n<p dir=\"auto\">Dragonfly was 30% more memory efficient than Redis in the idle state and did not show any visible increase in memory use during the snapshot phase. At peak, Redis memory use increased to almost 3X that of Dragonfly.</p>\n<p dir=\"auto\">Dragonfly finished the snapshot faster, within a few seconds.</p>\n<p dir=\"auto\">For more info about memory efficiency in Dragonfly, see our <a href=\"/docs/dashtable.md\">Dashtable doc</a>.</p>\n<h2 dir=\"auto\"><a name=\"user-content-configuration\"></a>Configuration</h2>\n<p dir=\"auto\">Dragonfly supports common Redis arguments where applicable. For example, you can run: <code class=\"notranslate\">dragonfly --requirepass=foo --bind localhost</code>.</p>\n<p dir=\"auto\">Dragonfly currently supports the following Redis-specific arguments:</p>\n<ul dir=\"auto\">\n<li><code class=\"notranslate\">port</code>: Redis connection port (<code class=\"notranslate\">default: 6379</code>).</li>\n<li><code class=\"notranslate\">bind</code>: Use <code class=\"notranslate\">localhost</code> to only allow localhost connections or a public IP address to allow connections <strong>to that IP</strong> address (i.e. from outside too). Use <code class=\"notranslate\">0.0.0.0</code> to allow all IPv4.</li>\n<li><code class=\"notranslate\">requirepass</code>: The password for AUTH authentication (<code class=\"notranslate\">default: \"\"</code>).</li>\n<li><code class=\"notranslate\">maxmemory</code>: Limit on maximum memory (in human-readable bytes) used by the database (<code class=\"notranslate\">default: 0</code>). A <code class=\"notranslate\">maxmemory</code> value of <code class=\"notranslate\">0</code> means the program will automatically determine its maximum memory usage.</li>\n<li><code class=\"notranslate\">dir</code>: Dragonfly Docker uses the <code class=\"notranslate\">/data</code> folder for snapshotting by default, the CLI uses <code class=\"notranslate\">\"\"</code>. You can use the <code class=\"notranslate\">-v</code> Docker option to map it to your host folder.</li>\n<li><code class=\"notranslate\">dbfilename</code>: The filename to save and load the database (<code class=\"notranslate\">default: dump</code>).</li>\n</ul>\n<p dir=\"auto\">There are also some Dragonfly-specific arguments:</p>\n<ul dir=\"auto\">\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">memcached_port</code>: The port to enable Memcached-compatible API on (<code class=\"notranslate\">default: disabled</code>).</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">keys_output_limit</code>: Maximum number of returned keys in <code class=\"notranslate\">keys</code> command (<code class=\"notranslate\">default: 8192</code>). Note that <code class=\"notranslate\">keys</code> is a dangerous command. We truncate its result to avoid a blowup in memory use when fetching too many keys.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">dbnum</code>: Maximum number of supported databases for <code class=\"notranslate\">select</code>.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">cache_mode</code>: See the <a href=\"#novel-cache-design\">novel cache design</a> section below.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">hz</code>: Key expiry evaluation frequency (<code class=\"notranslate\">default: 100</code>). Lower frequency uses less CPU when idle at the expense of a slower eviction rate.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">snapshot_cron</code>: Cron schedule expression for automatic backup snapshots using standard cron syntax with the granularity of minutes (<code class=\"notranslate\">default: \"\"</code>).<br>\nHere are some cron schedule expression examples below, and feel free to read more about this argument in our <a href=\"https://www.dragonflydb.io/docs/managing-dragonfly/backups#the-snapshot_cron-flag\" rel=\"nofollow\">documentation</a>.</p>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>Cron Schedule Expression</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"notranslate\">* * * * *</code></td>\n<td>At every minute</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">*/5 * * * *</code></td>\n<td>At every 5th minute</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">5 */2 * * *</code></td>\n<td>At minute 5 past every 2nd hour</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">0 0 * * *</code></td>\n<td>At 00:00 (midnight) every day</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">0 6 * * 1-5</code></td>\n<td>At 06:00 (dawn) from Monday through Friday</td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">primary_port_http_enabled</code>: Allows accessing HTTP console on main TCP port if <code class=\"notranslate\">true</code> (<code class=\"notranslate\">default: true</code>).</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">admin_port</code>: To enable admin access to the console on the assigned port (<code class=\"notranslate\">default: disabled</code>). Supports both HTTP and RESP protocols.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">admin_bind</code>: To bind the admin console TCP connection to a given address (<code class=\"notranslate\">default: any</code>). Supports both HTTP and RESP protocols.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">admin_nopass</code>: To enable open admin access to console on the assigned port, without auth token needed (<code class=\"notranslate\">default: false</code>). Supports both HTTP and RESP protocols.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">cluster_mode</code>: Cluster mode supported (<code class=\"notranslate\">default: \"\"</code>). Currently supports only <code class=\"notranslate\">emulated</code>.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">cluster_announce_ip</code>: The IP that cluster commands announce to the client.</p>\n</li>\n<li>\n<p dir=\"auto\"><code class=\"notranslate\">announce_port</code>: The port that cluster commands announce to the client, and to replication master.</p>\n</li>\n</ul>\n<h3 dir=\"auto\">Example start script with popular options:</h3>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"./dragonfly-x86_64 --logtostderr --requirepass=youshallnotpass --cache_mode=true -dbnum 1 --bind localhost --port 6379 --maxmemory=12gb --keys_output_limit=12288 --dbfilename dump.rdb\"><pre class=\"notranslate\">./dragonfly-x86_64 --logtostderr --requirepass=youshallnotpass --cache_mode=true -dbnum 1 --bind localhost --port 6379 --maxmemory=12gb --keys_output_limit=12288 --dbfilename dump.rdb</pre></div>\n<p dir=\"auto\">Arguments can be also provided via:</p>\n<ul dir=\"auto\">\n<li><code class=\"notranslate\">--flagfile &lt;filename&gt;</code>: The file should list one flag per line, with equal signs instead of spaces for key-value flags. No quotes are needed for flag values.</li>\n<li>Setting environment variables. Set <code class=\"notranslate\">DFLY_x</code>, where <code class=\"notranslate\">x</code> is the exact name of the flag, case sensitive.</li>\n</ul>\n<p dir=\"auto\">For more options like logs management or TLS support, run <code class=\"notranslate\">dragonfly --help</code>.</p>\n<h2 dir=\"auto\"><a name=\"user-content-roadmap-status\"></a>Roadmap and status</h2>\n<p dir=\"auto\">Dragonfly currently supports ~185 Redis commands and all Memcached commands besides <code class=\"notranslate\">cas</code>. Almost on par with the Redis 5 API, Dragonfly's next milestone will be to stabilize basic functionality and implement the replication API. If there is a command you need that is not implemented yet, please open an issue.</p>\n<p dir=\"auto\">For Dragonfly-native replication, we are designing a distributed log format that will support order-of-magnitude higher speeds.</p>\n<p dir=\"auto\">Following the replication feature, we will continue adding missing commands for Redis versions 3-6 APIs.</p>\n<p dir=\"auto\">Please see our <a href=\"https://dragonflydb.io/docs/category/command-reference\" rel=\"nofollow\">Command Reference</a> for the current commands supported by Dragonfly.</p>\n<h2 dir=\"auto\"><a name=\"user-content-design-decisions\"></a> Design decisions</h2>\n<h3 dir=\"auto\">Novel cache design</h3>\n<p dir=\"auto\">Dragonfly has a single, unified, adaptive caching algorithm that is simple and memory efficient.</p>\n<p dir=\"auto\">You can enable caching mode by passing the <code class=\"notranslate\">--cache_mode=true</code> flag. Once this mode is on, Dragonfly will evict items least likely to be stumbled upon in the future but only when it is near the <code class=\"notranslate\">maxmemory</code> limit.</p>\n<h3 dir=\"auto\">Expiration deadlines with relative accuracy</h3>\n<p dir=\"auto\">Expiration ranges are limited to ~8 years.</p>\n<p dir=\"auto\">Expiration deadlines with millisecond precision (PEXPIRE, PSETEX, etc.) are rounded to the closest second <strong>for deadlines greater than 2^28ms</strong>, which has less than 0.001% error and should be acceptable for large ranges. If this is not suitable for your use case, get in touch or open an issue explaining your case.</p>\n<p dir=\"auto\">For more detailed differences between Dragonfly expiration deadlines and Redis implementations, <a href=\"docs/differences.md\">see here</a>.</p>\n<h3 dir=\"auto\">Native HTTP console and Prometheus-compatible metrics</h3>\n<p dir=\"auto\">By default, Dragonfly allows HTTP access via its main TCP port (6379). That's right, you can connect to Dragonfly via Redis protocol and via HTTP protocol — the server recognizes the protocol automatically during the connection initiation. Go ahead and try it with your browser. HTTP access currently does not have much info but will include useful debugging and management info in the future.</p>\n<p dir=\"auto\">Go to the URL <code class=\"notranslate\">:6379/metrics</code> to view Prometheus-compatible metrics.</p>\n<p dir=\"auto\">The Prometheus exported metrics are compatible with the Grafana dashboard, <a href=\"tools/local/monitoring/grafana/provisioning/dashboards/dashboard.json\">see here</a>.</p>\n<p dir=\"auto\">Important! The HTTP console is meant to be accessed within a safe network. If you expose Dragonfly's TCP port externally, we advise you to disable the console with <code class=\"notranslate\">--http_admin_console=false</code> or <code class=\"notranslate\">--nohttp_admin_console</code>.</p>\n<h2 dir=\"auto\"><a name=\"user-content-background\"></a>Background</h2>\n<p dir=\"auto\">Dragonfly started as an experiment to see how an in-memory datastore could look if it was designed in 2022. Based on lessons learned from our experience as users of memory stores and engineers who worked for cloud companies, we knew that we need to preserve two key properties for Dragonfly: Atomicity guarantees for all operations and low, sub-millisecond latency over very high throughput.</p>\n<p dir=\"auto\">Our first challenge was how to fully utilize CPU, memory, and I/O resources using servers that are available today in public clouds. To solve this, we use <a href=\"https://en.wikipedia.org/wiki/Shared-nothing_architecture\" rel=\"nofollow\">shared-nothing architecture</a>, which allows us to partition the keyspace of the memory store between threads so that each thread can manage its own slice of dictionary data. We call these slices \"shards\". The library that powers thread and I/O management for shared-nothing architecture is open-sourced <a href=\"https://github.com/romange/helio\">here</a>.</p>\n<p dir=\"auto\">To provide atomicity guarantees for multi-key operations, we use the advancements from recent academic research. We chose the paper <a href=\"https://www.cs.umd.edu/~abadi/papers/vldbj-vll.pdf\" rel=\"nofollow\">\"VLL: a lock manager redesign for main memory database systems”</a> to develop the transactional framework for Dragonfly. The choice of shared-nothing architecture and VLL allowed us to compose atomic multi-key operations without using mutexes or spinlocks. This was a major milestone for our PoC and its performance stood out from other commercial and open-source solutions.</p>\n<p dir=\"auto\">Our second challenge was to engineer more efficient data structures for the new store. To achieve this goal, we based our core hashtable structure on the paper <a href=\"https://arxiv.org/pdf/2003.07302.pdf\" rel=\"nofollow\">\"Dash: Scalable Hashing on Persistent Memory\"</a>. The paper itself is centered around the persistent memory domain and is not directly related to main-memory stores, but it's still most applicable to our problem. The hashtable design suggested in the paper allowed us to maintain two special properties that are present in the Redis dictionary: The incremental hashing ability during datastore growth the ability to traverse the dictionary under changes using a stateless scan operation. In addition to these two properties, Dash is more efficient in CPU and memory use. By leveraging Dash's design, we were able to innovate further with the following features:</p>\n<ul dir=\"auto\">\n<li>Efficient record expiry for TTL records.</li>\n<li>A novel cache eviction algorithm that achieves higher hit rates than other caching strategies like LRU and LFU with <strong>zero memory overhead</strong>.</li>\n<li>A novel <strong>fork-less</strong> snapshotting algorithm.</li>\n</ul>\n<p dir=\"auto\">Once we had built the foundation for Dragonfly and <a href=\"#benchmarks\">we were happy with its performance</a>, we went on to implement the Redis and Memcached functionality. We have to date implemented ~185 Redis commands (roughly equivalent to Redis 5.0 API) and 13 Memcached commands.</p>\n<p dir=\"auto\">And finally, <br><br>\n<em>Our mission is to build a well-designed, ultra-fast, cost-efficient in-memory datastore for cloud workloads that takes advantage of the latest hardware advancements. We intend to address the pain points of current solutions while preserving their product APIs and propositions.<br>\n</em></p>","updatedAt":"2025-05-21T15:55:43Z","upvoteCount":null,"author":{"login":"eryajf","avatarUrl":"https://avatars.githubusercontent.com/u/33259379?u=e4a4090a38ac2473aaed4ef9945233636776c6c3&v=4","url":"https://github.com/eryajf"},"category":null,"labels":{"edges":[{"node":{"name":"更多","color":"25B472"}},{"node":{"name":"Database","color":"3fbc9d"}},{"node":{"name":"dragonflydb","color":"16b17d"}}]},"comments":{"edges":[]}}},"pageContext":{"number":136,"previous":{"title":"dragonflyoss/Dragonfly2:  基于 p2p 技术提供高效、稳定、安全的文件分发和图像加速，成为云原生架构的最佳实践和标准解决方案。","number":135},"next":{"title":"Byron/dua-cli: 一个可以方便地了解给定目录的磁盘空间使用情况的工具。可以选择删除多余的数据。","number":137}}},
    "staticQueryHashes": ["151096407","2861350382"]}