{"id":460162,"date":"2025-05-19T15:00:41","date_gmt":"2025-05-19T15:00:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=460162"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=460162","title":{"rendered":"<span>\u041c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 ScyllaDB<\/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>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435!<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440 \u0410\u043d\u0434\u0440\u0435\u0435\u0432, \u044f \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0441\u0432\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 &#171;\u0425\u0430\u0431\u0440\u0435&#187; \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0431 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 NoSQL \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 ScyllaDB.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 ScyllaDB<\/h3>\n<p>ScyllaDB \u2014 \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f NoSQL \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 Apache Cassandra \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0430\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0438 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Cassandra, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Java, ScyllaDB \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 C++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <a href=\"https:\/\/github.com\/scylladb\/seastar\" rel=\"noopener noreferrer nofollow\">Seastar<\/a>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u043e\u044f\u0434\u0435\u0440\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u0443\u0441\u043e\u0440\u0430.<\/p>\n<p>ScyllaDB \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0451\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438, IoT \u0438\u043b\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 ScyllaDB:<\/p>\n<ul>\n<li>\n<p>\u0414\u043e 10x \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Cassandra<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e 5x \u043d\u0438\u0436\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0430 99-\u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 Cassandra (CQL, \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b)<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 ScyllaDB \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u0430? \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u0443\u0437\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2013 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438, \u0447\u0442\u043e \u0441\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u043d\u0435\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 ScyllaDB.<\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a ScyllaDB \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0438\u0437\u043a\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438. \u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u0430\u043c, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a \u0433\u043e\u0440\u044f\u0447\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 (hot spots) \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 ScyllaDB \u0438 \u0435\u0451 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h3>\n<h4>Shard-Per-Core: \u043a\u043b\u044e\u0447 \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u041e\u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 ScyllaDB \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 &#171;shard-per-core&#187;, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u044f\u0434\u0440\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0440\u0434\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p><code>\u042f\u0434\u0440\u043e CPU 1 \u2500\u2500\u25ba \u0428\u0430\u0440\u0434 1 \u2500\u2500\u25ba \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<br \/> \u042f\u0434\u0440\u043e CPU 2 \u2500\u2500\u25ba \u0428\u0430\u0440\u0434 2 \u2500\u2500\u25ba \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<br \/> ...<br \/> \u042f\u0434\u0440\u043e CPU N \u2500\u2500\u25ba \u0428\u0430\u0440\u0434 N \u2500\u2500\u25ba \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<\/code><\/p>\n<p>\u042d\u0442\u043e &#171;shared-nothing&#187; \u043f\u043e\u0434\u0445\u043e\u0434, \u0433\u0434\u0435 \u044f\u0434\u0440\u0430 \u043d\u0435 \u0434\u0435\u043b\u044f\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u043c\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0446\u0438\u044e \u0437\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u044d\u0448\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Cassandra, \u0433\u0434\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Java \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u0437\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b CPU, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 ScyllaDB \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u0445.<\/p>\n<h4>Tablets vs. vNodes: \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 ScyllaDB \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0443\u0437\u043b\u0430\u043c \u0432 \u0432\u0438\u0434\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u044c\u0446\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b (vNodes). \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 6.0, ScyllaDB \u0432\u043d\u0435\u0434\u0440\u0438\u043b\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e &#171;Tablets&#187; \u2014 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0437\u043b\u0430\u043c:<\/p>\n<p><strong>vNodes (\u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434):<\/strong><\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 256 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e vNodes \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u043e\u0439 \u043a \u0443\u0437\u043b\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p><strong>Tablets (\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434):<\/strong><\/p>\n<ul>\n<li>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u043e\u0435 \u0434\u0440\u043e\u0431\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0441\u0431\u043e\u044f\u0445<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\"># \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python from cassandra.cluster import Cluster  cluster = Cluster(['scylla-node-1', 'scylla-node-2']) session = cluster.connect()  # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0436\u0438\u043c\u0430 Tablets result = session.execute(\"SELECT tablets_enabled FROM system.local\") print(f\"Tablets enabled: {result.one().tablets_enabled}\")<\/code><\/pre>\n<p><strong>\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: <\/p>\n<p>ScyllaDB \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 memtable \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, commitlog \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0433\u043e\u0432\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 SSTables \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<h4>\u041f\u0443\u0442\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438: \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439<\/h4>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0432 ScyllaDB \u043e\u0431\u0445\u043e\u0434\u0438\u0442 \u043a\u044d\u0448 Linux, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u044d\u0448 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0442\u0440\u043e\u043a, \u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 memtable \u0438 commitlog, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>ScyllaDB \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a \u043f\u0443\u0442\u0438 \u0447\u0442\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u043f\u0443\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438:<\/p>\n<p><strong>\u041f\u0443\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 commitlog \u0434\u043b\u044f \u0434\u043e\u043b\u0433\u043e\u0432\u0435\u0447\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 memtable \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0431\u0440\u043e\u0441 memtable \u0432 SSTable \u043d\u0430 \u0434\u0438\u0441\u043a<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u043d\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f SSTables \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u041f\u0443\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0432 memtable (\u0432 \u043f\u0430\u043c\u044f\u0442\u0438)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 row cache (\u043a\u044d\u0448 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0442\u0440\u043e\u043a)<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0438\u0437 SSTables \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c Bloom \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u0447\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h3>\u041b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<h4>\u0412\u044b\u0431\u043e\u0440 \u043a\u043b\u044e\u0447\u0435\u0439 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439: \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u041a\u043b\u044e\u0447 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 \u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 ScyllaDB, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443.<\/p>\n<p><strong>\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u21161: \u0412\u044b\u0441\u043e\u043a\u0430\u044f \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong><\/p>\n<p>\u041a\u043b\u044e\u0447\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u0442\u043e\u0447\u0435\u043a. <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a user_id \u0438\u043b\u0438 sensor_id, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0447\u0435\u043c \u043d\u0438\u0437\u043a\u043e\u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a state \u0438\u043b\u0438 event_type. \u041f\u043b\u043e\u0445\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043a\u043b\u044e\u0447\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043d\u0430 \u0443\u0437\u043b\u044b.<\/p>\n<pre><code class=\"sql\">-- \u041d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e: \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c) CREATE TABLE user_events (     event_type TEXT,  -- \u0412\u0441\u0435\u0433\u043e ~10 \u0442\u0438\u043f\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439     event_time TIMESTAMP,     user_id UUID,     data TEXT,     PRIMARY KEY (event_type, event_time, user_id) );  -- \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e: \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0430 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 CREATE TABLE user_events (     user_id UUID,     event_type TEXT,     event_time TIMESTAMP,     data TEXT,     PRIMARY KEY (user_id, event_time, event_type) );<\/code><\/pre>\n<p><strong>\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u21162: \u0420\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/strong><\/p>\n<p>\u041a\u043b\u044e\u0447\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0418\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0432\u0441\u0435\u043c \u0443\u0437\u043b\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>\u0411\u043e\u0440\u044c\u0431\u0430 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c\u0438: \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438  (&gt;100MB \u0438\u043b\u0438 &gt;100,000 \u0441\u0442\u0440\u043e\u043a) \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430\u043c. \u0414\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0442\u0443 \u043a \u043a\u043b\u044e\u0447\u0443 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438. <\/p>\n<p>\u0411\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0437\u0434\u0435\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043f\u043e \u0434\u0430\u0442\u0430\u043c, \u0447\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439): <\/p>\n<pre><code class=\"sql\">-- \u0411\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e \u0434\u043d\u044f\u043c CREATE TABLE sensor_readings (     sensor_id TEXT,     date TEXT,  -- YYYY-MM-DD \u0444\u043e\u0440\u043c\u0430\u0442     timestamp TIMESTAMP,     temperature FLOAT,     humidity FLOAT,     pressure FLOAT,     PRIMARY KEY ((sensor_id, date), timestamp) );<\/code><\/pre>\n<p> \u0422\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u043d\u044c: <\/p>\n<pre><code class=\"sql\">SELECT * FROM sensor_readings  WHERE sensor_id = 'temp_sensor_1' AND date = '2025-05-01'  AND timestamp &gt; '2025-05-01 08:00:00' AND timestamp &lt; '2025-05-01 09:00:00';<\/code><\/pre>\n<p> \u0411\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: <\/p>\n<pre><code class=\"sql\">-- \u0411\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u043e 100 CREATE TABLE user_messages (     user_id UUID,     bucket_id INT,  -- \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a message_id \/ 100     message_id UUID,     content TEXT,     created_at TIMESTAMP,     PRIMARY KEY ((user_id, bucket_id), message_id) );<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 Python:<\/p>\n<pre><code class=\"python\"># Python-\u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c def insert_message(session, user_id, message_id, content):     # \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c bucket_id \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0445\u0435\u0448\u0430 message_id     bucket_id = abs(hash(str(message_id))) % 1000          query = \"\"\"     INSERT INTO user_messages      (user_id, bucket_id, message_id, content, created_at)      VALUES (%s, %s, %s, %s, toTimestamp(now()))     \"\"\"     session.execute(query, (user_id, bucket_id, message_id, content))<\/code><\/pre>\n<h4>\u0423\u043c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432<\/h4>\n<p><strong>\u0417\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/strong><\/p>\n<p>\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 (\u0441\u043f\u0438\u0441\u043a\u0438, \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430, \u0441\u043b\u043e\u0432\u0430\u0440\u0438) \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0451\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b \u0437\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u044b\u0435 (FROZEN) \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b (overhead) \u043d\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<pre><code class=\"sql\">-- \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 FROZEN \u0434\u043b\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 CREATE TABLE products (     product_id UUID,     name TEXT,     attributes FROZEN&lt;MAP&lt;TEXT, TEXT&gt;&gt;,  -- FROZEN \u0432\u0430\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438     PRIMARY KEY (product_id) );  CREATE TABLE sensor_data (     sensor_id uuid,     record_time timestamp,     events FROZEN&lt;map&lt;text, text&gt;&gt;,     PRIMARY KEY (sensor_id, record_time) );<\/code><\/pre>\n<p> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445: <\/p>\n<pre><code class=\"sql\">-- \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430\u043c\u0438 CREATE TABLE post_stats (     post_id UUID,     views COUNTER,     likes COUNTER,     comments COUNTER,     PRIMARY KEY (post_id) );<\/code><\/pre>\n<pre><code class=\"python\"># \u0418\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432 def increment_view(session, post_id):     query = \"UPDATE post_stats SET views = views + 1 WHERE post_id = %s\"     # \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 ONE \u0434\u043b\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443     session.execute(query, [post_id], consistency_level=ConsistencyLevel.ONE)<\/code><\/pre>\n<h4>\u041f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c PPRL<\/h4>\n<p>\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u0438 \u0447\u0430\u0441\u0442\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043a\u043b\u044e\u0447\u0430\u043c. \u0414\u043b\u044f \u0438\u0445 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043a\u0438) \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0439\u0442\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 (Per-Partition Rate Limit).<\/p>\n<p>ScyllaDB Enterprise \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 (Per-Partition Rate Limiting, PPRL), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439:<\/p>\n<pre><code class=\"sql\">-- \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432 1000 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043d\u0430 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044e ALTER TABLE users WITH per_partition_rate_limit = {'max_read_size' : 1000, 'max_write_size' : 500};<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442:<\/p>\n<ul>\n<li>\n<p>DDoS-\u0430\u0442\u0430\u043a \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u0441\u043f\u043b\u0435\u0441\u043a\u043e\u0432 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/p>\n<\/li>\n<\/ul>\n<h3>\u0422\u0435\u0445\u043d\u0438\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h3>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b: \u043e\u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438:<\/p>\n<ol>\n<li>\n<p>\u041a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 ScyllaDB<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0449\u0438\u0449\u0430\u044e\u0442 \u043e\u0442 SQL-\u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0439<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"sql\">session.prepare(\"SELECT * FROM users WHERE user_id=?\")<\/code><\/pre>\n<pre><code class=\"python\"># \u041d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 def get_user_bad(session, user_id):     query = f\"SELECT * FROM users WHERE user_id = {user_id}\"     return session.execute(query)  # \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c def get_user_good(session, user_id):     # \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a\u044d\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438     prepared = session.prepare(\"SELECT * FROM users WHERE user_id = ?\")     return session.execute(prepared, [user_id])<\/code><\/pre>\n<h4>\u041f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432: \u0437\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438<\/h4>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 fetch_size, \u0447\u0442\u043e\u0431\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0451\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"sql\">SimpleStatement(query, fetch_size=10)<\/code><\/pre>\n<pre><code class=\"python\"># \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 def process_all_users(session):     query = \"SELECT user_id, name, email FROM users\"     statement = SimpleStatement(query, fetch_size=100)          result = session.execute(statement)     page_num = 1          for row in result:         # \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446         process_user(row)                  # \u0414\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 - \u0432\u044b\u0432\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b         if result.current_rows_index == 0 and result.has_more_pages:             print(f\"Processing page {page_num}\")             page_num += 1<\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (<code>fetch_size<\/code>):<\/p>\n<ul>\n<li>\n<p>\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u043c\u0435\u0436\u0434\u0443 100 \u0438 1000 \u0441\u0442\u0440\u043e\u043a<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0412\u044b\u0431\u043e\u0440 \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">from cassandra import ConsistencyLevel  # \u0417\u0430\u043f\u0440\u043e\u0441 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e (\u043d\u0438\u0437\u043a\u0430\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c) def quick_read(session, key):     query = \"SELECT * FROM cache WHERE key = %s\"     return session.execute(query, [key], consistency_level=ConsistencyLevel.ONE)  # \u0417\u0430\u043f\u0440\u043e\u0441 \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c\u044e (\u0441\u0440\u0435\u0434\u043d\u044f\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c) def consistent_read(session, user_id):     query = \"SELECT * FROM users WHERE user_id = %s\"     return session.execute(query, [user_id], consistency_level=ConsistencyLevel.QUORUM)  # \u0417\u0430\u043f\u0438\u0441\u044c \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u043b\u0433\u043e\u0432\u0435\u0447\u043d\u043e\u0441\u0442\u044c\u044e (\u043d\u0438\u0437\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c) def critical_write(session, transaction_id, data):     query = \"INSERT INTO transactions (id, data) VALUES (%s, %s)\"     return session.execute(query, [transaction_id, data],                            consistency_level=ConsistencyLevel.ALL)<\/code><\/pre>\n<p>\u041e\u0431\u0449\u0438\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u0443 \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p><code>ONE<\/code>: \u0414\u043b\u044f \u043d\u0435\u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u043b\u0438 \u043a\u044d\u0448-\u0434\u0430\u043d\u043d\u044b\u0445 (\u0441\u0430\u043c\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c)<\/p>\n<\/li>\n<li>\n<p><code>QUORUM<\/code>: \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 (\u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441)<\/p>\n<\/li>\n<li>\n<p><code>LOCAL_QUORUM<\/code>: \u0414\u043b\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u0446\u0435\u043d\u0442\u0440\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p><code>ALL<\/code>: \u0422\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 (\u0441\u0430\u043c\u0430\u044f \u043d\u0438\u0437\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c)<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a QUORUM, \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u044c\u044e. \u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 ALL, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438, \u0438 ONE, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong>: \u0414\u043b\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 = 3 QUORUM \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0434\u0432\u0443\u0445 \u0443\u0437\u043b\u043e\u0432, \u0447\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0432.<\/p>\n<h4>\u0418\u0437\u0431\u0435\u0433\u0430\u043d\u0438\u0435 \u0441\u043c\u0435\u0440\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432<\/h4>\n<p><strong>1. ALLOW FILTERING<\/strong><\/p>\n<p>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f ALLOW FILTERING \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0447\u0442\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043e\u043f\u0438\u0440\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438<\/p>\n<pre><code class=\"sql\">-- \u041d\u0418\u041a\u041e\u0413\u0414\u0410 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435: SELECT * FROM users WHERE age &gt; 21 ALLOW FILTERING;<\/code><\/pre>\n<p> \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u043b\u0438 \u0438\u043d\u0434\u0435\u043a\u0441: <\/p>\n<pre><code class=\"sql\">-- \u0412\u0442\u043e\u0440\u0438\u0447\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0443 CREATE TABLE users_by_age (     age INT,     user_id UUID,     name TEXT,     email TEXT,     PRIMARY KEY (age, user_id) );<\/code><\/pre>\n<p> 2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 IN \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 <\/p>\n<pre><code class=\"sql\">-- \u041e\u0447\u0435\u043d\u044c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 SELECT * FROM users  WHERE user_id IN (uuid1, uuid2, ..., uuid100)  AND date IN ('2025-05-01', '2025-05-02', ..., '2025-05-10');<\/code><\/pre>\n<p> \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b: <\/p>\n<pre><code class=\"python\"># \u0411\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 - \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 batch = BatchStatement(consistency_level=ConsistencyLevel.QUORUM) for user_id in user_ids:     stmt = session.prepare(\"SELECT * FROM users WHERE user_id = ?\")     batch.add(stmt, [user_id]) results = session.execute(batch)<\/code><\/pre>\n<p><strong>3. \u0427\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439<\/strong><\/p>\n<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e:<\/p>\n<pre><code class=\"sql\">-- \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e CREATE MATERIALIZED VIEW users_by_email AS SELECT * FROM users WHERE email IS NOT NULL AND user_id IS NOT NULL PRIMARY KEY (email, user_id);<\/code><\/pre>\n<p><strong>4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 BYPASS CACHE<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0434\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u044e\u0442 \u043e\u0442 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 BYPASS CACHE, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0434\u0438\u0441\u043a\u0443:<\/p>\n<pre><code class=\"sql\">SELECT * FROM users BYPASS CACHE;<\/code><\/pre>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h3>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 ScyllaDB Monitoring Stack<\/h4>\n<p>\u0414\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 ScyllaDB Monitoring Stack, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 Prometheus \u0438 Grafana \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u043c\u0438 (CQL Optimization Dashboard). \u042d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0432\u044b\u044f\u0432\u043b\u044f\u044f \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043d\u0435\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 ALLOW FILTERING.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\"># docker-compose.yml \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f ScyllaDB Monitoring Stack version: '3' services:   prometheus:     image: prom\/prometheus:v2.45.0     volumes:       - .\/prometheus\/:\/etc\/prometheus\/     command:       - '--config.file=\/etc\/prometheus\/prometheus.yml'     ports:       - '9090:9090'        grafana:     image: grafana\/grafana:10.0.3     volumes:       - .\/grafana\/provisioning\/:\/etc\/grafana\/provisioning\/     environment:       - GF_SECURITY_ADMIN_PASSWORD=scylla     ports:       - '3000:3000'     depends_on:       - prometheus<\/code><\/pre>\n<p>\u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>Per-Server Metrics Dashboard<\/p>\n<\/li>\n<li>\n<p>Scylla Detailed Dashboard<\/p>\n<\/li>\n<\/ul>\n<h4>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430:<\/p>\n<ol>\n<li>\n<p><strong>Latency (\u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439):<\/strong> <\/p>\n<ul>\n<li>\n<p><code>scylla_storage_proxy_coordinator_write_latency_99p<\/code> &#8212; p99 (99-\u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u044c) \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0437\u0430\u043f\u0438\u0441\u0438<\/p>\n<\/li>\n<li>\n<p><code>scylla_storage_proxy_coordinator_read_latency_99p<\/code> &#8212; p99 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0447\u0442\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Throughput (\u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c):<\/strong> <\/p>\n<ul>\n<li>\n<p><code>scylla_cql_reads<\/code> &#8212; CQL \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><code>scylla_cql_writes<\/code> &#8212; CQL \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Resource Utilization (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432):<\/strong> <\/p>\n<ul>\n<li>\n<p><code>scylla_reactor_utilization<\/code> &#8212; \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u044f\u0434\u0435\u0440 CPU<\/p>\n<\/li>\n<li>\n<p><code>node_filesystem_avail_bytes<\/code> &#8212; \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0434\u0438\u0441\u043a\u0435<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Cache Performance (\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u044d\u0448\u0430):<\/strong> <\/p>\n<ul>\n<li>\n<p><code>scylla_cache_row_hits<\/code> &#8212; \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0432 row cache<\/p>\n<\/li>\n<li>\n<p><code>scylla_cache_row_misses<\/code> &#8212; \u043f\u0440\u043e\u043c\u0430\u0445\u0438 row cache<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h4>\n<p>ScyllaDB \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<pre><code class=\"sql\">-- \u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u0430\u043c\u044b\u0445 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 SELECT * FROM system_traces.sessions  WHERE duration &gt; 5000000  ALLOW FILTERING;  -- \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 SELECT * FROM system_traces.events  WHERE session_id = uuid('trace-id-from-previous-query');<\/code><\/pre>\n<p> \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435: <\/p>\n<pre><code class=\"python\"># \u0422\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Python from cassandra.query import SimpleStatement  def trace_slow_query(session, query, params=None):     statement = SimpleStatement(query, trace=True)     result = session.execute(statement, params)     trace = result.get_query_trace(max_wait=10.0)          print(f\"\u0422\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u043e\u0431\u0449\u0430\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430: {trace.duration\/1000.0} \u043c\u0441):\")     for event in trace.events:         print(f\"{event.elapsed\/1000.0} \u043c\u0441: {event.description}\")<\/code><\/pre>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h3>\n<h4>\u0412\u044b\u0431\u043e\u0440 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p>ScyllaDB \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043b\u0443\u0447\u0448\u0435 \u0434\u0440\u0443\u0433\u0438\u0445:<\/p>\n<p><strong>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>CPU:<\/strong> \u041c\u0438\u043d\u0438\u043c\u0443\u043c 8 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0434\u0435\u0440, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e Intel Xeon \u0438\u043b\u0438 AMD EPYC<\/p>\n<\/li>\n<li>\n<p><strong>RAM:<\/strong> 64GB+ (\u043c\u0438\u043d\u0438\u043c\u0443\u043c 16GB \u043d\u0430 \u043e\u0434\u0438\u043d \u0443\u0437\u0435\u043b)<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0438\u0441\u043a:<\/strong> NVMe SSD \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 IOPS (&gt;100000) \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0441 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u043c \u0432\u0432\u043e\u0434\u043e\u043c-\u0432\u044b\u0432\u043e\u0434\u043e\u043c<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0435\u0442\u044c:<\/strong> 10+ Gbps \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412 AWS:<\/strong><\/p>\n<ul>\n<li>\n<p>i4i.2xlarge \u0438\u043b\u0438 i4i.4xlarge \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>i4i.8xlarge \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0441 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0412 GCP:<\/strong><\/p>\n<ul>\n<li>\n<p>n2-standard-8 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 SSD \u0434\u043b\u044f \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>c3-standard-8 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 SSD \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e-\u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a<\/p>\n<\/li>\n<\/ul>\n<h4>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e scylla_setup<\/h4>\n<p>ScyllaDB \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 <code>scylla_setup<\/code> \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"bash\"># \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b sudo \/opt\/scylladb\/scripts\/scylla_setup --nic eth0 --setup-nic  # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 sudo \/opt\/scylladb\/scripts\/scylla_config_check<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0434\u0440\u0430 Linux (sysctl)<\/p>\n<\/li>\n<li>\n<p>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0437\u0430\u0434\u0430\u0447 CPU<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b I\/O \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u043f\u043e \u044f\u0434\u0440\u0430\u043c CPU<\/p>\n<\/li>\n<\/ul>\n<h4>\u0422\u043e\u043d\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 ScyllaDB<\/h4>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 <code>\/etc\/scylla\/scylla.yaml<\/code>:<\/p>\n<pre><code class=\"yaml\"># \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u043f\u0440\u0435\u043e\u0431\u043b\u0430\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0447\u0442\u0435\u043d\u0438\u044f row_cache_size_in_mb: 4096    # \u0423\u0432\u0435\u043b\u0438\u0447\u044c\u0442\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0441 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u043c \u0447\u0442\u0435\u043d\u0438\u0435\u043c commitlog_segment_size_in_mb: 64  # \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u043f\u0440\u0435\u043e\u0431\u043b\u0430\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 compaction_throughput_mb_per_sec: 256  # \u0423\u0432\u0435\u043b\u0438\u0447\u044c\u0442\u0435 \u0434\u043b\u044f \u043c\u043e\u0449\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 concurrent_writes: 128                  # 16 * \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440 CPU  # \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 compaction_strategy: LeveledCompactionStrategy sstable_size_in_mb: 160<\/code><\/pre>\n<h4>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e cassandra-stress<\/h4>\n<p>\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"bash\"># \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 cassandra-stress write n=10000000 -rate threads=50 -node scylla-node1,scylla-node2  # \u0422\u0435\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0413\u0430\u0443\u0441\u0441\u0430 cassandra-stress read n=1000000 cl=QUORUM -pop dist=gaussian\\(1..10000000,5000000,1000000\\) -node scylla-node1,scylla-node2  # \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441\u043e \u0441\u043c\u0435\u0448\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 cassandra-stress mixed ratio\\(write=1,read=3\\) n=1000000 cl=QUORUM -pop dist=uniform\\(1..10000000\\) -schema keyspace=keyspace1 -mode native cql3 -rate threads=100 -node scylla-node1,scylla-node2<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c YAML, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u0430\u0448\u0443 \u0441\u0445\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<h3>\u0423\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439<\/h4>\n<p>\u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0433\u043e\u0440\u044f\u0447\u0435\u0439 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0438\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043e \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430\u0445 \u0432 \u043b\u043e\u0433\u0430\u0445<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\"># \u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 from cassandra.cluster import Cluster from cassandra.query import named_tuple_factory import time  cluster = Cluster(['node1', 'node2', 'node3']) session = cluster.connect() session.row_factory = named_tuple_factory  def find_hot_partitions(keyspace, table, min_requests=1000):     query = \"\"\"     SELECT token_range, count, mean,             99p, max, total_latency, table_name     FROM system_traces.scylla_node_rates     WHERE keyspace_name = %s AND table_name = %s     \"\"\"     results = session.execute(query, [keyspace, table])          for row in results:         if row.count &gt; min_requests:             print(f\"\u041f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0433\u043e\u0440\u044f\u0447\u0430\u044f \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f: {row.token_range}\")             print(f\"\u0417\u0430\u043f\u0440\u043e\u0441\u043e\u0432: {row.count}, \u0421\u0440\u0435\u0434\u043d\u044f\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430: {row.mean} \u043c\u0441\")             print(f\"p99 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430: {row.99p} \u043c\u0441, \u041c\u0430\u043a\u0441. \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430: {row.max} \u043c\u0441\")             print(\"---\")  # \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f find_hot_partitions('mykeyspace', 'mytable', 5000)<\/code><\/pre>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0442\u043e\u043c\u0431\u0441\u0442\u043e\u0443\u043d\u043e\u0432<\/h4>\n<p>\u0422\u043e\u043c\u0431\u0441\u0442\u043e\u0443\u043d\u044b (\u043c\u0430\u0440\u043a\u0435\u0440\u044b \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445) \u043c\u043e\u0433\u0443\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"sql\">-- \u041f\u043e\u0438\u0441\u043a \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0442\u043e\u043c\u0431\u0441\u0442\u043e\u0443\u043d\u043e\u0432 SELECT keyspace_name, table_name,        tombstone_scanned,         tombstone_scanned_ratio FROM system.tombstone_histogram WHERE tombstone_scanned &gt; 1000 ALLOW FILTERING;<\/code><\/pre>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ol>\n<li>\n<p>\u0423\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 TTL \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f (<code>nodetool compact<\/code>)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 &#171;\u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f&#187; \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<\/ol>\n<h4>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/h4>\n<p>\u041a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u2014 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0435\u043c\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"bash\"># \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 nodetool compactionstats  # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (\u0432 \u043d\u0435\u043f\u0438\u043a\u043e\u0432\u044b\u0435 \u0447\u0430\u0441\u044b) nodetool setcompactionthroughput 500  # \u0417\u0430\u043f\u0443\u0441\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f nodetool compact mykeyspace mytable<\/code><\/pre>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\u043c \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><code>SizeTieredCompactionStrategy<\/code>: \u0414\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u043f\u0440\u0435\u043e\u0431\u043b\u0430\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/p>\n<\/li>\n<li>\n<p><code>LeveledCompactionStrategy<\/code>: \u0414\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u043f\u0440\u0435\u043e\u0431\u043b\u0430\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0447\u0442\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><code>TimeWindowCompactionStrategy<\/code>: \u0414\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u0441 \u043e\u043a\u043d\u0430\u043c\u0438 TTL<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 ScyllaDB \u2014 \u044d\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0433\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b:<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445:<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043a\u043b\u044e\u0447\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/strong> <\/p>\n<ul>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 ScyllaDB Monitoring Stack<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0438\u043b\u044f\u0445<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u044f\u0432\u043b\u044f\u0439\u0442\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f:<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 NVMe \u0434\u0438\u0441\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u044c\u0442\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e RAM (\u043c\u0438\u043d\u0438\u043c\u0443\u043c 16GB \u043d\u0430 \u0443\u0437\u0435\u043b)<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <code>scylla_setup<\/code> \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u044d\u0442\u0438\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b ScyllaDB \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u0445.<\/p>\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\/articles\/910656\/\"> https:\/\/habr.com\/ru\/articles\/910656\/<\/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>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435!<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440 \u0410\u043d\u0434\u0440\u0435\u0435\u0432, \u044f \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0441\u0432\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 &#171;\u0425\u0430\u0431\u0440\u0435&#187; \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0431 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 NoSQL \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 ScyllaDB.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 ScyllaDB<\/h3>\n<p>ScyllaDB \u2014 \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f NoSQL \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 Apache Cassandra \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0430\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0438 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Cassandra, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Java, ScyllaDB \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 C++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <a href=\"https:\/\/github.com\/scylladb\/seastar\" rel=\"noopener noreferrer nofollow\">Seastar<\/a>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u043e\u044f\u0434\u0435\u0440\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u0443\u0441\u043e\u0440\u0430.<\/p>\n<p>ScyllaDB \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0451\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438, IoT \u0438\u043b\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 ScyllaDB:<\/p>\n<ul>\n<li>\n<p>\u0414\u043e 10x \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Cassandra<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e 5x \u043d\u0438\u0436\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0430 99-\u043f\u0435\u0440\u0446\u0435\u043d\u0442\u0438\u043b\u0435<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 Cassandra (CQL, \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b)<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 ScyllaDB \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u0430? \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u0443\u0437\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2013 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438, \u0447\u0442\u043e \u0441\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u043d\u0435\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 ScyllaDB.<\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a ScyllaDB \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0438\u0437\u043a\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438. \u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u0430\u043c, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a \u0433\u043e\u0440\u044f\u0447\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 (hot spots) \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 ScyllaDB \u0438 \u0435\u0451 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h3>\n<h4>Shard-Per-Core: \u043a\u043b\u044e\u0447 \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u041e\u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 ScyllaDB \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 &#171;shard-per-core&#187;, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u044f\u0434\u0440\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0440\u0434\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p><code>\u042f\u0434\u0440\u043e CPU 1 \u2500\u2500\u25ba \u0428\u0430\u0440\u0434 1 \u2500\u2500\u25ba \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<br \/> \u042f\u0434\u0440\u043e CPU 2 \u2500\u2500\u25ba \u0428\u0430\u0440\u0434 2 \u2500\u2500\u25ba \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<br \/> ...<br \/> \u042f\u0434\u0440\u043e CPU N \u2500\u2500\u25ba \u0428\u0430\u0440\u0434 N \u2500\u2500\u25ba \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<\/code><\/p>\n<p>\u042d\u0442\u043e &#171;shared-nothing&#187; \u043f\u043e\u0434\u0445\u043e\u0434, \u0433\u0434\u0435 \u044f\u0434\u0440\u0430 \u043d\u0435 \u0434\u0435\u043b\u044f\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u043c\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0446\u0438\u044e \u0437\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u044d\u0448\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Cassandra, \u0433\u0434\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Java \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u0437\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b CPU, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 ScyllaDB \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u0445.<\/p>\n<h4>Tablets vs. vNodes: \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 ScyllaDB \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0443\u0437\u043b\u0430\u043c \u0432 \u0432\u0438\u0434\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u044c\u0446\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b (vNodes). \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 6.0, ScyllaDB \u0432\u043d\u0435\u0434\u0440\u0438\u043b\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e &#171;Tablets&#187; \u2014 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0437\u043b\u0430\u043c:<\/p>\n<p><strong>vNodes (\u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434):<\/strong><\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 256 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e vNodes \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u043e\u0439 \u043a \u0443\u0437\u043b\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p><strong>Tablets (\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434):<\/strong><\/p>\n<ul>\n<li>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u043e\u0435 \u0434\u0440\u043e\u0431\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0441\u0431\u043e\u044f\u0445<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\"># \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python from cassandra.cluster import Cluster  cluster = Cluster(['scylla-node-1', 'scylla-node-2']) session = cluster.connect()  # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0436\u0438\u043c\u0430 Tablets result = session.execute(\"SELECT tablets_enabled FROM system.local\") print(f\"Tablets enabled: {result.one().tablets_enabled}\")<\/code><\/pre>\n<p><strong>\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: <\/p>\n<p>ScyllaDB \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 memtable \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, commitlog \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0433\u043e\u0432\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 SSTables \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<h4>\u041f\u0443\u0442\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438: \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439<\/h4>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0432 ScyllaDB \u043e\u0431\u0445\u043e\u0434\u0438\u0442 \u043a\u044d\u0448 Linux, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u044d\u0448 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0442\u0440\u043e\u043a, \u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 memtable \u0438 commitlog, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>ScyllaDB \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a \u043f\u0443\u0442\u0438 \u0447\u0442\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u043f\u0443\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438:<\/p>\n<p><strong>\u041f\u0443\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 commitlog \u0434\u043b\u044f \u0434\u043e\u043b\u0433\u043e\u0432\u0435\u0447\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 memtable \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0431\u0440\u043e\u0441 memtable \u0432 SSTable \u043d\u0430 \u0434\u0438\u0441\u043a<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u043d\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f SSTables \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u041f\u0443\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0432 memtable (\u0432 \u043f\u0430\u043c\u044f\u0442\u0438)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 row cache (\u043a\u044d\u0448 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0442\u0440\u043e\u043a)<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0438\u0437 SSTables \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c Bloom \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430, \u0447\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h3>\u041b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<h4>\u0412\u044b\u0431\u043e\u0440 \u043a\u043b\u044e\u0447\u0435\u0439 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439: \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u041a\u043b\u044e\u0447 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 \u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 ScyllaDB, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443.<\/p>\n<p><strong>\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u21161: \u0412\u044b\u0441\u043e\u043a\u0430\u044f \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong><\/p>\n<p>\u041a\u043b\u044e\u0447\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u0442\u043e\u0447\u0435\u043a. <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a user_id \u0438\u043b\u0438 sensor_id, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0447\u0435\u043c \u043d\u0438\u0437\u043a\u043e\u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a state \u0438\u043b\u0438 event_type. \u041f\u043b\u043e\u0445\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043a\u043b\u044e\u0447\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043d\u0430 \u0443\u0437\u043b\u044b.<\/p>\n<pre><code class=\"sql\">-- \u041d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e: \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c) CREATE TABLE user_events (     event_type TEXT,  -- \u0412\u0441\u0435\u0433\u043e ~10 \u0442\u0438\u043f\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439     event_time TIMESTAMP,     user_id UUID,     data TEXT,     PRIMARY KEY (event_type, event_time, user_id) );  -- \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e: \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0430 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 CREATE TABLE user_events (     user_id UUID,     event_type TEXT,     event_time TIMESTAMP,     data TEXT,     PRIMARY KEY (user_id, event_time, event_type) );<\/code><\/pre>\n<p><strong>\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u21162: \u0420\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/strong><\/p>\n<p>\u041a\u043b\u044e\u0447\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0418\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0432\u0441\u0435\u043c \u0443\u0437\u043b\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>\u0411\u043e\u0440\u044c\u0431\u0430 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c\u0438: \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438  (&gt;100MB \u0438\u043b\u0438 &gt;100,000 \u0441\u0442\u0440\u043e\u043a) \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430\u043c. \u0414\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0442\u0443 \u043a \u043a\u043b\u044e\u0447\u0443 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438. <\/p>\n<p>\u0411\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0437\u0434\u0435\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043f\u043e \u0434\u0430\u0442\u0430\u043c, \u0447\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439): <\/p>\n<pre><code class=\"sql\">-- \u0411\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e \u0434\u043d\u044f\u043c CREATE TABLE sensor_readings (     sensor_id TEXT,     date TEXT,  -- YYYY-MM-DD \u0444\u043e\u0440\u043c\u0430\u0442     timestamp TIMESTAMP,     temperature FLOAT,     humidity FLOAT,     pressure FLOAT,     PRIMARY KEY ((sensor_id, date), timestamp) );<\/code><\/pre>\n<p> \u0422\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u043d\u044c: <\/p>\n<pre><code class=\"sql\">SELECT * FROM sensor_readings  WHERE sensor_id = 'temp_sensor_1' AND date = '2025-05-01'  AND timestamp &gt; '2025-05-01 08:00:00' AND timestamp &lt; '2025-05-01 09:00:00';<\/code><\/pre>\n<p> \u0411\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: <\/p>\n<pre><code class=\"sql\">-- \u0411\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u043e 100 CREATE TABLE user_messages (     user_id UUID,     bucket_id INT,  -- \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a message_id \/ 100     message_id UUID,     content TEXT,     created_at TIMESTAMP,     PRIMARY KEY ((user_id, bucket_id), message_id) );<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 Python:<\/p>\n<pre><code class=\"python\"># Python-\u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c def insert_message(session, user_id, message_id, content):     # \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c bucket_id \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0445\u0435\u0448\u0430 message_id     bucket_id = abs(hash(str(message_id))) % 1000          query = \"\"\"     INSERT INTO user_messages      (user_id, bucket_id, message_id, content, created_at)      VALUES (%s, %s, %s, %s, toTimestamp(now()))     \"\"\"     session.execute(query, (user_id, bucket_id, message_id, content))<\/code><\/pre>\n<h4>\u0423\u043c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432<\/h4>\n<p><strong>\u0417\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/strong><\/p>\n<p>\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 (\u0441\u043f\u0438\u0441\u043a\u0438, \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430, \u0441\u043b\u043e\u0432\u0430\u0440\u0438) \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0451\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b \u0437\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u044b\u0435 (FROZEN) \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b (overhead) \u043d\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<pre><code class=\"sql\">-- \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 FROZEN \u0434\u043b\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 CREATE TABLE products (     product_id UUID,     name TEXT,     attributes FROZEN&lt;MAP&lt;TEXT, TEXT&gt;&gt;,  -- FROZEN \u0432\u0430\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438     PRIMARY KEY (product_id) );  CREATE TABLE sensor_data (     sensor_id uuid,     record_time timestamp,     events FROZEN&lt;map&lt;text, text&gt;&gt;,     PRIMARY KEY (sensor_id, record_time) );<\/code><\/pre>\n<p> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445: <\/p>\n<pre><code class=\"sql\">-- \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430\u043c\u0438 CREATE TABLE post_stats (     post_id UUID,     views COUNTER,     likes COUNTER,     comments COUNTER,     PRIMARY KEY (post_id) );<\/code><\/pre>\n<pre><code class=\"python\"># \u0418\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432 def increment_view(session, post_id):     query = \"UPDATE post_stats SET views = views + 1 WHERE post_id = %s\"     # \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 ONE \u0434\u043b\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443     session.execute(query, [post_id], consistency_level=ConsistencyLevel.ONE)<\/code><\/pre>\n<h4>\u041f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c PPRL<\/h4>\n<p>\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u0438 \u0447\u0430\u0441\u0442\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043a\u043b\u044e\u0447\u0430\u043c. \u0414\u043b\u044f \u0438\u0445 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043a\u0438) \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0439\u0442\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 (Per-Partition Rate Limit).<\/p>\n<p>ScyllaDB Enterprise \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 (Per-Partition Rate Limiting, PPRL), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439:<\/p>\n<pre><code class=\"sql\">-- \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432 1000 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043d\u0430 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044e ALTER TABLE users WITH per_partition_rate_limit = {'max_read_size' : 1000, 'max_write_size' : 500};<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442:<\/p>\n<ul>\n<li>\n<p>DDoS-\u0430\u0442\u0430\u043a \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u0441\u043f\u043b\u0435\u0441\u043a\u043e\u0432 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 <\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-460162","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/460162","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=460162"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/460162\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=460162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=460162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=460162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}