{"id":341719,"date":"2022-11-25T09:00:45","date_gmt":"2022-11-25T09:00:45","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=341719"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=341719","title":{"rendered":"<span>\u041d\u0430\u0448\u0430 \u043d\u043e\u0432\u0430\u044f \u0443\u0434\u0430\u0447\u043d\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0431\u0435\u0441\u0448\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u044b Redis \u043d\u0430 KeyDB<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u0443\u0436\u0435 \u043a\u0430\u043a-\u0442\u043e <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/478404\/\"><u>\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438<\/u><\/a> \u043e \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/docs.keydb.dev\/\"><u>KeyDB<\/u><\/a> \u2014 \u0444\u043e\u0440\u043a\u0435 Redis, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0432 2019 \u0433\u043e\u0434\u0443. \u041f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 BSD, \u0438 \u0443 \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u043f\u043e\u0447\u0442\u0438 6k \u0437\u0432\u0435\u0437\u0434 <a href=\"https:\/\/github.com\/Snapchat\/KeyDB\"><u>\u043d\u0430 GitHub<\/u><\/a>. \u0410\u0432\u0442\u043e\u0440\u044b \u0432 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u0438 \u043f\u043e\u0448\u043b\u0438 \u0445\u0430\u0440\u0434\u043a\u043e\u0440\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c:\u00a0\u0432\u0437\u044f\u043b\u0438 \u0432\u0441\u0451 \u0432 \u0441\u0432\u043e\u0438 \u0440\u0443\u043a\u0438 \u0438 \u043f\u0440\u0438\u0432\u043d\u0435\u0441\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u043a \u0432 \u0447\u0430\u0441\u0442\u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0437\u0430\u043c\u0435\u043d\u044b Redis \u043d\u0430 KeyDB.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/31c\/5f4\/ef8\/31c5f4ef82ff0ca7bba5519a755e418a.png\" width=\"1878\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/31c\/5f4\/ef8\/31c5f4ef82ff0ca7bba5519a755e418a.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0443 \u043d\u0430\u0441 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 Redis. \u041f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <a href=\"https:\/\/github.com\/spotahome\/redis-operator\"><u>spotahome\/redis-operator<\/u><\/a> \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Redis Failover \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <strong>master\/slave<\/strong>. \u041d\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u0442\u0430\u043b\u0438 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u0443\u043f\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0433\u0438\u0433\u0430\u0431\u0438\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043d\u0430 \u0443\u0437\u043b\u0435 \u0441 master-Redis&#8217;\u043e\u043c: \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u043f\u043b\u0438\u043a, \u0432\u0441\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b, \u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0431\u044b\u043b\u0438 \u00ab\u043d\u0430 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0435\u00bb.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u0442\u044c \u043d\u0430 Redis-\u043a\u043b\u0430\u0441\u0442\u0435\u0440: \u043a\u043b\u044e\u0447\u0438 \u0448\u0430\u0440\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 master&#8217;\u0430\u043c\u0438, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e master&#8217;\u0430 \u0435\u0441\u0442\u044c \u0440\u0435\u043f\u043b\u0438\u043a\u0438. \u042d\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u043e \u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0437\u043b\u0438\u0441\u044c \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0448\u0430\u0440\u0434\u0430\u043c, \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u043e\u0436\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0430\u0441\u044c.<\/p>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0431\u044b\u043b \u0437\u0430\u043a\u0440\u044b\u0442 \u043d\u0430\u0434\u043e\u043b\u0433\u043e (\u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u043c\u044b \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043e\u043a\u043e\u043b\u043e \u0433\u043e\u0434\u0430). \u041d\u043e \u0431\u0435\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u0430, \u043e\u0442\u043a\u0443\u0434\u0430 \u043d\u0435 \u0436\u0434\u0430\u043b\u0438.<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e Redis<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 PHP \u0432\u0434\u0440\u0443\u0433 \u0441\u0442\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u041e\u0434\u043d\u043e \u0438\u0437 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0439 \u0443\u043f\u0430\u043b\u043e \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430 Redis, \u0445\u043e\u0442\u044f, \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441 \u043d\u0438\u043c \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442, \u044d\u043c\u0443\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0443 PHP-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 Redis: <\/p>\n<pre><code class=\"php\">&lt;?php $start=microtime(true); $redis = new RedisCluster(NULL, Array('redis-cluster:6379')); $key='test'.rand(0,10000); $redis->set($key,'test_data',10); $redis->get($key); echo (microtime(true)-$start).\"\\n\";<\/code><\/pre>\n<p>\u041f\u043e\u0433\u043e\u043d\u044f\u043b\u0438 \u0442\u0435\u0441\u0442, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u2014 \u0438\u043d\u043e\u0433\u0434\u0430 Redis \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u043b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e:<\/p>\n<pre><code>0.003787 0.144506 0.007667 0.005908 0.00354 0.003886 0.006331 0.193661 0.222443 0.00558 0.0029<\/code><\/pre>\n<p>\u041f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0432\u0448\u0438\u0441\u044c \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438, \u0447\u0442\u043e master \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0448\u0430\u0440\u0434\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 100% \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430. \u0422\u0443\u0442 \u0443\u0436\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e Redis \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.\u00a0<\/p>\n<p>\u0412 \u043d\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e, \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u043e\u0435. \u041d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e \u044f\u0434\u0440\u043e \u0443 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0443 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u2014 \u0440\u0430\u043d\u0435\u0435 \u0431\u044b\u043b\u0438 \u00ab\u0436\u0435\u043b\u0435\u0437\u043d\u044b\u0435\u00bb Intel(R) Xeon(R) CPU @ 3.40GHz, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 vSphere \u0441 Intel(R) Xeon(R) Gold 6132 CPU @ 2.60GHz. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0432\u044b\u043b\u0438\u043b\u043e\u0441\u044c \u0432 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043a\u043b\u044e\u0447\u0430\u043c \u0432 Redis&#8217;\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0446\u0435\u043b\u043e\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0422\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 (\u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u043e\u0441\u0438 \u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u044f\u0434\u0440\u0430 CPU):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e49\/26e\/77b\/e4926e77b4e77e5e4deec4e10e26ff0f.png\" width=\"1600\" height=\"564\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e49\/26e\/77b\/e4926e77b4e77e5e4deec4e10e26ff0f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0410 \u0442\u0430\u043a \u2014 \u0432 \u043d\u043e\u0432\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/65d\/60f\/050\/65d60f050f4770cc9da77e0d64c8829b.png\" width=\"1600\" height=\"597\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/65d\/60f\/050\/65d60f050f4770cc9da77e0d64c8829b.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?\u00a0<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, Redis \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0440\u0435\u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0445\u043e\u0434\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e.\u00a0<\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u0430 \u0438\u0434\u0435\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 KeyDB. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0437 <code>redis<\/code> \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 Kubernetes \u043d\u0430 <code>keydb<\/code> \u2014\u00a0\u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0432\u0435\u0434\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 KeyDB \u0437\u0430\u044f\u0432\u043b\u044f\u044e\u0442, \u0447\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 Redis \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043e\u043f\u044b\u0442 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438: \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Redis&#8217;\u0430 \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u043e\u0442\u043d\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439, \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0437 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043d\u0430 \u043e\u0431\u0440\u0430\u0437 <code>eqalpha\/keydb<\/code>, \u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u2014 \u0441 <code>redis-server -c \/etc\/redis.conf<\/code> \u043d\u0430 <code>keydb-server -c \/etc\/redis.conf --server-threads 4<\/code>. \u0417\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 Pod&#8217;\u044b (\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043a\u0430\u043a \u043d\u0430\u0431\u043e\u0440 StatefulSet c <code>updateStrategy OnDelete<\/code>).<\/p>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438\u0441\u044c \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435: \u0441\u043e\u0442\u043d\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Redis&#8217;\u0430, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0430\u0441\u044c \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 KeyDB.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0438 \u0441 \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c. \u041f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u043e\u0431\u0440\u0430\u0437 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u043b\u0438, \u043f\u043e\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u044f\u0442\u0441\u044f Pod&#8217;\u044b \u0438 \u0441\u0442\u0430\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0432\u0441\u0435\u0445 \u0448\u0430\u0440\u0434\u043e\u0432 \u2014\u00a0\u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u043e \u0441\u0442\u0430\u043b\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445.\u00a0<\/p>\n<p>\u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u043e\u0432\u044b\u0435 \u00abRedis&#8217;\u044b\u00bb \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/217\/c16\/39f\/217c1639f0a71fc4c2a70f89c46b1e61.png\" width=\"1600\" height=\"568\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/217\/c16\/39f\/217c1639f0a71fc4c2a70f89c46b1e61.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0430 Redis-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Go. \u0420\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043e\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u043d\u0435\u0433\u043e \u043a\u043b\u044e\u0447 \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c (\u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0438\u043c\u0435\u043d\u0438 \u043a\u043b\u044e\u0447\u0430) \u0438 TTL 2 \u0441\u0435\u043a. \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0438\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0448\u0430\u0440\u0434\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u043c \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f. \u0425\u0440\u0430\u043d\u044f\u0442\u0441\u044f 60 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a. \u041d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0442\u0432\u0435\u0442\u0430.\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Prometheus: \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 60 \u0441\u0435\u043a., \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<pre><code># HELP redis_request_fail Counter redis key set fails # TYPE redis_request_fail counter redis_request_fail{redis=\"redis-cluster:6379\"} 0 # HELP redis_request_time_avg Gauge redis average request time for last 60 sec # TYPE redis_request_time_avg gauge redis_request_time_avg{redis=\"redis-cluster.:6379\"} 0.018229623 # HELP redis_request_time_max Gauge redis max request time for last 60 sec # TYPE redis_request_time_max gauge redis_request_time_max{redis=\"redis-cluster:6379\"} 0.039543021 # HELP redis_request_time_min Gauge redis min request time for last 60 sec # TYPE redis_request_time_min gauge redis_request_time_min{redis=\"redis-cluster:6379\"} 0.006561593<\/code><\/pre>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c0d\/efc\/ebc\/c0defcebcb052796252044bffb97fcea.png\" width=\"1600\" height=\"563\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c0d\/efc\/ebc\/c0defcebcb052796252044bffb97fcea.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u043b\u0438 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a \u043e\u0442 \u0443\u0437\u043b\u0430: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0443\u0437\u043b\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0441\u0435\u0442\u044c.<\/p>\n<blockquote>\n<p><em>\u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <\/em><a href=\"https:\/\/github.com\/flant\/examples\/tree\/master\/2022\/11-redis-keydb\"><em><u>\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438\u0438<\/u><\/em><\/a><em>. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <\/em><a href=\"https:\/\/hub.docker.com\/r\/trublast\/redis-latency\"><em><u>\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/u><\/em><\/a><em>.<\/em><\/p>\n<\/blockquote>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 Redis \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u0441\u043f\u0430\u0439\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>CONFIG SET latency-monitor-threshold 100<\/code><\/pre>\n<p>\u041d\u043e \u044d\u0442\u043e \u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Redis, \u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432 Redis<\/h2>\n<p>\u0412 Redis 6 \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0441\u0443\u0434\u044f \u043f\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u043d\u0435 \u0442\u0430\u043a \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e, \u043a\u0430\u043a \u0432 KeyDB \u0438\u043b\u0438 Thredis. \u0414\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>io-threads 4<\/code>. \u041f\u0440\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043b\u044e\u0447\u0435\u0439 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439: \u0432 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 Redis \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p>\u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Redis \u0438 KeyDB \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e <a href=\"https:\/\/docs.keydb.dev\/blog\/2020\/04\/15\/blog-post\/\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 KeyDB<\/u><\/a>. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c, KeyDB \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Redis \u043f\u043e \u043c\u0435\u0440\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u044f\u0434\u0435\u0440. \u0414\u0430\u0436\u0435 \u0441 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c Redis 6 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043e\u0442\u0441\u0442\u0430\u0435\u0442 \u043e\u0442 KeyDB \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043a \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u041c\u044b \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0438 \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0432 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 Redis \u043c\u043e\u0436\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0435\u0433\u043e \u043d\u0430 KeyDB. \u0423 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043d\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 KeyDB \u2014 \u044d\u0442\u043e \u0444\u043e\u0440\u043a Redis\u2019\u0430, \u0438 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440 \u0438 \u0430\u043b\u0435\u0440\u0442\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a \u043e\u0442 \u043d\u0435\u0433\u043e. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0445 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0442\u044c.<\/p>\n<h2>P.S.<\/h2>\n<p>\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/478404\/\">\u00ab<u>KeyDB \u043a\u0430\u043a [\u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f] \u0437\u0430\u043c\u0435\u043d\u0430 Redis<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/480722\/\">\u00ab<u>\u041e\u0434\u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c Redis \u0432 K8s \u0438 \u043c\u0438\u043d\u0438-\u043e\u0431\u0437\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u044d\u0442\u043e\u0439 \u0411\u0414<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/648175\/\">\u00ab<u>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 SRE-\u0431\u0443\u0434\u043d\u0435\u0439. \u0427\u0430\u0441\u0442\u044c 5<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/700294\/\"> https:\/\/habr.com\/ru\/company\/flant\/blog\/700294\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u0443\u0436\u0435 \u043a\u0430\u043a-\u0442\u043e <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/478404\/\"><u>\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438<\/u><\/a> \u043e \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/docs.keydb.dev\/\"><u>KeyDB<\/u><\/a> \u2014 \u0444\u043e\u0440\u043a\u0435 Redis, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0432 2019 \u0433\u043e\u0434\u0443. \u041f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 BSD, \u0438 \u0443 \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u043f\u043e\u0447\u0442\u0438 6k \u0437\u0432\u0435\u0437\u0434 <a href=\"https:\/\/github.com\/Snapchat\/KeyDB\"><u>\u043d\u0430 GitHub<\/u><\/a>. \u0410\u0432\u0442\u043e\u0440\u044b \u0432 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u0438 \u043f\u043e\u0448\u043b\u0438 \u0445\u0430\u0440\u0434\u043a\u043e\u0440\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c:\u00a0\u0432\u0437\u044f\u043b\u0438 \u0432\u0441\u0451 \u0432 \u0441\u0432\u043e\u0438 \u0440\u0443\u043a\u0438 \u0438 \u043f\u0440\u0438\u0432\u043d\u0435\u0441\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u0430\u043a \u0432 \u0447\u0430\u0441\u0442\u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0437\u0430\u043c\u0435\u043d\u044b Redis \u043d\u0430 KeyDB.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0443 \u043d\u0430\u0441 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 Redis. \u041f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <a href=\"https:\/\/github.com\/spotahome\/redis-operator\"><u>spotahome\/redis-operator<\/u><\/a> \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Redis Failover \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <strong>master\/slave<\/strong>. \u041d\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u0442\u0430\u043b\u0438 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u0443\u043f\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0433\u0438\u0433\u0430\u0431\u0438\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043d\u0430 \u0443\u0437\u043b\u0435 \u0441 master-Redis&#8217;\u043e\u043c: \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u043f\u043b\u0438\u043a, \u0432\u0441\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440-\u0443\u0437\u0435\u043b, \u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0431\u044b\u043b\u0438 \u00ab\u043d\u0430 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0435\u00bb.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u0442\u044c \u043d\u0430 Redis-\u043a\u043b\u0430\u0441\u0442\u0435\u0440: \u043a\u043b\u044e\u0447\u0438 \u0448\u0430\u0440\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 master&#8217;\u0430\u043c\u0438, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e master&#8217;\u0430 \u0435\u0441\u0442\u044c \u0440\u0435\u043f\u043b\u0438\u043a\u0438. \u042d\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u043e \u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0437\u043b\u0438\u0441\u044c \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0448\u0430\u0440\u0434\u0430\u043c, \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u043e\u0436\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0430\u0441\u044c.<\/p>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0431\u044b\u043b \u0437\u0430\u043a\u0440\u044b\u0442 \u043d\u0430\u0434\u043e\u043b\u0433\u043e (\u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u043c\u044b \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043e\u043a\u043e\u043b\u043e \u0433\u043e\u0434\u0430). \u041d\u043e \u0431\u0435\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u0430, \u043e\u0442\u043a\u0443\u0434\u0430 \u043d\u0435 \u0436\u0434\u0430\u043b\u0438.<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e Redis<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 PHP \u0432\u0434\u0440\u0443\u0433 \u0441\u0442\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u041e\u0434\u043d\u043e \u0438\u0437 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0439 \u0443\u043f\u0430\u043b\u043e \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430 Redis, \u0445\u043e\u0442\u044f, \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441 \u043d\u0438\u043c \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442, \u044d\u043c\u0443\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0443 PHP-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 Redis: <\/p>\n<pre><code class=\"php\">&lt;?php $start=microtime(true); $redis = new RedisCluster(NULL, Array('redis-cluster:6379')); $key='test'.rand(0,10000); $redis->set($key,'test_data',10); $redis->get($key); echo (microtime(true)-$start).\"\\n\";<\/code><\/pre>\n<p>\u041f\u043e\u0433\u043e\u043d\u044f\u043b\u0438 \u0442\u0435\u0441\u0442, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u2014 \u0438\u043d\u043e\u0433\u0434\u0430 Redis \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u043b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e:<\/p>\n<pre><code>0.003787 0.144506 0.007667 0.005908 0.00354 0.003886 0.006331 0.193661 0.222443 0.00558 0.0029<\/code><\/pre>\n<p>\u041f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0432\u0448\u0438\u0441\u044c \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438, \u0447\u0442\u043e master \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0448\u0430\u0440\u0434\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 100% \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430. \u0422\u0443\u0442 \u0443\u0436\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e Redis \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.\u00a0<\/p>\n<p>\u0412 \u043d\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e, \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u043e\u0435. \u041d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e \u044f\u0434\u0440\u043e \u0443 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0443 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u2014 \u0440\u0430\u043d\u0435\u0435 \u0431\u044b\u043b\u0438 \u00ab\u0436\u0435\u043b\u0435\u0437\u043d\u044b\u0435\u00bb Intel(R) Xeon(R) CPU @ 3.40GHz, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 vSphere \u0441 Intel(R) Xeon(R) Gold 6132 CPU @ 2.60GHz. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0432\u044b\u043b\u0438\u043b\u043e\u0441\u044c \u0432 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043a\u043b\u044e\u0447\u0430\u043c \u0432 Redis&#8217;\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0446\u0435\u043b\u043e\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0422\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 (\u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u043e\u0441\u0438 \u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u044f\u0434\u0440\u0430 CPU):<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0410 \u0442\u0430\u043a \u2014 \u0432 \u043d\u043e\u0432\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?\u00a0<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, Redis \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0440\u0435\u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0445\u043e\u0434\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e.\u00a0<\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u0430 \u0438\u0434\u0435\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 KeyDB. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0437 <code>redis<\/code> \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 Kubernetes \u043d\u0430 <code>keydb<\/code> \u2014\u00a0\u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0432\u0435\u0434\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 KeyDB \u0437\u0430\u044f\u0432\u043b\u044f\u044e\u0442, \u0447\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 Redis \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043e\u043f\u044b\u0442 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438: \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Redis&#8217;\u0430 \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u043e\u0442\u043d\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439, \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0437 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043d\u0430 \u043e\u0431\u0440\u0430\u0437 <code>eqalpha\/keydb<\/code>, \u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u2014 \u0441 <code>redis-server -c \/etc\/redis.conf<\/code> \u043d\u0430 <code>keydb-server -c \/etc\/redis.conf --server-threads 4<\/code>. \u0417\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 Pod&#8217;\u044b (\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043a\u0430\u043a \u043d\u0430\u0431\u043e\u0440 StatefulSet c <code>updateStrategy OnDelete<\/code>).<\/p>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438\u0441\u044c \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435: \u0441\u043e\u0442\u043d\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Redis&#8217;\u0430, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0430\u0441\u044c \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 KeyDB.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0438 \u0441 \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c. \u041f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u043e\u0431\u0440\u0430\u0437 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u043b\u0438, \u043f\u043e\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u044f\u0442\u0441\u044f Pod&#8217;\u044b \u0438 \u0441\u0442\u0430\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0432\u0441\u0435\u0445 \u0448\u0430\u0440\u0434\u043e\u0432 \u2014\u00a0\u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u043e \u0441\u0442\u0430\u043b\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445.\u00a0<\/p>\n<p>\u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u043e\u0432\u044b\u0435 \u00abRedis&#8217;\u044b\u00bb \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0430 Redis-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Go. \u0420\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043e\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u043d\u0435\u0433\u043e \u043a\u043b\u044e\u0447 \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c (\u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0438\u043c\u0435\u043d\u0438 \u043a\u043b\u044e\u0447\u0430) \u0438 TTL 2 \u0441\u0435\u043a. \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0438\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0448\u0430\u0440\u0434\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u043c \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f. \u0425\u0440\u0430\u043d\u044f\u0442\u0441\u044f 60 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a. \u041d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0442\u0432\u0435\u0442\u0430.\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Prometheus: \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 60 \u0441\u0435\u043a., \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<pre><code># HELP redis_request_fail Counter redis key set fails # TYPE redis_request_fail counter redis_request_fail{redis=\"redis-cluster:6379\"} 0 # HELP redis_request_time_avg Gauge redis average request time for last 60 sec # TYPE redis_request_time_avg gauge redis_request_time_avg{redis=\"redis-cluster.:6379\"} 0.018229623 # HELP redis_request_time_max Gauge redis max request time for last 60 sec # TYPE redis_request_time_max gauge redis_request_time_max{redis=\"redis-cluster:6379\"} 0.039543021 # HELP redis_request_time_min Gauge redis min request time for last 60 sec # TYPE redis_request_time_min gauge redis_request_time_min{redis=\"redis-cluster:6379\"} 0.006561593<\/code><\/pre>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u043b\u0438 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a \u043e\u0442 \u0443\u0437\u043b\u0430: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0443\u0437\u043b\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0441\u0435\u0442\u044c.<\/p>\n<blockquote>\n<p><em>\u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <\/em><a href=\"https:\/\/github.com\/flant\/examples\/tree\/master\/2022\/11-redis-keydb\"><em><u>\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438\u0438<\/u><\/em><\/a><em>. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <\/em><a href=\"https:\/\/hub.docker.com\/r\/trublast\/redis-latency\"><em><u>\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/u><\/em><\/a><em>.<\/em><\/p>\n<\/blockquote>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 Redis \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e \u0441\u043f\u0430\u0439\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>CONFIG SET latency-monitor-threshold 100<\/code><\/pre>\n<p>\u041d\u043e \u044d\u0442\u043e \u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Redis, \u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432 Redis<\/h2>\n<p>\u0412 Redis 6 \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0441\u0443\u0434\u044f \u043f\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u043d\u0435 \u0442\u0430\u043a \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e, \u043a\u0430\u043a \u0432 KeyDB \u0438\u043b\u0438 Thredis. \u0414\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>io-threads 4<\/code>. \u041f\u0440\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043b\u044e\u0447\u0435\u0439 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439: \u0432 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 Redis \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p>\u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Redis \u0438 KeyDB \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e <a href=\"https:\/\/docs.keydb.dev\/blog\/2020\/04\/15\/blog-post\/\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 KeyDB<\/u><\/a>. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c, KeyDB \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Redis \u043f\u043e \u043c\u0435\u0440\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u044f\u0434\u0435\u0440. \u0414\u0430\u0436\u0435 \u0441 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c Redis 6 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043e\u0442\u0441\u0442\u0430\u0435\u0442 \u043e\u0442 KeyDB \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043a \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u041c\u044b \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0438 \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0432 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 Redis \u043c\u043e\u0436\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0435\u0433\u043e \u043d\u0430 KeyDB. \u0423 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043d\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 KeyDB \u2014 \u044d\u0442\u043e \u0444\u043e\u0440\u043a Redis\u2019\u0430, \u0438 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440 \u0438 \u0430\u043b\u0435\u0440\u0442\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a \u043e\u0442 \u043d\u0435\u0433\u043e. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0445 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0442\u044c.<\/p>\n<h2>P.S.<\/h2>\n<p>\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/478404\/\">\u00ab<u>KeyDB \u043a\u0430\u043a [\u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f] \u0437\u0430\u043c\u0435\u043d\u0430 Redis<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/480722\/\">\u00ab<u>\u041e\u0434\u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c Redis \u0432 K8s \u0438 \u043c\u0438\u043d\u0438-\u043e\u0431\u0437\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u044d\u0442\u043e\u0439 \u0411\u0414<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/648175\/\">\u00ab<u>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 SRE-\u0431\u0443\u0434\u043d\u0435\u0439. \u0427\u0430\u0441\u0442\u044c 5<\/u>\u00bb<\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/700294\/\"> https:\/\/habr.com\/ru\/company\/flant\/blog\/700294\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-341719","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=341719"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341719\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=341719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=341719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=341719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}