{"id":327462,"date":"2022-01-10T08:54:10","date_gmt":"2022-01-10T08:54:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=327462"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=327462","title":{"rendered":"<span>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Tarantool<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\" class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/d5\/ag\/pe\/d5agpet0omi33be77jgf4stl5_m.png\"\/><\/p>\n<p>  \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b Tarantool \u043f\u0440\u0438\u043e\u0431\u0440\u0451\u043b \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#076184\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Tarantool?<\/font><\/h2>\n<p>  Tarantool \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u043e\u0431\u044a\u0451\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u0438 \u0441\u043e\u0447\u0435\u0442\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043e\u0442 \u043d\u0438\u0445, \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0442\u0438\u043f\u0430 \u00ab\u0432\u0435\u0434\u0443\u0449\u0438\u0439-\u0432\u0435\u0434\u0443\u0449\u0438\u0439\u00bb.<\/p>\n<p>  \u0412\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c Tarantool \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0440\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c. \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c HTTP-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 Tarantool \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043d\u0451\u043c: \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0435\u0451 \u0434\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 (\u043a\u0430\u043a \u0432 MapReduce).<\/p>\n<p>  \u042f \u0447\u0438\u0442\u0430\u043b, \u043a\u0430\u043a \u0440\u0435\u0431\u044f\u0442\u0430 \u0438\u0437 Mail.ru \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 20 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0442\u044b\u0441\u044f\u0447 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0445\u043e\u0442\u044f \u043a\u043e\u0434\u0430 \u0432 \u043d\u0435\u0439 \u0432\u0441\u0435\u0433\u043e 300 \u0441\u0442\u0440\u043e\u043a. \u0417\u0434\u0435\u0441\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c \u0433\u0434\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f\u043c \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0438 \u0440\u0435\u0447\u044c \u043d\u0435 \u0438\u0434\u0451\u0442 \u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440, \u043a\u0430\u043a \u0432 PostgreSQL.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0445\u043e\u0436\u0438\u0439, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<h2><font color=\"#076184\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/font><\/h2>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0442\u0440\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u0436\u0451\u0441\u0442\u043a\u0438\u043c \u0434\u0438\u0441\u043a\u043e\u043c \u043d\u0430 20 \u0413\u0411 \u0438 \u041e\u0421 Ubuntu 18.04: \u043f\u043e \u0434\u0432\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0438 \u043f\u043e 4 \u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Tarantool, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435 Bash \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>apt-get install Tarantool<\/code>. \u0412\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442: (<code>curl -L &lt;https:\/\/tarantool.io\/installer.sh> | VER=2.4 sudo -E bash<\/code>). \u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442:<\/p>\n<p>  <code>tarantoolctl<\/code> \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 Tarantool;<br \/>  <code>\/etc\/tarantool<\/code> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438;<br \/>  <code>\/var\/log\/tarantool<\/code> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432;<br \/>  <code>\/var\/lib\/tarantool<\/code>\u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438.<\/p>\n<p>  \u0415\u0449\u0451 \u0435\u0441\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <code>instances.available<\/code> \u0438\u043b\u0438 <code>instances.enabled<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432. \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Lua \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440, \u043a\u0430\u043a\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 vinyl, \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 PostgreSQL. \u0421\u043a\u0430\u0436\u0435\u043c, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043f\u0438\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0443\u0448\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b. \u0417\u043d\u0430\u0447\u0438\u0442, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e, \u0438 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443.<\/p>\n<h2><font color=\"#076184\">\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438<\/font><\/h2>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 Tarantool \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>tarantoolctl<\/code>. \u0415\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0451 \u0432 \u0432\u0438\u0434\u0435 <code>tarantoolctl check example<\/code>, \u043e\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430.<\/p>\n<p>  \u0421\u0442\u0430\u0442\u0443\u0441 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 <code>tarantoolctl status example<\/code>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>start<\/code>, <code>stop<\/code> \u0438 <code>restart<\/code>.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0430\u043a\u0442\u0438\u0432\u0435\u043d, \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f:<\/p>\n<h3><font color=\"#163C51\">1. \u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/font><\/h3>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Tarantool \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043a\u0435\u0442, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u043c\u0435\u043d \u0441 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c Tarantool \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c ASCII. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>admin<\/code>. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0441 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443<code> tarantoolctl enter &lt;\u0438\u043c\u044f<br \/>  \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430><\/code> \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u043c\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443. \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043d\u0435\u0439 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430. \u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0439\u0442\u0435 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432 \u0441\u0435\u0442\u0438. \u041b\u0443\u0447\u0448\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0435\u0433\u043e \u0432 \u0432\u0438\u0434\u0435 \u0441\u043e\u043a\u0435\u0442\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 Unix, \u0447\u0442\u043e\u0431\u044b \u043a Tarantool \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u2014 \u043f\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443.<\/p>\n<h3><font color=\"#163C51\">2. \u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0443<\/font><\/h3>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>listen<\/code> (\u043c\u043e\u0434\u0443\u043b\u044c <code>box<\/code>) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043e\u0431\u043c\u0435\u043d\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>tarantoolctl connect port_number<\/code>. \u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<h2><font color=\"#076184\">\u041c\u043e\u0434\u0443\u043b\u044c box \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/font><\/h2>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Tarantool \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0432 \u043d\u0451\u043c \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438. \u0421\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c <code>box<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <code>box<\/code>, Tarantool \u0437\u0430\u043d\u043e\u0441\u0438\u0442 \u0438\u0445 \u043d\u0430 \u0434\u0438\u0441\u043a, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<h3><font color=\"#163C51\">\u0417\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/font><\/h3>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0439\u0434\u0451\u043c \u0432 \u043c\u043e\u0434\u0443\u043b\u044c <code>box<\/code> \u0438 \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>box.once<\/code>, \u0447\u0442\u043e\u0431\u044b Tarantool \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043d\u0430\u0448 \u043a\u043e\u0434 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 (\u0441\u043f\u0435\u0439\u0441):<\/p>\n<pre><code class=\"lua\">local function bootstrap() local space = box.schema.create_space('example') space:create_index('primary') box.schema.user.grant('guest', 'read,write,execute', 'universe')  -- Keep things safe by default --  box.schema.user.create('example', { password = 'secret' }) --  box.schema.user.grant('example', 'replication') --  box.schema.user.grant('example', 'read,write,execute', 'space', 'example') end <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u0435\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0440\u044f\u0434\u0443.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435, \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e <code>guest<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c. \u041f\u0440\u0430\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440.<\/p>\n<p>  \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0439\u0441 \u2014 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c\/\u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0442\u0435\u0436, \u0430 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 MessagePack. \u0424\u043e\u0440\u043c\u0430\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u043c \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430: 18 \u0431\u0430\u0439\u0442 \u043f\u0440\u043e\u0442\u0438\u0432 27-\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/4a\/2b\/2v\/4a2b2vj5wjp05acsk_1uaxdx3ns.png\"\/><\/p>\n<p>  \u0421 \u0437\u0430\u043f\u0438\u0441\u044c\u044e MessagePack \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041f\u043e\u0447\u0442\u0438 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b.<\/p>\n<p>  \u0414\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u043f\u0435\u0439\u0441\u0430\u043c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f <code>box.space<\/code>. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>box.space.example<\/code>.<\/p>\n<p>  \u0412 Tarantool \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0434\u0432\u0430 \u0434\u0432\u0438\u0436\u043a\u0430: memory \u0438 vinyl. Memory \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b. \u0414\u0430\u043d\u043d\u044b\u0435 \u0441\u043a\u0438\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a, \u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u0440\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 (WAL, \u043e\u0442 \u00abwrite-ahead log\u00bb) \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u043a\u0430\u0437\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>  \u0414\u0432\u0438\u0436\u043e\u043a vinyl \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0442\u0430\u043a \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0451\u043c\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0430 Tarantool \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0447\u0442\u0435\u043d\u0438\u0435 \u0441 \u0436\u0451\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u0432\u0438\u0436\u043a\u043e\u043c memory.<\/p>\n<pre><code class=\"lua\">unix\/:\/var\/run\/tarantool\/example.control> box.space.example --- - engine: memtx   before_replace: 'function: 0x41eb02c8'   on_replace: 'function: 0x41eb0568'   ck_constraint: []   field_count: 0   temporary: false   index: 0: &amp;0   unique: true   parts:   - type: unsigned     is_nullable: false     fieldno: 1   id: 0   space_id: 512   type: TREE   name: primary primary: *0   is_local: false   enabled: true   name: example   id: 512 ... \u200b unix\/:\/var\/run\/tarantool\/example.control> <\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#163C51\">\u0418\u043d\u0434\u0435\u043a\u0441<\/font><\/h3>\n<p>  \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043f\u0435\u0439\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u0438\u043d\u0430\u0447\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041a\u0430\u043a \u0432 \u043b\u044e\u0431\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u0430\u043a ID.<\/p>\n<h3><font color=\"#163C51\">\u0421\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438<\/font><\/h3>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0448 \u0438\u043d\u0434\u0435\u043a\u0441. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u2014 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0430. \u042d\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0431\u0435\u0437 \u0437\u043d\u0430\u043a\u0430. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043e\u0448\u0438\u0431\u0430\u044e\u0441\u044c, \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d \u043a\u0430\u043a 18 \u043a\u0432\u0438\u043d\u0442\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u2014 \u0437\u0430\u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0432\u0435\u0434\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>insert<\/code>.<\/p>\n<pre><code class=\"lua\">unix\/:\/var\/run\/tarantool\/example.control> box.space.example:insert{1, 'test1', 'test2'} --- - [1, 'test1', 'test2'] ... \u200b unix\/:\/var\/run\/tarantool\/example.control> box.space.example:insert{2, 'test2', 'test3', 'test4'} --- - [2, 'test2', 'test3', 'test4'] ... \u200b unix\/:\/var\/run\/tarantool\/example.control> box.space.example:insert{3, 'test3'} --- - [3, 'test3'] ... \u200b unix\/:\/var\/run\/tarantool\/example.control> box.space.example:insert{4, 'test4'} --- - [4, 'test4'] ... \u200b unix\/:\/var\/run\/tarantool\/example.control> <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c. \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043d\u0435\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u0442\u043e\u043b\u0431\u0446\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 MessagePack.<\/p>\n<h2><font color=\"#076184\">\u0412\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445<\/font><\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>select<\/code>.<\/p>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>box.space.example:select<\/code> \u0441 \u043a\u043b\u044e\u0447\u043e\u043c {1} \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u043e\u043c\u0435\u0440 1. \u0415\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0432\u0441\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0423 \u043d\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u043d\u043e \u0432 Tarantool \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0432\u044b\u0445 \u043d\u0435\u0442 \u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u2014 \u0438 \u044d\u0442\u043e \u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0430 \u0440\u0435\u0447\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u043b\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n<pre><code class=\"lua\">box.space.example:create_index( \u2018secondary\u2019, { type = \u2018TREE\u2019, unique = false, parts = {{field = 2, type =\u2019string\u2019} }}) <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>create_index<\/code> \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f <code>secondary<\/code>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u043a\u0430\u0436\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u0422\u0438\u043f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0443\u043a\u0430\u0436\u0435\u043c <code>TREE<\/code>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>unique: false<\/code>.<\/p>\n<p>  \u041e\u043f\u0438\u0448\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>fieldno<\/code> \u0437\u0430\u0434\u0430\u0451\u0442 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u043b\u044f, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u0438\u043d\u0434\u0435\u043a\u0441, \u0430 <code>type<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>string<\/code>. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<pre><code class=\"lua\">unix\/:\/var\/run\/tarantool\/example.control> box.space.example:create_index('secondary', { type = 'TREE', unique = false, parts = {{field = 2, type = 'string'}}}) --- - unique: false   parts:   - type: string is_nullable: false fieldno: 2   id: 1   space_id: 512   type: TREE   name: secondary ... \u200b unix\/:\/var\/run\/tarantool\/example.control> <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"lua\">unix\/:\/var\/run\/tarantool\/example.control> box.space.example.index.secondary:select('test1') --- - - [1, 'test1', 'test2'] ... <\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#076184\">\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/font><\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u043e\u0432\u044c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0434\u0430\u043d\u043d\u044b\u043c, \u0438\u0445 \u0442\u0430\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u2014 \u043f\u0435\u0440\u0435\u0434 \u0432\u0430\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0441\u0442\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. Tarantool \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a. \u0415\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u043e \u0433\u0440\u044f\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f, \u043c\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u043c \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0432\u0430 \u0447\u0430\u0441\u0430 \u043d\u0430\u0437\u0430\u0434.<\/p>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a \u043f\u043e 20 \u0413\u0411 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043d\u0435 \u043b\u0443\u0447\u0448\u0430\u044f \u0438\u0434\u0435\u044f.<\/p>\n<p>  \u0421 \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 (WAL). \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u0438\u0445 \u0436\u0443\u0440\u043d\u0430\u043b\u0430\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438. \u041c\u044b \u0437\u0430\u0434\u0430\u0451\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 64 \u041c\u0411. \u041f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 Tarantool \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c. \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 Tarantool \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/u_\/eb\/qj\/u_ebqjbuciwuf-lyy5wixdrk188.png\"\/><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0435\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u044e <code>wal_mode<\/code> \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 <code>box.cfg<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Lua:<\/p>\n<pre><code class=\"xml\">wal_mode = \u201cwrite\u201d;<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#076184\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/font><\/h2>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u044b \u0443\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Tarantool \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0411\u0414. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0432\u0438\u0448\u0435\u043d\u043a\u0435 \u043d\u0430 \u0442\u043e\u0440\u0442\u0435: \u0447\u0442\u043e \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<h3><font color=\"#163C51\">\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/font><\/h3>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0432 Tarantool \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"lua\">box.cfg { listen = '0.0.0.0:3301'; io_collect_interval = nil; readahead = 16320; memtx_memory = 128 * 1024 * 1024; -- 128Mb memtx_min_tuple_size = 16; memtx_max_tuple_size = 128 * 1024 * 1024; -- 128Mb vinyl_memory = 128 * 1024 * 1024; -- 128Mb vinyl_cache = 128 * 1024 * 1024; -- 128Mb vinyl_max_tuple_size = 128 * 1024 * 1024; -- 128Mb vinyl_write_threads = 2; wal_mode = \"write\"; wal_max_size = 256 * 1024 * 1024; checkpoint_interval = 60 * 60; -- one hour checkpoint_count = 6; force_recovery = true; log_level = 5; log_nonblock = false; too_long_threshold = 0.5; read_only   = false } \u200b local function bootstrap() local space = box.schema.create_space('example') space:create_index('primary') \u200b box.schema.user.create('example', { password = 'secret' }) box.schema.user.grant('example', 'read,write,execute', 'space', 'example') \u200b box.schema.user.create('repl', { password = 'replication' }) box.schema.user.grant('repl', 'replication') end \u200b -- for first run create a space and add set up grants box.once('replica', bootstrap) \u200b -- enabling console access console = require('console') console.listen('127.0.0.1:3302') \u200b -- http config local charset = {}  do -- [0-9a-zA-Z] for c = 48, 57  do table.insert(charset, string.char(c)) end for c = 65, 90  do table.insert(charset, string.char(c)) end for c = 97, 122 do table.insert(charset, string.char(c)) end end \u200b local function randomString(length) if not length or length &lt;= 0 then return '' end math.randomseed(os.clock()^5) return randomString(length - 1) .. charset[math.random(1, #charset)] end \u200b local http_router = require('http.router') local http_server = require('http.server') local json = require('json') \u200b local httpd = http_server.new('0.0.0.0', 8080, { log_requests = true, log_errors = true }) \u200b local router = http_router.new() \u200b local function get_count()  local cnt = box.space.example:len()  return cnt end \u200b router:route({method = 'GET', path = '\/count'}, function() return {status = 200, body = json.encode({count = get_count()})} end) \u200b router:route({method = 'GET', path = '\/token'}, function() local token = randomString(32) local last = box.space.example:len() box.space.example:insert{ last + 1, token } return {status = 200, body = json.encode({token = token})} end) \u200b prometheus = require('prometheus') \u200b fiber = require('fiber') tokens_count = prometheus.gauge(\"tarantool_tokens_count\",                           \"API Tokens Count\") \u200b function monitor_tokens_count()   while true do tokens_count:set(get_count()) fiber.sleep(5)   end end fiber.create(monitor_tokens_count) \u200b router:route( { method = 'GET', path = '\/metrics' }, prometheus.collect_http) \u200b httpd:set_router(router) httpd:start() <\/code><\/pre>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b Lua, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<pre><code class=\"lua\">local charset = {}  do -- [0-9a-zA-Z] for c = 48, 57  do table.insert(charset, string.char(c)) end for c = 65, 90  do table.insert(charset, string.char(c)) end for c = 97, 122 do table.insert(charset, string.char(c)) end end <\/code><\/pre>\n<p>  \u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>randomString<\/code>, \u0443\u043a\u0430\u0437\u0430\u0432 \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<pre><code class=\"lua\">local function randomString(length) if not length or length &lt;= 0 then return '' end math.randomseed(os.clock()^5) return randomString(length - 1) .. charset[math.random(1, #charset)] end <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 Tarantool HTTP-\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u0438 HTTP-\u0441\u0435\u0440\u0432\u0435\u0440. \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0442\u0432\u0435\u0442:<\/p>\n<pre><code class=\"lua\">local http_router = require('http.router') local http_server = require('http.server') local json = require('json') <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c HTTP-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8080 \u0438 \u0432\u0441\u0435 \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<pre><code class=\"lua\">local httpd = http_server.new('0.0.0.0', 8080, { log_requests = true, log_errors = true }) <\/code><\/pre>\n<p>  \u041f\u043e\u0442\u043e\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 GET, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u043e\u0440\u0442 8080 \u0441 \u043f\u0443\u0442\u0451\u043c \/count, \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u043e\u0434 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 200, 404, 403 \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439:<\/p>\n<pre><code class=\"lua\">router:route({method = 'GET', path = '\/count'}, function() return {status = 200, body = json.encode({count = get_count()})} end) <\/code><\/pre>\n<p>  \u0412 \u0442\u0435\u043b\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <code>json.encode<\/code>, \u0433\u0434\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>getcount<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <b><font color=\"#163C51\">\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0443\u0442\u044c \u2014 \/token:<\/font><\/b><\/p>\n<pre><code class=\"lua\">router:route({method = 'GET', path = '\/token'}, function() local token = randomString(32) local last = box.space.example:len() box.space.example:insert{ last + 1, token } return {status = 200, body = json.encode({token = token})} end) <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c *router:route({method = \\&#8217;GET\\&#8217;, path = \\&#8217;\/token\\&#8217;}, function()* \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u043e\u043a\u0435\u043d.<\/p>\n<p>  <i>local token = randomString(32)<\/i> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u0438\u043d\u043e\u0439 32 \u0441\u0438\u043c\u0432\u043e\u043b\u0430. <i>local last = box.space.example:len()<\/i> \u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u0432 \u0441\u043f\u0435\u0439\u0441\u0435, \u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <i>box.space.example:insert{ last + 1, token }<\/i> \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u043e\u0432\u0443\u044e \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044f ID \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043d\u0430 1. \u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 Tarantool \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0435\u0433\u043e \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0422\u0430\u043a \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u0435\u0433\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u0415\u0433\u043e \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u043c\u043e\u0434\u0443\u043b\u044c <code>box<\/code> \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u043d\u0430\u0441 \u0432\u0441\u044e \u0433\u0440\u044f\u0437\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p>  \u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c HTTP \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435; \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HTTP-\u043c\u043e\u0434\u0443\u043b\u044c, \u043d\u0430\u0434\u043e \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c:<\/p>\n<pre><code class=\"xml\">root@test2:\/# tarantoolctl rocks install http Installing http:\/\/rocks.tarantool.org\/http-scm-1.src.rock Missing dependencies for http scm-1:    checks >= 3.0.1 (not installed)   http scm-1 depends on checks >= 3.0.1 (not installed) Installing http:\/\/rocks.tarantool.org\/checks-3.0.1-1.rockspec   Cloning into 'checks'... remote: Enumerating objects: 28, done. remote: Counting objects: 100% (28\/28), done. remote: Compressing objects: 100% (19\/19), done. remote: Total 28 (delta 1), reused 16 (delta 1), pack-reused 0 Receiving objects: 100% (28\/28), 12.69 KiB | 12.69 MiB\/s, done. Resolving deltas: 100% (1\/1), done. Note: checking out '580388773ef11085015b5a06fe52d61acf16b201'.   You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.   If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:     git checkout -b &lt;new-branch-name>   No existing manifest. Attempting to rebuild... checks 3.0.1-1 is now installed in \/.rocks (license: BSD)   -- The C compiler identification is GNU 7.5.0 -- Check for working C compiler: \/usr\/bin\/cc -- Check for working C compiler: \/usr\/bin\/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Found TARANTOOL: \/usr\/include (found version \"2.4.2-80-g18f2bc82d\") -- Tarantool LUADIR is \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua -- Tarantool LIBDIR is \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lib -- Configuring done -- Generating done CMake Warning:   Manually-specified variables were not used by the project:   version     -- Build files have been written to: \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/build.luarocks Scanning dependencies of target httpd [ 50%] Building C object http\/CMakeFiles\/httpd.dir\/lib.c.o In file included from \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/lib.c:32:0: \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/lib.c: In function \u2018tpl_term\u2019: \/usr\/include\/tarantool\/lauxlib.h:144:15: warning: this statement may fall through [-Wimplicit-fallthrough=] (*(B)->p++ = (char)(c))) ~~~~~~~~~~~^~~~~~~~~~~~ \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/lib.c:62:7: note: in expansion of macro \u2018luaL_addchar\u2019    luaL_addchar(b, '\\\\');    ^~~~~~~~~~~~ \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/lib.c:63:6: note: here   default:   ^~~~~~~ In file included from \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/lib.c:39:0: \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/tpleval.h: In function \u2018tpe_parse\u2019: \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/tpleval.h:147:9: warning: this statement may fall through [-Wimplicit-fallthrough=] type = TPE_TEXT; ~~~~~^~~~~~~~~~ \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/tpleval.h:149:3: note: here    case TPE_LINECODE:    ^~~~ In file included from \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/lib.c:40:0: \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/httpfast.h: In function \u2018httpfast_parse\u2019: \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/httpfast.h:372:22: warning: this statement may fall through [-Wimplicit-fallthrough=]              code = 0;              ~~~~~^~~ \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/httpfast.h:374:13: note: here          case status:          ^~~~ \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/httpfast.h:393:23: warning: this statement may fall through [-Wimplicit-fallthrough=]              state = message;              ~~~~~~^~~~~~~~~ \/tmp\/luarocks_http-scm-1-V4P9SM\/http\/http\/httpfast.h:395:13: note: here          case message:          ^~~~ [100%] Linking C shared library lib.so [100%] Built target httpd [100%] Built target httpd Install the project... -- Install configuration: \"Debug\" -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/VERSION.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lib\/http\/lib.so -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/server\/init.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/server\/tsgi_adapter.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/nginx_server\/init.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/router\/init.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/router\/fs.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/router\/matching.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/router\/middleware.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/router\/request.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/router\/response.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/tsgi.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/utils.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/mime_types.lua -- Installing: \/.rocks\/share\/tarantool\/rocks\/http\/scm-1\/lua\/http\/codes.lua http scm-1 is now installed in \/.rocks (license: BSD)   root@test2:\/# <\/code><\/pre>\n<p>  \u041d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f Prometheus:<\/p>\n<pre><code class=\"xml\">root@test2:\/# tarantoolctl rocks install prometheus Installing http:\/\/rocks.tarantool.org\/prometheus-scm-1.rockspec   Cloning into 'prometheus'... remote: Enumerating objects: 19, done. remote: Counting objects: 100% (19\/19), done. remote: Compressing objects: 100% (19\/19), done. remote: Total 19 (delta 2), reused 5 (delta 0), pack-reused 0 Receiving objects: 100% (19\/19), 10.73 KiB | 10.73 MiB\/s, done. Resolving deltas: 100% (2\/2), done. prometheus scm-1 is now installed in \/.rocks (license: BSD)   root@test2:\/# <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c:<\/p>\n<pre><code class=\"xml\">root@test2:\/# curl -D - -s http:\/\/127.0.0.1:8080\/token HTTP\/1.1 200 Ok Content-length: 44 Server: Tarantool http (tarantool v2.4.2-80-g18f2bc82d) Connection: keep-alive   {\"token\":\"e2tPq9l5Z3QZrewRf6uuoJUl3lJgSLOI\"}   root@test2:\/# curl -D - -s http:\/\/127.0.0.1:8080\/token HTTP\/1.1 200 Ok Content-length: 44 Server: Tarantool http (tarantool v2.4.2-80-g18f2bc82d) Connection: keep-alive   {\"token\":\"fR5aCA84gj9eZI3gJcV0LEDl9XZAG2Iu\"}   root@test2:\/# curl -D - -s http:\/\/127.0.0.1:8080\/count HTTP\/1.1 200 Ok Content-length: 11 Server: Tarantool http (tarantool v2.4.2-80-g18f2bc82d) Connection: keep-alive   {\"count\":2}root@test2:\/# <\/code><\/pre>\n<p>  \/count \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u0434 200.<\/p>\n<p>  \/token \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2><font color=\"#076184\">\u0422\u0435\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/font><\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u0442\u0435\u0441\u0442 \u043d\u0430 50 \u0442\u044b\u0441\u044f\u0447 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041f\u044f\u0442\u044c\u0441\u043e\u0442 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<pre><code class=\"xml\">root@test2:\/# ab -c 500 -n 50000 http:\/\/127.0.0.1:8080\/token This is ApacheBench, Version 2.3 &lt;$Revision: 1807734 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http:\/\/www.zeustech.net\/ Licensed to The Apache Software Foundation, http:\/\/www.apache.org\/   Benchmarking 127.0.0.1 (be patient) Completed 5000 requests Completed 10000 requests Completed 15000 requests Completed 20000 requests Completed 25000 requests Completed 30000 requests Completed 35000 requests Completed 40000 requests Completed 45000 requests Completed 50000 requests Finished 50000 requests     Server Software:    Tarantool Server Hostname:    127.0.0.1 Server Port:        8080   Document Path:      \/token Document Length:    44 bytes   Concurrency Level:  500 Time taken for tests:   14.578 seconds Complete requests:  50000 Failed requests:    0 Total transferred:  7950000 bytes HTML transferred:   2200000 bytes Requests per second:3429.87 [#\/sec] (mean) Time per request:   145.778 [ms] (mean) Time per request:   0.292 [ms] (mean, across all concurrent requests) Transfer rate:      532.57 [Kbytes\/sec] received   Connection Times (ms)           min  mean[+\/-sd] median   max Connect:    0   10 103.2  03048 Processing:12   69 685.1 15   13538 Waiting:   12   69 685.1 15   13538 Total:     12   78 768.2 15   14573   Percentage of the requests served within a certain time (ms)   50% 15   66% 15   75% 16   80% 16   90% 16   95% 16   98% 21   99% 42  100%  14573 (longest request) root@test2:\/# <\/code><\/pre>\n<p>  \u0422\u043e\u043a\u0435\u043d\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0438 \u043c\u044b \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0438\u0445 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0437 \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 99% \u0431\u044b\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0437\u0430 42 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430\u0448\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0432\u0441\u0435\u0433\u043e \u0441 \u0434\u0432\u0443\u043c\u044f \u0426\u041f \u0438 4 \u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441 3500 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443.<\/p>\n<p>  \u041c\u043e\u0436\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u044f\u0442\u0438\u0434\u0435\u0441\u044f\u0442\u0438\u0442\u044b\u0441\u044f\u0447\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d (\u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0431\u043b\u0438\u0437\u043b\u0435\u0436\u0430\u0449\u0438\u0445) \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HTTP, \u043d\u043e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0415\u0441\u0442\u044c \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b. \u0422\u0430\u043a, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u2014 \u0431\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Tarantool \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 Tarantool \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e.<\/p>\n<hr\/>\n<p>\u041d\u041b\u041e \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u043e \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u044b \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u0433\u0430:<\/p>\n<p>   \u2014 <a href=\"https:\/\/firstvds.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=product&amp;utm_content=vds15exeptprogrev\">15% \u043d\u0430 \u0432\u0441\u0435 \u0442\u0430\u0440\u0438\u0444\u044b VDS<\/a> (\u043a\u0440\u043e\u043c\u0435 \u0442\u0430\u0440\u0438\u0444\u0430 \u041f\u0440\u043e\u0433\u0440\u0435\u0432) \u2014 <b><font color=\"#163C51\">HABRFIRSTVDS<\/font><\/b>.<\/p>\n<p>   \u2014 <a href=\"https:\/\/1dedic.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=product&amp;utm_content=coreryzen20#server_configurator\"> 20% \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b AMD Ryzen \u0438 Intel Core <\/a>\u2014 <b><font color=\"#163C51\">HABRFIRSTDEDIC<\/font><\/b>.<\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/first\/blog\/596301\/\"> https:\/\/habr.com\/ru\/company\/first\/blog\/596301\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\" class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/d5\/ag\/pe\/d5agpet0omi33be77jgf4stl5_m.png\"\/><\/p>\n<p>  \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b Tarantool \u043f\u0440\u0438\u043e\u0431\u0440\u0451\u043b \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-327462","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/327462","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=327462"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/327462\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=327462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=327462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=327462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}