{"id":442916,"date":"2024-12-26T03:05:19","date_gmt":"2024-12-26T03:05:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=442916"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-12-26T03:05:19","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=442916","title":{"rendered":"<span>\u041a\u044d\u0448\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka \u0432 Tarantool: \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043a\u043e\u0434\u043e\u043c \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438<\/span>"},"content":{"rendered":"<div><!--[--><img loading=\"lazy\" decoding=\"async\" height=\"1\" src=\"https:\/\/vk.com\/rtrg?p=VK-RTRG-1288550-e6f1C\" style=\"display:none;\" width=\"1\"><img loading=\"lazy\" decoding=\"async\" height=\"1\" src=\"https:\/\/top-fwz1.mail.ru\/counter?id=3200881;js=na\" style=\"display:none;\" width=\"1\"><!--]--><\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0a3\/49f\/06a\/0a349f06a1911047d7b05cb2dc07c6e0.png\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0a3\/49f\/06a\/0a349f06a1911047d7b05cb2dc07c6e0.png\"\/><\/figure>\n<p>Apache Kafka \u2014 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u0434\u0430\u043d\u043d\u044b\u0435) \u0441\u043e \u0432\u0441\u0435\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c-\u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f\u043c. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u0433\u043e\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u043e \u0434\u0430\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Kafka \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u2014 \u0438\u043d\u043e\u0433\u0434\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u0443\u0441\u0442 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438. \u0418 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Tarantool.<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0438\u043a\u0438\u0442\u0430 \u041c\u043e\u043b\u043e\u0441\u0442\u0432\u043e\u0432. \u042f \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 VK Tech. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043b\u0430\u0434\u0438\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 Kafka \u0438 Tarantool, \u0437\u0430\u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0437 Kafka \u0432 Tarantool, \u0438 \u0434\u0430\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u043e\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e Kafka<\/h3>\n<p>Apache Kafka \u2014 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u0433\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. Kafka \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0434\u043e\u043b\u0433\u0443\u044e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0446\u0435\u043b\u0435\u0432\u044b\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c.<\/p>\n<p>Kafka \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445. \u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435:<\/p>\n<ul>\n<li>\n<p>\u0434\u043b\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u043b\u0438 \u043b\u043e\u0433\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f event-driven-\u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e\u043c\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u044f\u0434 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u0422\u0430\u043a, Kafka:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439), \u0430 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \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 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043b\u0435\u0433\u043a\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 API \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c Kafka \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0435\u0439\u0441\u0430\u0445, \u0433\u0434\u0435 \u0442\u0430\u043a\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u0430, \u043f\u043e\u0442\u043e\u043a\u0438 \u0438\u0437 Kafka \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043a\u0438 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka<\/h3>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.\u00a0<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c \u043d\u0443\u0436\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u043c, \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a Kafka \u0438 \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430, \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043a\u043e\u0440\u044f\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u044b\u0445 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a Kafka, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0435\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445 \u043a\u044d\u0448 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u044d\u0448 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0434\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041a\u044d\u0448\u0438\u0440\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438, \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043a\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u0442\u0430 \u043e\u0442 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c.<\/p>\n<ul>\n<li>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0445 \u0438\u0437 Kafka, \u0447\u0442\u043e\u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043a\u044d\u0448\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041a\u044d\u0448 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0430\u0436\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0435\u043c\u043a\u043e\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0433\u0434\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u043b\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0430\u0436\u043d\u044b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0437\u043b\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/www.tarantool.io\/ru\/\"><u>Tarantool<\/u><\/a>. \u041f\u0440\u0438\u0447\u0435\u043c, \u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Kafka, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, Tarantool \u0437\u0430\u0442\u043e\u0447\u0435\u043d \u0438 \u043f\u043e\u0434 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0438\u043c, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043a\u044d\u0448\u0430.<\/p>\n<h3>\u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u044d\u0442\u0430\u043f\u044b \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438<\/h3>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0434\u0440\u0443\u0433\u0443\u044e (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0438\u0437 Kafka \u0432 Tarantool) \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u044d\u0442\u0430\u043f\u0430\u043c.<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka<\/strong>. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0442\u043e\u043f\u0438\u043a\u043e\u0432 Kafka. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044c (consumer), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u0442\u043e\u043f\u0438\u043a\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/strong> \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0432 Tarantool. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u043b\u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Tarantool.<\/strong> \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 Tarantool. Tarantool \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0438\u0441\u043b\u0430, \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u0414\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 (space), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0440\u044f\u0434\u0443 \u0441 \u043d\u0438\u043c\u0438 \u0435\u0441\u0442\u044c \u0438 \u044d\u0442\u0430\u043f\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<ol>\n<li>\n<p><strong>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/strong>. \u0412\u0430\u0436\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u044d\u0448\u0430, \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/strong> \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Tarantool \u0431\u044b\u043b\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 Kafka.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0434\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0431\u043e\u0438 \u0432 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0441 Kafka \u0438\u043b\u0438 Tarantool, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0438\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041e\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435: \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka \u0432 Tarantool<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043e\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u0435\u0439\u0441\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka \u0432 Tarantool. \u0414\u0430\u043b\u0435\u0435 \u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445 \u0438 \u044d\u0442\u0430\u043f\u0430\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/em><\/strong><em>: \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u0435\u043d \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432\u0441\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0432 <\/em><a href=\"https:\/\/github.com\/nikosias\/go_to_tarantool\"><em><u>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/u><\/em><\/a><em> \u2014 \u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c.<\/em><\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 docker-compose-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c (ZooKeeper-server, Kafka-broker, Prometheus, Grafana, etcd).\u00a0<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0424\u0430\u0439\u043b\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0435\u0441\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">services:   zookeeper-server:     container_name: zookeeper-server     hostname: zookeeper-server     image: bitnami\/zookeeper:3.9.3-debian-12-r0     environment:       - ALLOW_ANONYMOUS_LOGIN=yes     ports:       - \"2181:2181\"       - \"2888:2888\"       - \"8080:8080\"     networks:       - cache    kafka-broker:     container_name: kafka-broker     hostname: kafka-broker     image: bitnami\/kafka:3.8.1-debian-12-r0     ports:       - \"29092:29092\"       - \"9092:9092\"     depends_on:       - zookeeper-server     environment:       - ALLOW_PLAINTEXT_LISTENER=yes       - KAFKA_ZOOKEEPER_PROTOCOL=PLAINTEXT       - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper-server:2181       - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT       - KAFKA_CFG_LISTENERS=CLIENT:\/\/:9092,EXTERNAL:\/\/:29092       - KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT:\/\/:9092,EXTERNAL:\/\/127.0.0.1:29092       - KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT      networks:       - cache    prometheus:     container_name: prometheus     hostname: prometheus     image: prom\/prometheus:v2.55.0     ports:       - \"9090:9090\"     volumes:       - .\/monitoring\/prometheus\/prometheus.yml:\/etc\/prometheus\/prometheus.yml:ro       - .\/monitoring\/prometheus\/configs:\/etc\/prometheus\/configs:ro     networks:       - cache    grafana:     container_name: grafana     hostname: grafana     image: grafana\/grafana:11.3.0-ubuntu     ports:       - \"3000:3000\"     volumes:       - .\/monitoring\/grafana\/provisioning:\/etc\/grafana\/provisioning       - .\/monitoring\/grafana\/dashboards:\/var\/lib\/grafana\/dashboards:rw     networks:       - cache  networks:   cache:     external: true<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0442\u044c \u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b:<\/p>\n<pre><code>docker network create cache docker compose up<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u043e\u043f\u0438\u043a \u0441 10 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"python\">docker exec -i kafka-broker \/opt\/bitnami\/kafka\/bin\/kafka-topics.sh --create --topic invalidation --bootstrap-server localhost:9092 --partitions 10<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043a\u0435\u0439\u0441\u0430 \u0432\u043d\u043e\u0441\u0438\u043c \u0432 Kafka 10 \u043c\u043b\u043d \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/p>\n<pre><code class=\"python\">docker exec -i kafka-broker bash -c ' \\  for i in {1..1000000}; do \\  echo $i:{\\\"id\\\":$i\\,\\\"time\\\":$EPOCHSECONDS} &gt;&gt; \/tmp\/explekafka ;\\  done; \\  for j in {1..10}; do \\  sort -R \/tmp\/explekafka | \/opt\/bitnami\/kafka\/bin\/kafka-console-  producer.sh --bootstrap-server localhost:9092 --topic invalidation\u00a0 --  property \"parse.key=true\" --property \"key.separator=:\" ; \\  done; \\  rm -rf \/tmp\/explekafka'<\/code><\/pre>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 set explorer \u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e8f\/259\/dea\/e8f259dea7bc9f536ac6daed0bb3e8ba.jpeg\" width=\"1379\" height=\"563\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e8f\/259\/dea\/e8f259dea7bc9f536ac6daed0bb3e8ba.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a66\/9b9\/bff\/a669b9bff026cc066ef5e7ec95db7ea1.jpeg\" width=\"1379\" height=\"700\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a66\/9b9\/bff\/a669b9bff026cc066ef5e7ec95db7ea1.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Tarantool \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e <\/em><a href=\"https:\/\/grafana.com\/grafana\/dashboards\/21474-tarantool-3-dashboard\/\"><em><u>\u0441\u0441\u044b\u043b\u043a\u0435<\/u><\/em><\/a><em>.<\/em><\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u043d\u0430\u0448\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"go\">cd .\/dockers\/  docker build -t tarantool.local -f .\/Dockerfile.tarantool .  docker build -t go.local -f .\/Dockerfile.go .<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/p>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u00ab\u0432 \u043b\u043e\u0431\u00bb<\/h4>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Golang \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0437 Kafka. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043d\u0435\u043c.\u00a0<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0424\u0430\u0439\u043b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u2014 example0\/main.go.<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import ( \"encoding\/json\" \"fmt\" \"log\" \"net\/http\" \"os\" \"os\/signal\" \"regexp\" \"strconv\" \"time\"  \"github.com\/confluentinc\/confluent-kafka-go\/v2\/kafka\" \"github.com\/prometheus\/client_golang\/prometheus\" \"github.com\/prometheus\/client_golang\/prometheus\/collectors\" \"github.com\/prometheus\/client_golang\/prometheus\/promhttp\" )  var ( sendBatchesTimeout = 10 * time.Millisecond readTimeout        = 5 * time.Millisecond )  type message struct { Id   int   `json:\"id\"` Time int64 `json:\"Time\"` }  type mainApp struct { requestDurations       *prometheus.SummaryVec conKafka               *kafka.Consumer startTimeRPS           int64 countMessage           int64 allCountMessage        int64 reteryCount            int tickerSendBatchTimeout *time.Ticker startAllRpsTime        int64 }  func Init() (*mainApp, error) { reg := prometheus.NewRegistry() requestDurations := prometheus.NewSummaryVec( prometheus.SummaryOpts{ Name:       \"request_durations_seconds\", Help:       \"latency distributions.\", Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, }, []string{\"service\"}, )  reg.MustRegister(requestDurations) reg.MustRegister( collectors.NewGoCollector( collectors.WithGoCollectorRuntimeMetrics( collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/idle:cpu-seconds\")}, collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/total:cpu-seconds\")}, collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/user:cpu-seconds\")}, ), ), )  http.Handle(\"\/metrics\", promhttp.HandlerFor( reg, promhttp.HandlerOpts{ \/\/ Opt into OpenMetrics to support exemplars. EnableOpenMetrics: true, }, ))  conKafka, err := kafka.NewConsumer(&amp;kafka.ConfigMap{ \"bootstrap.servers\": \"kafka-broker:9092\", \"group.id\":          \"example0\", \"auto.offset.reset\": \"earliest\", }) if err != nil { return nil, err } err = conKafka.SubscribeTopics([]string{\"invalidation\"}, nil) if err != nil { return nil, err }  return &amp;mainApp{ requestDurations:       requestDurations, conKafka:               conKafka, startTimeRPS:           time.Now().UnixNano(), countMessage:           0, allCountMessage:        0, startAllRpsTime:        0, tickerSendBatchTimeout: time.NewTicker(sendBatchesTimeout), }, nil }  func (self *mainApp) readMessage() (*kafka.Message, error) { startTimeGetMessage := time.Now().UnixNano() msg, err := self.conKafka.ReadMessage(readTimeout) self.requestDurations.WithLabelValues(\"ReadMessage\").Observe(float64(time.Now().UnixNano() - startTimeGetMessage)) return msg, err }  func (self *mainApp) parseMesage(msg *kafka.Message) ([]interface{}, error) { var data message err := json.Unmarshal(msg.Value, &amp;data) if err != nil { panic(fmt.Sprintf(\"Json parser error: %v (%v)\\n\", err, msg)) } id, err := strconv.Atoi(string(msg.Key)) if err != nil { panic(fmt.Sprintf(\"Kafka key parser error: %v (%v)\\n\", err, msg)) } if id != data.Id { panic(fmt.Sprintf(\"Kafka key != message id: %v (%v)\\n\", err, msg)) }  value := string(msg.Value) tuple := []interface{}{id, nil, value} self.countMessage++ self.allCountMessage++ return tuple, nil }  func (self *mainApp) printRPS() { stopTimeRPS := time.Now().UnixNano() if self.countMessage &gt; 0 { time := stopTimeRPS - self.startTimeRPS log.Printf(\"time: %d count: %d rps: %f\\n\", time, self.countMessage, float64(self.countMessage*1e9)\/float64(time)) self.countMessage = 0 } else { log.Printf(\"No message\") } self.startTimeRPS = stopTimeRPS }  func main() { sigchan := make(chan os.Signal, 1) signal.Notify(sigchan, os.Interrupt)  app, err := Init() if err != nil { log.Fatalf(\"Error init app: %s\\n\", err) os.Exit(1) } defer app.conKafka.Close()  go func() { log.Println(\"Start http server for metrics!\") err = http.ListenAndServe(\":7081\", nil) if err != nil { log.Fatalf(\"Error start http server: %s\", err) os.Exit(1) } }()  log.Println(\"Run read message!\") run := true tickerRPS := time.NewTicker(time.Second)  for run { select { case sig := &lt;-sigchan: log.Printf(\"Caught signal %v: terminating\\n\", sig) run = false case &lt;-tickerRPS.C: app.printRPS() default: msg, err := app.readMessage() if err != nil { if !err.(kafka.Error).IsTimeout() { log.Fatalf(\"Kafka error read message: %s\\n\", err) run = false } continue } if app.allCountMessage == 0 { \/\/ \u0418\u0433\u043d\u043e\u0440\u0438\u043c \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0448\u0435\u043d\u0438\u044f app.startAllRpsTime = time.Now().UnixNano() } _, err = app.parseMesage(msg) if err != nil { log.Fatalf(\"Error parseMesage message: %s\\n\", err) continue }  if app.allCountMessage == 1e7 { stopRpsTime := time.Now().UnixNano() fmt.Printf(\"Processed 1e7 messages time: %d count: %d rps: %f\\n\", (stopRpsTime - app.startAllRpsTime), app.allCountMessage, float64((app.allCountMessage-1)*1e9)\/float64(stopRpsTime-app.startAllRpsTime)) run = false } } }  os.Exit(0) }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"go\">cd example0  go mod init example0  go get -u github.com\/tarantool\/go-tarantool\/v2  go get github.com\/confluentinc\/confluent-kafka-go\/v2\/kafka  go get github.com\/prometheus\/client_golang  go mod tidy  go build .<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0447\u0442\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0437 Kafka \u043d\u0430\u0448\u0438\u043c GO-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c:<\/p>\n<pre><code class=\"go\">docker run -it --rm --name go001 --net cache \\  -v $PWD:\/opt\/go \\  go.local .\/example0<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/7a5\/fc2\/c04\/7a5fc2c04e34d59c8581f4db875c11e3.jpeg\" width=\"1114\" height=\"641\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7a5\/fc2\/c04\/7a5fc2c04e34d59c8581f4db875c11e3.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/0ba\/4b1\/e47\/0ba4b1e4730700ab5fe3541f569f3a7a.jpeg\" width=\"1384\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ba\/4b1\/e47\/0ba4b1e4730700ab5fe3541f569f3a7a.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 108533.100017 RPS.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u043e\u0444\u0444\u0441\u0435\u0442 \u043f\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c \u0441\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code>watch docker exec -i kafka-broker \/opt\/bitnami\/kafka\/bin\/kafka-consumer-  groups.sh --bootstrap-server localhost:9092 --group example0 --describe<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0441\u0431\u0440\u043e\u0441\u0430 \u043e\u0444\u0444\u0441\u0435\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"go\">docker exec -i kafka-broker \/opt\/bitnami\/kafka\/bin\/kafka-consumer-groups.sh  \\  --bootstrap-server localhost:9092 \\  --group example0 \\  --topic invalidation \\  --reset-offsets --to-earliest --execute<\/code><\/pre>\n<h4>\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c Kafka \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Tarantool. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Tarantool Community Edition 3.2.1 \u2014 \u043e\u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438.\u00a0<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Tarantool \u2014 \u0432 \u0444\u0430\u0439\u043b\u0435 example1\/init.lua.<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">local log = require('log') local fiber = require('fiber') local metrics = require('metrics') local http_server = require('http.server') local prometheus = require('metrics.plugins.prometheus')  local server,err = http_server.new('0.0.0.0', 6081) if err then     log.error(\"Failed to create HTTP server: %s\", err)     os.exit(1) end server:start()  metrics.enable_default_metrics()  server:route({path = '\/metrics'}, prometheus.collect_http)  box.cfg {listen = 3301}  box.once(\"bootstrap\", function()     -- Create a new space named \"test\"     box.schema.create_space('test', { if_not_exists = true })      -- Define the space format     box.space.test:format({         {name = 'id', type = 'unsigned'},         {name = 'value', type = 'string'}     })      -- Create a primary key for the space     box.space.test:create_index('primary', {         parts = {'id'}     })          log.info(\"Space 'test' created\") end)  fiber.create(function()      while true do         log.info(\"spase test count: %s\", box.space.test:count())         fiber.sleep(5)     end end)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u2014 example1\/con g.yml.<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">app:   file: 'init.lua'  credentials:   users:     replicator:       password: 'topsecret'       roles: [replication]      example_user:       password: 'example_password'       roles: [super]  iproto:   advertise:     peer:       login: replicator  replication:   failover: manual  groups:   group001:     replicasets:       replicaset001:         leader: instance001         instances:           instance001:             iproto:               listen:               - uri: 'instance001:3301'<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441:<\/p>\n<pre><code class=\"go\">docker run -it --rm --name instance001 --net cache \\  -p 3301:3301 -p 6081:6081 \\  -e TT_INSTANCE_NAME=instance001 \\  -v $PWD\/config.yml:\/opt\/tarantool\/config.yml \\  -v $PWD\/files:\/var\/lib\/tarantool\/sys_env\/default:rw \\  -v $PWD\/init.lua:\/opt\/tarantool\/init.lua \\  tarantool.local<\/code><\/pre>\n<h4>\u0423\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0438 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e<\/h4>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0437 Kafka \u2014 \u0432 \u0444\u0430\u0439\u043b\u0435 example1\/main.go.<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\">package main  import ( \"context\" \"encoding\/json\" \"fmt\" \"log\" \"net\/http\" \"os\" \"os\/signal\" \"regexp\" \"strconv\" \"time\"  \"github.com\/confluentinc\/confluent-kafka-go\/v2\/kafka\" \"github.com\/prometheus\/client_golang\/prometheus\" \"github.com\/prometheus\/client_golang\/prometheus\/collectors\" \"github.com\/prometheus\/client_golang\/prometheus\/promhttp\" \"github.com\/tarantool\/go-tarantool\/v2\" )  var ( tarantoolUser      = \"example_user\" tarantoolPassword  = \"example_password\" tarantoolUri       = \"instance001:3301\" batchSize          = 1000 sendBatchesTimeout = 10 * time.Millisecond readTimeout        = 5 * time.Millisecond )  type message struct { Id   int   `json:\"id\"` Time int64 `json:\"Time\"` }  type mainApp struct { requestDurations       *prometheus.SummaryVec conKafka               *kafka.Consumer tarantoolConnect       *tarantool.Connection startTimeRPS           int64 countMessage           int64 allCountMessage        int64 reteryCount            int tickerSendBatchTimeout *time.Ticker startAllRpsTime        int64 }  func Init(ctx context.Context) (*mainApp, error) { reg := prometheus.NewRegistry() requestDurations := prometheus.NewSummaryVec( prometheus.SummaryOpts{ Name:       \"request_durations_seconds\", Help:       \"latency distributions.\", Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, }, []string{\"service\"}, )  reg.MustRegister(requestDurations) reg.MustRegister( collectors.NewGoCollector( collectors.WithGoCollectorRuntimeMetrics( collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/idle:cpu-seconds\")}, collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/total:cpu-seconds\")}, collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/user:cpu-seconds\")}, ), ), )  http.Handle(\"\/metrics\", promhttp.HandlerFor( reg, promhttp.HandlerOpts{ \/\/ Opt into OpenMetrics to support exemplars. EnableOpenMetrics: true, }, ))  conKafka, err := kafka.NewConsumer(&amp;kafka.ConfigMap{ \"bootstrap.servers\":  \"kafka-broker:9092\", \"group.id\":           \"example1\", \"auto.offset.reset\":  \"earliest\", \"enable.auto.commit\": false, }) if err != nil { return nil, err } err = conKafka.SubscribeTopics([]string{\"invalidation\"}, nil) if err != nil { return nil, err }  dialer := tarantool.NetDialer{ Address:  tarantoolUri, User:     tarantoolUser, Password: tarantoolPassword, } opts := tarantool.Opts{}  conn, err := tarantool.Connect(ctx, dialer, opts) if err != nil || conn == nil { return nil, err } return &amp;mainApp{ requestDurations:       requestDurations, tarantoolConnect:       conn, conKafka:               conKafka, startTimeRPS:           time.Now().UnixNano(), countMessage:           0, allCountMessage:        0, startAllRpsTime:        0, tickerSendBatchTimeout: time.NewTicker(sendBatchesTimeout), }, nil }  func (self *mainApp) readMessage() (*kafka.Message, error) { startTimeGetMessage := time.Now().UnixNano() msg, err := self.conKafka.ReadMessage(readTimeout) self.requestDurations.WithLabelValues(\"ReadMessage\").Observe(float64(time.Now().UnixNano() - startTimeGetMessage)) return msg, err }  func (self *mainApp) parseMesage(msg *kafka.Message) ([]interface{}, error) { var data message err := json.Unmarshal(msg.Value, &amp;data) if err != nil { log.Fatalf(\"Json parser error: %v (%v)\\n\", err, msg) return nil, err } id, err := strconv.Atoi(string(msg.Key)) if err != nil { log.Fatalf(\"Kafka key parser error: %v (%v)\\n\", err, msg) return nil, err } if id != data.Id { log.Fatalf(\"Kafka key != message id: %v (%v)\\n\", err, msg) return nil, err }  value := string(msg.Value) tuple := []interface{}{id, value} return tuple, nil } func (self *mainApp) processed(tuple []interface{}) error { self.countMessage++ self.allCountMessage++  return self.send(tuple) } func (self *mainApp) send(tuple []interface{}) error {  startTimeGetMessage := time.Now().UnixNano() startTimeGetMessage = time.Now().UnixNano() req := tarantool.NewReplaceRequest(\"test\").Tuple(tuple) _, err := self.tarantoolConnect.Do(req).Get() self.requestDurations.WithLabelValues(\"sendMessage\").Observe(float64(time.Now().UnixNano() - startTimeGetMessage)) if err != nil { return err }  self.conKafka.Commit() self.tickerSendBatchTimeout.Reset(sendBatchesTimeout) return nil }  func (self *mainApp) printRPS() { stopTimeRPS := time.Now().UnixNano() if self.countMessage &gt; 0 { time := stopTimeRPS - self.startTimeRPS log.Printf(\"time: %d count: %d allCount: %d rps: %f\\n\", time, self.countMessage, self.allCountMessage, float64(self.countMessage*1e9)\/float64(time)) self.countMessage = 0 } else { log.Printf(\"No message\") } self.startTimeRPS = stopTimeRPS }  func main() { sigchan := make(chan os.Signal, 1) signal.Notify(sigchan, os.Interrupt)  ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() app, err := Init(ctx) if err != nil { log.Fatalf(\"Error init app: %s\\n\", err) os.Exit(1) } defer app.conKafka.Close() defer app.tarantoolConnect.Close()  go func() { log.Println(\"Start http server for metrics!\") err = http.ListenAndServe(\":7081\", nil) if err != nil { log.Fatalf(\"Error start http server: %s\", err) os.Exit(1) } }()  log.Println(\"Run read message!\") run := true tickerRPS := time.NewTicker(time.Second)  for run { select { case sig := &lt;-sigchan: log.Printf(\"Caught signal %v: terminating\\n\", sig) run = false case &lt;-tickerRPS.C: app.printRPS() default: msg, err := app.readMessage() if err != nil { if !err.(kafka.Error).IsTimeout() { log.Fatalf(\"Kafka error read message: %s\\n\", err) run = false } continue } if app.allCountMessage == 0 { \/\/ \u0418\u0433\u043d\u043e\u0440\u0438\u043c \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0448\u0435\u043d\u0438\u044f app.startAllRpsTime = time.Now().UnixNano() } tuple, err := app.parseMesage(msg) if err != nil { log.Fatalf(\"Error parseMesage message: %s\\n\", err) continue } err = app.processed(tuple) if err != nil { log.Fatalf(\"Error send to tarantool: %s\\n\", err) run = false } if app.allCountMessage == 1e5 { stopRpsTime := time.Now().UnixNano() fmt.Printf(\"Processed 1e7 messages time: %d count: %d rps: %f\\n\", (stopRpsTime - app.startAllRpsTime), app.allCountMessage, float64((app.allCountMessage-1)*1e9)\/float64(stopRpsTime-app.startAllRpsTime)) run = false } } }  os.Exit(0) }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0447\u0442\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0437 Kafka \u043d\u0430\u0448\u0438\u043c GO-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\u00a0<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0414\u0430\u043b\u0435\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e GO-\u0444\u0430\u0439\u043b\u0430 \u2014 \u043e\u043d\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b.<\/em><\/p>\n<pre><code class=\"go\">docker run -it --rm --name go001 --net cache \\  -v $PWD:\/opt\/go \\  go.local .\/example1<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/d93\/d3d\/37b\/d93d3d37becb0febdf0aa2e5c544c6d2.jpeg\" width=\"1200\" height=\"641\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d93\/d3d\/37b\/d93d3d37becb0febdf0aa2e5c544c6d2.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/168\/6df\/49f\/1686df49f9f8e3a964b2a11455695150.jpeg\" width=\"1382\" height=\"456\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/168\/6df\/49f\/1686df49f9f8e3a964b2a11455695150.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/8e7\/8d7\/9d4\/8e78d79d496ed63b6739d098b3b150cb.jpeg\" width=\"1383\" height=\"565\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e7\/8d7\/9d4\/8e78d79d496ed63b6739d098b3b150cb.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 RPS \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430, \u0440\u0430\u0432\u043d\u044b\u0439 1127.402242.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e, \u0447\u0442\u043e \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u0438 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 100 \u0440\u0430\u0437. \u0427\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c.<\/p>\n<h4>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 Tarantool \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a CPU Tarantool, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c\u0438 RPS.\u00a0<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e k6, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Tarantool. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437 <a href=\"https:\/\/github.com\/tarantool\/xk6-tarantool\"><u>GitHub<\/u><\/a>.\u00a0<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 k6 \u2014 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/em><\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0430\u0439\u043b example1\/testmaster.js:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"javascript\">import tarantool from \"k6\/x\/tarantool\"; import { check } from \"k6\";  const conn = tarantool.connect([\"localhost:3301\"],{     user: \"example_user\",     pass: \"example_password\", });  export default () =&gt; {     const id = 1 + Math.floor(Math.random() * (1e6 - 1));     const result = tarantool.call(conn, \"box.space.test:get\", [id]);     check(result, {         \"code is 0\": (r) =&gt; r.code === 0,         \"id is correct\": (r) =&gt; {             if (r.data &amp;&amp; r.data[0] &amp;&amp; r.data[0][0] === id)                  return true;             else {                 console.log(JSON.stringify({id: id, result: r}));                  return false;             }         },         \"id in value is correct\": (r) =&gt; r.data &amp;&amp; r.data[0] &amp;&amp; r.data[0][1] &amp;&amp; JSON.parse(r.data[0][1]).id === id,     }); };<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u0431\u0440\u043e\u0441\u0438\u043c \u043e\u0444\u0444\u0441\u0435\u0442 \u0432 Kafka \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u043b\u0438\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Tarantool. \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<pre><code class=\"go\">docker exec -i kafka-broker \/opt\/bitnami\/kafka\/bin\/kafka-consumer-groups.sh\\  --bootstrap-server localhost:9092 \\  --group example1 \\  --topic invalidation \\  --reset-offsets --to-earliest --execute  docker run -it --rm --name go001 --net cache \\  -v $PWD:\/opt\/go \\  go.local .\/example1  k6-linux-amd64 run --vus 100 --duration 100s testmaster.js<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/6e8\/784\/6e5\/6e87846e52cec0e198441beaf6279654.jpeg\" width=\"1250\" height=\"527\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e8\/784\/6e5\/6e87846e52cec0e198441beaf6279654.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/236\/f93\/437\/236f934371aebd52c99e234c7f1d65ea.jpeg\" width=\"1385\" height=\"699\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/236\/f93\/437\/236f934371aebd52c99e234c7f1d65ea.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a7e\/b61\/ebf\/a7eb61ebfcd49b60c9d0ddc37c773ddd.jpeg\" width=\"1385\" height=\"604\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a7e\/b61\/ebf\/a7eb61ebfcd49b60c9d0ddc37c773ddd.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/bd7\/b99\/dc9\/bd7b99dc96bb6a5442ad3ec1b8b441e5.jpeg\" width=\"1314\" height=\"787\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd7\/b99\/dc9\/bd7b99dc96bb6a5442ad3ec1b8b441e5.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/661\/67d\/21f\/66167d21f165d9b4747839b07e634f9d.jpeg\" width=\"1314\" height=\"486\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/661\/67d\/21f\/66167d21f165d9b4747839b07e634f9d.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 51139.576561 RPS \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b\u0439. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u2014 \u0443\u0436\u0435 \u043f\u043e\u0447\u0442\u0438 \u0432 3 \u0440\u0430\u0437\u0430 \u0445\u0443\u0436\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u043f\u043b\u0438\u043a\u0443 Tarantool \u0438 \u0441\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0446\u0438\u043a\u043b \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0439.<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 example1\/config_replica.yml.<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">app:   file: 'init.lua'  credentials:   users:     replicator:       password: 'topsecret'       roles: [replication]      example_user:       password: 'example_password'       roles: [super]  iproto:   advertise:     peer:       login: replicator  replication:   failover: manual  groups:   group001:     replicasets:       replicaset001:         leader: instance001         instances:           instance001:             iproto:               listen:               - uri: 'instance001:3301'           instance002:             iproto:               listen:               - uri: 'instance002:3301'<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043d\u0438\u0437\u0438\u043b\u0430\u0441\u044c \u0434\u043e 1154.198970 RPS, \u043d\u043e \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e.<\/p>\n<pre><code class=\"lua\">app:   file: 'init.lua'  credentials:   users:     replicator:       password: 'topsecret'       roles: [replication]      example_user:       password: 'example_password'       roles: [super]  iproto:   advertise:     peer:       login: replicator  replication:   failover: manual  groups:   group001:     replicasets:       replicaset001:         leader: instance001         instances:           instance001:             iproto:               listen:               - uri: 'instance001:3301'           instance002:             iproto:               listen:               - uri: 'instance002:3301'<\/code><\/pre>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0440\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435.<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/d51\/3ef\/88e\/d513ef88e4da993707818f6702c0deb9.jpeg\" width=\"1318\" height=\"541\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d51\/3ef\/88e\/d513ef88e4da993707818f6702c0deb9.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u0447\u0442\u0435\u043d\u0438\u0435 \u2014 51020.952949 RPS;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u044c \u2014 1014.127257023 RPS.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0428\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0431\u0430\u0442\u0447\u0438<\/h3>\n<p>\u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u0431\u0430\u0442\u0447\u0430\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 Tarantool \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/tarantool\/tt\"><u>\u0443\u0442\u0438\u043b\u0438\u0442\u0443 tt<\/u><\/a>.<\/p>\n<p>\u042f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430 4 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0438 4 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 (example2\/config.yml \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438):<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">credentials:   users:     replicator:       password: 'topsecret'       roles: [replication, sharding, super]     example_user:       password: 'example_password'       roles: [super]  iproto:   advertise:     peer:       login: replicator  replication:   failover: election  sharding:   bucket_count: 10000  groups:   routers:     sharding:       roles:         - router     roles:       - roles.crud-router       - router     replicasets:       route-1:         instances:           route-1-1:             iproto:               listen:               - uri: 'route-1-1:3301'           route-1-2:             iproto:               listen:               - uri: 'route-1-2:3301'       route-2:         instances:           route-2-1:             iproto:               listen:               - uri: 'route-2-1:3301'           route-2-2:             iproto:               listen:               - uri: 'route-2-2:3301'       route-3:         instances:           route-3-1:             iproto:               listen:               - uri: 'route-3-1:3301'           route-3-2:             iproto:               listen:               - uri: 'route-3-2:3301'       route-4:         instances:           route-4-1:             iproto:               listen:               - uri: 'route-4-1:3301'           route-4-2:             iproto:               listen:               - uri: 'route-4-2:3301'   storages:     sharding:       roles:         - storage     roles:       - roles.crud-storage       - storage     replicasets:       storage-1:         instances:           storage-1-1:             iproto:               listen:               - uri: 'storage-1-1:3301'           storage-1-2:             iproto:               listen:               - uri: 'storage-1-2:3301'       storage-2:         instances:           storage-2-1:             iproto:               listen:               - uri: 'storage-2-1:3301'           storage-2-2:             iproto:               listen:               - uri: 'storage-2-2:3301'<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0432 router.lua (\u0444\u0430\u0439\u043b example2\/router.lua \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438):<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">local log = require('log') local fiber = require('fiber') local metrics = require('metrics') local http_server = require('http.server') local prometheus = require('metrics.plugins.prometheus') local os = require('os') local crud = require('crud') local vshard = require('vshard')  local server,err = http_server.new('0.0.0.0', 6081) if err then     log.error(\"Failed to create HTTP server: %s\", err)     os.exit(1) end server:start()  metrics.enable_default_metrics()  server:route({path = '\/metrics'}, prometheus.collect_http)  local function apply()     while true do         local ok, err = vshard.router.bootstrap({             if_not_bootstrapped = true,         })         if ok then             break         end         log.info(('Router bootstrap error: %s'):format(err))         fiber.sleep(1)     end     crud.cfg({stats = true, stats_driver = 'metrics'})     rawset(_G, \"crud_get\", function(space, index)         return crud.get(space, index).rows     end)  end  return {     validate = function()end,     apply = apply,     stop = function()end,     depends = {'roles.crud-router'}, }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0441\u0442\u043e\u0440\u0430\u0434\u0436\u0430 \u0432 storage.lua (\u0444\u0430\u0439\u043b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 example2\/storage.lua):<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">local log = require('log') local fiber = require('fiber') local metrics = require('metrics') local http_server = require('http.server') local prometheus = require('metrics.plugins.prometheus')  local server,err = http_server.new('0.0.0.0', 6081) if err then     log.error(\"Failed to create HTTP server: %s\", err)     os.exit(1) end server:start()  metrics.enable_default_metrics()  server:route({path = '\/metrics'}, prometheus.collect_http)  local function apply()     box.once(\"bootstrap\", function()         -- Create a sharding_space         local sharding_space = box.schema.space.create('_ddl_sharding_key', {             format = {                 {name = 'space_name', type = 'string', is_nullable = false},                 {name = 'sharding_key', type = 'array', is_nullable = false},             },             if_not_exists = true,         })          -- Create a primary key for the sharding_space         sharding_space:create_index('space_name', {             type = 'TREE',             unique = true,             parts = {{'space_name', 'string', is_nullable = false}},             if_not_exists = true,         })          -- Create a new space named \"test\"         box.schema.create_space('test', { if_not_exists = true })          -- Define the space format         box.space.test:format({             {name = 'id', type = 'unsigned'},             {name = 'bucket_id', type = 'unsigned'},             {name = 'value', type = 'string'}         })          -- Create a primary key for the space         box.space.test:create_index('primary', { parts = {'id'}})         -- Create a bucket_id key for the space         box.space.test:create_index('bucket_id', { parts = {'bucket_id'}, unique = false, if_not_exists = true})          -- Add sharding key         box.space._ddl_sharding_key:replace({'test', {'id'}})          log.info(\"Space 'test' created\")     end) end  return {     validate = function()end,     apply = apply,     stop = function()end,     depends = {'roles.crud-storage'}, }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u0435\u043d docker-compose-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">services:   route-1-1:     container_name: route-1-1     hostname: route-1-1     image: tarantool.local     environment:       - TT_INSTANCE_NAME=route-1-1     ports:       -  3201:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/router.lua:\/opt\/tarantool\/router.lua     networks:       - cache    route-1-2:     container_name: route-1-2     hostname: route-1-2     image: tarantool.local     environment:       - TT_INSTANCE_NAME=route-1-2     ports:       -  3202:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/router.lua:\/opt\/tarantool\/router.lua     networks:       - cache    route-2-1:     container_name: route-2-1     hostname: route-2-1     image: tarantool.local     environment:       - TT_INSTANCE_NAME=route-2-1     ports:       -  3203:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/router.lua:\/opt\/tarantool\/router.lua     networks:       - cache    route-2-2:     container_name: route-2-2     hostname: route-2-2     image: tarantool.local     environment:       - TT_INSTANCE_NAME=route-2-2     ports:       -  3204:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/router.lua:\/opt\/tarantool\/router.lua     networks:       - cache    route-3-1:     container_name: route-3-1     hostname: route-3-1     image: tarantool.local     environment:       - TT_INSTANCE_NAME=route-3-1     ports:       -  3205:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/router.lua:\/opt\/tarantool\/router.lua     networks:       - cache    route-3-2:     container_name: route-3-2     hostname: route-3-2     image: tarantool.local     environment:       - TT_INSTANCE_NAME=route-3-2     ports:       -  3206:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/router.lua:\/opt\/tarantool\/router.lua     networks:       - cache    route-4-1:     container_name: route-4-1     hostname: route-4-1     image: tarantool.local     environment:       - TT_INSTANCE_NAME=route-4-1     ports:       -  3207:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/router.lua:\/opt\/tarantool\/router.lua     networks:       - cache    route-4-2:     container_name: route-4-2     hostname: route-4-2     image: tarantool.local     environment:       - TT_INSTANCE_NAME=route-4-2     ports:       -  3208:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/router.lua:\/opt\/tarantool\/router.lua     networks:       - cache    storage-1-1:     container_name: storage-1-1     hostname: storage-1-1     image: tarantool.local     environment:       - TT_INSTANCE_NAME=storage-1-1     ports:       -  3401:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/storage.lua:\/opt\/tarantool\/storage.lua     networks:       - cache     storage-1-2:     container_name: storage-1-2     hostname: storage-1-2     image: tarantool.local     environment:       - TT_INSTANCE_NAME=storage-1-2     ports:       -  3402:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/storage.lua:\/opt\/tarantool\/storage.lua     networks:       - cache     storage-2-1:     container_name: storage-2-1     hostname: storage-2-1     image: tarantool.local     environment:       - TT_INSTANCE_NAME=storage-2-1     ports:       -  3403:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/storage.lua:\/opt\/tarantool\/storage.lua     networks:       - cache     storage-2-2:     container_name: storage-2-2     hostname: storage-2-2     image: tarantool.local     environment:       - TT_INSTANCE_NAME=storage-2-2     ports:       -  3404:3301     volumes:       - .\/config.yml:\/opt\/tarantool\/config.yml       - .\/files:\/var\/lib\/tarantool\/sys_env\/default:rw       - .\/storage.lua:\/opt\/tarantool\/storage.lua     networks:       - cache  networks:   cache:     external: true<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>docker compose up<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0442\u0447\u0430\u043c\u0438 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 crud.replace_many \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c G\u041e-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430 (\u0444\u0430\u0439\u043b example2\/main.go \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438):<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import ( \"context\" \"encoding\/json\" \"fmt\" \"log\" \"net\/http\" \"os\" \"os\/signal\" \"regexp\" \"strconv\" \"time\"  \"github.com\/confluentinc\/confluent-kafka-go\/v2\/kafka\" \"github.com\/prometheus\/client_golang\/prometheus\" \"github.com\/prometheus\/client_golang\/prometheus\/collectors\" \"github.com\/prometheus\/client_golang\/prometheus\/promhttp\" \"github.com\/tarantool\/go-tarantool\/v2\" \"github.com\/tarantool\/go-tarantool\/v2\/crud\" \"github.com\/tarantool\/go-tarantool\/v2\/pool\" )  var ( tarantoolUser      = \"example_user\" tarantoolPassword  = \"example_password\" routerUriList      = []string{\"route-1-1:3301\", \"route-1-2:3301\"} batchSize          = 1000 sendBatchesTimeout = 10 * time.Millisecond readTimeout        = 5 * time.Millisecond )  type message struct { Id   int   `json:\"id\"` Time int64 `json:\"Time\"` }  type mainApp struct { requestDurations       *prometheus.SummaryVec conKafka               *kafka.Consumer routerPool             *pool.ConnectionPool tuples                 []crud.Tuple startTimeRPS           int64 countMessage           int64 allCountMessage        int64 reteryCount            int tickerSendBatchTimeout *time.Ticker startAllRpsTime        int64 }  func Init(ctx context.Context) (*mainApp, error) { reg := prometheus.NewRegistry() requestDurations := prometheus.NewSummaryVec( prometheus.SummaryOpts{ Name:       \"request_durations_seconds\", Help:       \"latency distributions.\", Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, }, []string{\"service\"}, )  reg.MustRegister(requestDurations) reg.MustRegister( collectors.NewGoCollector( collectors.WithGoCollectorRuntimeMetrics( collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/idle:cpu-seconds\")}, collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/total:cpu-seconds\")}, collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile(\"\/cpu\/classes\/user:cpu-seconds\")}, ), ), )  http.Handle(\"\/metrics\", promhttp.HandlerFor( reg, promhttp.HandlerOpts{ \/\/ Opt into OpenMetrics to support exemplars. EnableOpenMetrics: true, }, )) pools := []pool.Instance{} for _, uri := range routerUriList { iface := pool.Instance{ Dialer: tarantool.NetDialer{ Address:  uri, User:     tarantoolUser, Password: tarantoolPassword, }, Name: uri, }  pools = append(pools, iface) } conKafka, err := kafka.NewConsumer(&amp;kafka.ConfigMap{ \"bootstrap.servers\":  \"kafka-broker:9092\", \"group.id\":           \"example2\", \"auto.offset.reset\":  \"earliest\", \"enable.auto.commit\": false, }) if err != nil { return nil, err } err = conKafka.SubscribeTopics([]string{\"invalidation\"}, nil) if err != nil { return nil, err }  routerPool, err := pool.Connect(ctx, pools) if err != nil || routerPool == nil { return nil, err } return &amp;mainApp{ requestDurations:       requestDurations, routerPool:             routerPool, conKafka:               conKafka, startTimeRPS:           time.Now().UnixNano(), countMessage:           0, allCountMessage:        0, startAllRpsTime:        0, tickerSendBatchTimeout: time.NewTicker(sendBatchesTimeout), }, nil }  func (self *mainApp) readMessage() (*kafka.Message, error) { startTimeGetMessage := time.Now().UnixNano() msg, err := self.conKafka.ReadMessage(readTimeout) self.requestDurations.WithLabelValues(\"ReadMessage\").Observe(float64(time.Now().UnixNano() - startTimeGetMessage)) return msg, err }  func (self *mainApp) parseMesage(msg *kafka.Message) ([]interface{}, error) { var data message err := json.Unmarshal(msg.Value, &amp;data) if err != nil { log.Fatalf(\"Json parser error: %v (%v)\\n\", err, msg) return nil, err } id, err := strconv.Atoi(string(msg.Key)) if err != nil { log.Fatalf(\"Kafka key parser error: %v (%v)\\n\", err, msg) return nil, err } if id != data.Id { log.Fatalf(\"Kafka key != message id: %v (%v)\\n\", err, msg) return nil, err }  value := string(msg.Value) tuple := []interface{}{id, nil, value} return tuple, nil } func (self *mainApp) processed(tuple []interface{}) error { self.tuples = append(self.tuples, tuple) self.countMessage++ self.allCountMessage++ if len(self.tuples) &gt;= batchSize { return self.sendBatch() } return nil } func (self *mainApp) sendBatch() error { if len(self.tuples) == 0 { return nil } startTimeGetMessage := time.Now().UnixNano() req := crud.MakeReplaceManyRequest(\"test\").Tuples(self.tuples) ret := crud.Result{} err := self.routerPool.Do(req, pool.ANY).GetTyped(&amp;ret) self.requestDurations.WithLabelValues(\"sendMessage\").Observe(float64(time.Now().UnixNano() - startTimeGetMessage)) if err != nil { return err } self.tuples = []crud.Tuple{} self.conKafka.Commit() self.tickerSendBatchTimeout.Reset(sendBatchesTimeout) return nil }  func (self *mainApp) printRPS() { stopTimeRPS := time.Now().UnixNano() if self.countMessage &gt; 0 { time := stopTimeRPS - self.startTimeRPS log.Printf(\"time: %d count: %d rps: %f\\n\", time, self.countMessage, float64(self.countMessage*1e9)\/float64(time)) self.countMessage = 0 } else { log.Printf(\"No message\") } self.startTimeRPS = stopTimeRPS }  func main() { sigchan := make(chan os.Signal, 1) signal.Notify(sigchan, os.Interrupt)  ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() app, err := Init(ctx) if err != nil { log.Fatalf(\"Error init app: %s\\n\", err) os.Exit(1) } defer app.conKafka.Close() defer app.routerPool.Close()  go func() { log.Println(\"Start http server for metrics!\") err = http.ListenAndServe(\":7081\", nil) if err != nil { log.Fatalf(\"Error start http server: %s\", err) os.Exit(1) } }()  log.Println(\"Run read message!\") run := true tickerRPS := time.NewTicker(time.Second)  for run { select { case sig := &lt;-sigchan: log.Printf(\"Caught signal %v: terminating\\n\", sig) run = false case &lt;-tickerRPS.C: app.printRPS() case &lt;-app.tickerSendBatchTimeout.C: err = app.sendBatch() if err != nil { log.Fatalf(\"Error send to tarantool: %s\\n\", err) run = false } default: msg, err := app.readMessage() if err != nil { if !err.(kafka.Error).IsTimeout() { log.Fatalf(\"Kafka error read message: %s\\n\", err) run = false } continue } if app.allCountMessage == 0 { \/\/ \u0418\u0433\u043d\u043e\u0440\u0438\u043c \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0448\u0435\u043d\u0438\u044f app.startAllRpsTime = time.Now().UnixNano() } tuple, err := app.parseMesage(msg) if err != nil { log.Fatalf(\"Error parseMesage message: %s\\n\", err) continue } err = app.processed(tuple) if err != nil { log.Fatalf(\"Error send to tarantool: %s\\n\", err) run = false } if app.allCountMessage == 1e7 { app.sendBatch() stopRpsTime := time.Now().UnixNano() fmt.Printf(\"Processed 1e7 messages time: %d count: %d rps: %f\\n\", (stopRpsTime - app.startAllRpsTime), app.allCountMessage, float64((app.allCountMessage-1)*1e9)\/float64(stopRpsTime-app.startAllRpsTime)) run = false } } }  os.Exit(0) }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0433\u043e:<\/p>\n<pre><code class=\"go\">docker run -it --rm --name go001 --net cache \\  -v $PWD:\/opt\/go \\  go.local .\/example2<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/44a\/deb\/e8e\/44adebe8ee3da2aec2c204d4b38363af.jpeg\" width=\"1059\" height=\"519\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/44a\/deb\/e8e\/44adebe8ee3da2aec2c204d4b38363af.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/b0e\/12d\/e5a\/b0e12de5a408b61e3a1841a3442412d9.jpeg\" width=\"1313\" height=\"659\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b0e\/12d\/e5a\/b0e12de5a408b61e3a1841a3442412d9.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/0c1\/4c8\/849\/0c14c8849f8c55c0e3385e45d00a5b14.jpeg\" width=\"1316\" height=\"583\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0c1\/4c8\/849\/0c14c8849f8c55c0e3385e45d00a5b14.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0414\u043b\u044f \u0431\u0430\u0442\u0447\u0435\u0432\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0431\u0435\u0437 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u0439 RPS \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 24030.055023.<\/p>\n<p>\u041f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u043d\u0430 2 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0445 \u0440\u043e\u0443\u0442\u0435\u0440\u0430 \u0438 \u0432\u044b\u0437\u043e\u0432 \u043d\u0430 CRUD. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 (\u0444\u0430\u0439\u043b single\/example2\/testmaster.js \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/f75\/25d\/7be\/f7525d7be796d2a813df3f391754d99d.jpeg\" width=\"1316\" height=\"569\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f75\/25d\/7be\/f7525d7be796d2a813df3f391754d99d.jpeg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/838\/827\/a81\/838827a8152a3154bfea849d17fb7c36.jpeg\" width=\"1316\" height=\"755\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/838\/827\/a81\/838827a8152a3154bfea849d17fb7c36.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>~32 400 RPS \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>~22 000 RPS \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0435\u043b, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u044b, \u2014 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043a\u0435\u0439\u0441\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438 \u044d\u0442\u043e\u0433\u043e. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c \u044d\u0442\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.<\/p>\n<h3>\u0412\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u043e\u0432<\/h3>\n<p>\u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438\u0437 Apache Kafka \u0432 Tarantool \u2014 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0438\u0445 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0411\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0445 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0443\u0447\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u044d\u0448\u0430. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u0442 \u043e\u0442 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Tarantool \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u0430\u0432\u0434\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0442\u0430\u043a \u0438 \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<blockquote>\n<p>\u0423\u0437\u043d\u0430\u0432\u0430\u0439\u0442\u0435 \u043e \u043d\u043e\u0432\u044b\u0445 \u0440\u0435\u043b\u0438\u0437\u0430\u0445, \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0430\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u0432 <a href=\"https:\/\/t.me\/tarantool_news\">Telegram-\u043a\u0430\u043d\u0430\u043b\u0435 Tarantool News<\/a>.<\/p>\n<p>\u041e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 Tarantool \u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.tarantool.io\/blog\/ru\/\">\u0432 \u0431\u043b\u043e\u0433\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n<\/blockquote>\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\/863518\/\"> https:\/\/habr.com\/ru\/articles\/863518\/<\/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<figure class=\"full-width\"><\/figure>\n<p>Apache Kafka \u2014 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u0434\u0430\u043d\u043d\u044b\u0435) \u0441\u043e \u0432\u0441\u0435\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c-\u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f\u043c. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u0433\u043e\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u043e \u0434\u0430\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Kafka \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u2014 \u0438\u043d\u043e\u0433\u0434\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u0443\u0441\u0442 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438. \u0418 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Tarantool.<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0438\u043a\u0438\u0442\u0430 \u041c\u043e\u043b\u043e\u0441\u0442\u0432\u043e\u0432. \u042f \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 VK Tech. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043b\u0430\u0434\u0438\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 Kafka \u0438 Tarantool, \u0437\u0430\u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0437 Kafka \u0432 Tarantool, \u0438 \u0434\u0430\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u043e\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e Kafka<\/h3>\n<p>Apache Kafka \u2014 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u0433\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. Kafka \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0434\u043e\u043b\u0433\u0443\u044e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0446\u0435\u043b\u0435\u0432\u044b\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c.<\/p>\n<p>Kafka \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445. \u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435:<\/p>\n<ul>\n<li>\n<p>\u0434\u043b\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u043b\u0438 \u043b\u043e\u0433\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f event-driven-\u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e\u043c\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u044f\u0434 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u0422\u0430\u043a, Kafka:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439), \u0430 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \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 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043b\u0435\u0433\u043a\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 API \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c Kafka \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0435\u0439\u0441\u0430\u0445, \u0433\u0434\u0435 \u0442\u0430\u043a\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u0430, \u043f\u043e\u0442\u043e\u043a\u0438 \u0438\u0437 Kafka \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043a\u0438 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka<\/h3>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.\u00a0<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c \u043d\u0443\u0436\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u043c, \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a Kafka \u0438 \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430, \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043a\u043e\u0440\u044f\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u044b\u0445 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a Kafka, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0435\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445 \u043a\u044d\u0448 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u044d\u0448 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0434\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041a\u044d\u0448\u0438\u0440\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438, \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043a\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u0442\u0430 \u043e\u0442 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c.<\/p>\n<ul>\n<li>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0445 \u0438\u0437 Kafka, \u0447\u0442\u043e\u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043a\u044d\u0448\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041a\u044d\u0448 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0430\u0436\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0435\u043c\u043a\u043e\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0433\u0434\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u043b\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0430\u0436\u043d\u044b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0437\u043b\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/www.tarantool.io\/ru\/\"><u>Tarantool<\/u><\/a>. \u041f\u0440\u0438\u0447\u0435\u043c, \u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Kafka, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, Tarantool \u0437\u0430\u0442\u043e\u0447\u0435\u043d \u0438 \u043f\u043e\u0434 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0438\u043c, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043a\u044d\u0448\u0430.<\/p>\n<h3>\u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u044d\u0442\u0430\u043f\u044b \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438<\/h3>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0434\u0440\u0443\u0433\u0443\u044e (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0438\u0437 Kafka \u0432 Tarantool) \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u044d\u0442\u0430\u043f\u0430\u043c.<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka<\/strong>. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0442\u043e\u043f\u0438\u043a\u043e\u0432 Kafka. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044c (consumer), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u0442\u043e\u043f\u0438\u043a\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/strong> \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0432 Tarantool. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u043b\u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Tarantool.<\/strong> \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 Tarantool. Tarantool \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0438\u0441\u043b\u0430, \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u0414\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 (space), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0440\u044f\u0434\u0443 \u0441 \u043d\u0438\u043c\u0438 \u0435\u0441\u0442\u044c \u0438 \u044d\u0442\u0430\u043f\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<ol>\n<li>\n<p><strong>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/strong>. \u0412\u0430\u0436\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u044d\u0448\u0430, \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/strong> \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Tarantool \u0431\u044b\u043b\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 Kafka.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0434\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0431\u043e\u0438 \u0432 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0441 Kafka \u0438\u043b\u0438 Tarantool, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0438\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041e\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435: \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka \u0432 Tarantool<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043e\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u0435\u0439\u0441\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Kafka \u0432 Tarantool. \u0414\u0430\u043b\u0435\u0435 \u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445 \u0438 \u044d\u0442\u0430\u043f\u0430\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/em><\/strong><em>: \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u0435\u043d \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432\u0441\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0432 <\/em><a href=\"https:\/\/github.com\/nikosias\/go_to_tarantool\"><em><u>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/u><\/em><\/a><em> \u2014 \u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c.<\/em><\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 docker-compose-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c (ZooKeeper-server, Kafka-broker, Prometheus, Grafana, etcd).\u00a0<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0424\u0430\u0439\u043b\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0435\u0441\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">services:   zookeeper-server:     container_name: zookeeper-server     hostname: zookeeper-server     image: bitnami\/zookeeper:3.9.3-debian-12-r0     environment:       - ALLOW_ANONYMOUS_LOGIN=yes     ports:       - \"2181:2181\"       - \"2888:2888\"       - \"8080:8080\"     networks:       - cache    kafka-broker:     container_name: kafka-broker     hostname: kafka-broker     image: bitnami\/kafka:3.8.1-debian-12-r0     ports:       - \"29092:29092\"       - \"9092:9092\"     depends_on:       - zookeeper-server     environment:       - ALLOW_PLAINTEXT_LISTENER=yes       - KAFKA_ZOOKEEPER_PROTOCOL=PLAINTEXT       - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper-server:2181       - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT       - KAFKA_CFG_LISTENERS=CLIENT:\/\/:9092,EXTERNAL:\/\/:29092       - KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT:\/\/:9092,EXTERNAL:\/\/127.0.0.1:29092       - KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT      networks:       - cache    prometheus:     container_name: prometheus     hostname: prometheus     image: prom\/prometheus:v2.55.0     ports:       - \"9090:9090\"     volumes:       - .\/monitoring\/prometheus\/prometheus.yml:\/etc\/prometheus\/prometheus.yml:ro       - .\/monitoring\/prometheus\/configs:\/etc\/prometheus\/configs:ro     networks:       - cache    grafana:     container_name: grafana     hostname: grafana     image: grafana\/grafana:11.3.0-ubuntu     ports:       - \"3000:3000\"     volumes:       - .\/monitoring\/grafana\/provisioning:\/etc\/grafana\/provisioning       - .\/monitoring\/grafana\/dashboards:\/var\/lib\/grafana\/dashboards:rw     networks:       - cache  networks:   cache:     external: true<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0442\u044c \u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b:<\/p>\n<pre><code>docker network create cache docker compose up<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u043e\u043f\u0438\u043a \u0441 10 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"python\">docker exec -i kafka-broker \/opt\/bitnami\/kafka\/bin\/kafka-topics.sh --create --topic invalidation --bootstrap-server localhost:9092 --partitions 10<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043a\u0435\u0439\u0441\u0430 \u0432\u043d\u043e\u0441\u0438\u043c \u0432 Kafka 10 \u043c\u043b\u043d \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/p>\n<pre><code class=\"python\">docker exec -i kafka-broker bash -c ' \\  for i in {1..1000000}; do \\  echo $i:{\\\"id\\\":$i\\,\\\"time\\\":$EPOCHSECONDS} &gt;&gt; \/tmp\/explekafka ;\\  done; \\  for j in {1..10}; do \\  sort -R \/tmp\/explekafka | \/opt\/bitnami\/kafka\/bin\/kafka-console-  producer.sh --bootstrap-server localhost:9092 --topic invalidation\u00a0 --  property \"parse.key=true\" --property \"key.separator=:\" ; \\  done; \\  rm -rf \/tmp\/explekafka'<\/code><\/pre>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 set explorer \u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Tarantool \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e <\/em><a href=\"https:\/\/grafana.com\/grafana\/dashboards\/21474-tarantool-3-dashboard\/\"><em><u>\u0441\u0441\u044b\u043b\u043a\u0435<\/u><\/em><\/a><em>.<\/em><\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u043d\u0430\u0448\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"go\">cd .\/dockers\/  docker build -t tarantool.local -f .\/Dockerfile.tarantool .  docker build -t go.local -f .\/Dockerfile.go .<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/p>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u00ab\u0432 \u043b\u043e\u0431\u00bb<\/h4>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Golang \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0437 Kafka. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043d\u0435\u043c.\u00a0<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: <\/em><\/strong><em>\u0424\u0430\u0439\u043b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u2014 example0\/main.go.<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import ( \"encoding\/json\" \"fmt\" \"log\" \"net\/http\" \"os\" \"os\/signal\" \"regexp\" \"strconv\" \"time\"  \"github.com\/confluentinc\/confluent-kafka-go\/v2\/kafka\" \"github.com\/prometheus\/client_golang\/prometheus\" \"github.com\/prometheus\/client_golang\/prometheus\/collectors\"<\/code><\/pre>\n<\/div>\n<\/details>\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-442916","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/442916","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=442916"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/442916\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=442916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=442916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=442916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}