{"id":310826,"date":"2020-10-01T15:00:58","date_gmt":"2020-10-01T15:00:58","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=310826"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=310826","title":{"rendered":"\u0412 Tarantool \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u0443\u043f\u0435\u0440\u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438. \u0412\u043e\u0442 \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/rebrainme\/blog\/521556\/\">\u041f\u044f\u0442\u044c \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Tarantool, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043e\u043d \u043c\u043d\u0435 \u043d\u0435 \u0437\u0430\u0448\u0435\u043b. \u041d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b \u0432\u0435\u0431\u0438\u043d\u0430\u0440, \u0433\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e Hadoop, \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 MapReduce. \u0422\u0430\u043c \u043c\u043d\u0435 \u0437\u0430\u0434\u0430\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u00ab\u0410 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u043e\u0434 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Tarantool?\u00bb.<\/p>\n<p>  \u0420\u0430\u0434\u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u043c\u0443, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u0438 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 Tarantool \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u0433\u0440\u0443\u0436\u0443 \u0435\u0433\u043e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u043a \u0442\u0430\u043c \u0432\u0441\u0435 \u043b\u0435\u0433\u043a\u043e \u0438 \u043a\u0440\u0443\u0442\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6_\/g2\/kb\/6_g2kb4ctyo8t5etwtgkanfft7i.jpeg\"><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Tarantool<\/h2>\n<p>  Tarantool \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u0441\u0432\u0435\u0440\u0445\u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0411\u0414. \u0422\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0445\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435. \u041f\u043b\u044e\u0441, \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445, \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \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 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0441 \u043d\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u2014 \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0441\u0432\u044f\u0437\u043a\u0438 \u0442\u0438\u043f\u0430 \u00ab\u043c\u0430\u0441\u0442\u0435\u0440-\u043c\u0430\u0441\u0442\u0435\u0440\u00bb.<\/p>\n<p>  \u0412\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044d\u0442\u043e application-\u0441\u0435\u0440\u0432\u0435\u0440. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u043c \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0432 \u0444\u043e\u043d\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0435 Http-\u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438: \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0440\u0435\u0434\u0443\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u0441\u0435 \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440\u0430. <\/p>\n<p>  \u042f \u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u0430\u043a \u0440\u0435\u0431\u044f\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 300 \u0441\u0442\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0432\u0435\u0442 \u0438 \u043c\u0435\u0447\u0435\u0442 \u2014 \u0443 \u043d\u0438\u0445 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0442 20 000 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u043c\u043a\u0438, \u043a\u0430\u043a \u0432 PostgreS.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u044f \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u044f \u0437\u0430\u0432\u0435\u043b \u0442\u0440\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u2013 \u0436\u0435\u0441\u0442\u043a\u0438\u0439 \u0434\u0438\u0441\u043a \u043d\u0430 20 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442, Ubuntu 18.04. 2 \u0432\u0438\u0440\u0442\u0443\u0430\u043b CPU \u0438 4 \u0433\u0438\u0433\u0430 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  \u041c\u044b \u0441\u0442\u0430\u0432\u0438\u043c Tarantool \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0431\u0430\u0448\u0435\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043b\u0438\u0431\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u0434\u0435\u043b\u0430\u0435\u043c apt get install Tarantool. \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442 \u2014 (curl -L <a href=\"https:\/\/tarantool.io\/installer.sh\">https:\/\/tarantool.io\/installer.sh<\/a> | VER=2.4 sudo -E bash). \u0423 \u043d\u0430\u0441 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u0430\u043a:<\/p>\n<p>  <i>tarantoolctl<\/i> \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c\u0438 \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0430. <br \/>  <i>\/etc\/tarantool<\/i> \u2014 \u0437\u0434\u0435\u0441\u044c \u043b\u0435\u0436\u0438\u0442 \u0432\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f. <br \/>  <i>var\/log\/tarantool<\/i> \u2014 \u0437\u0434\u0435\u0441\u044c \u043b\u0435\u0436\u0430\u0442 \u043b\u043e\u0433\u0438.<br \/>  <i>var\/lib\/tarantool<\/i> \u2014 \u0437\u0434\u0435\u0441\u044c \u043b\u0435\u0436\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u043d\u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044b \u043f\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u043f\u0430\u043f\u043a\u0438 instance-available \u0438 instance-enable \u2014 \u0432 \u043d\u0435\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u2014 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u0441 lua \u043a\u043e\u0434\u043e\u043c, \u0433\u0434\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u043d\u0430 \u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u0440\u0442\u0430\u0445 \u043e\u043d \u0441\u043b\u0443\u0448\u0430\u0435\u0442, \u043a\u0430\u043a\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 Vinyl, \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \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>  \u0418\u043d\u0441\u0442\u0430\u043d\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u0430\u043a \u0432 PostgreS. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \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\u0430\u044f \u0432\u0438\u0441\u0438\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u0430\u0445. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0441\u044f\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u0430\u0445. \u0423 \u043d\u0438\u0445 \u043c\u043e\u0433\u0443\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u2014 \u043e\u0434\u0438\u043d \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043e\u0434\u043d\u0443 \u043b\u043e\u0433\u0438\u043a\u0443, \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u0434\u0440\u0443\u0433\u0443\u044e. <\/p>\n<h2>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c\u0438<\/h2>\n<p>  \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0430 tarantoolctl, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c\u0438 \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, tarantoolctl check example \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u0441\u043a\u0430\u0436\u0435\u0442 \u2014 \u0444\u0430\u0439\u043b is ok, \u0435\u0441\u043b\u0438 \u0442\u0430\u043c \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. <\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u2014 tarantoolctl status example. \u0422\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c start, stop, restart.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 instance \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u043a \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<p>  <b>1. \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c <\/b><\/p>\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, \u0442\u0430\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0439 ASCII-\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u043e\u043c. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c admin, \u0442\u0430\u043c \u043d\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u043e\u043c \u0432\u043e\u0432\u043d\u0435 \u043d\u0435 \u043d\u0430\u0434\u043e.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043d\u0430\u0434\u043e \u0432\u0432\u0435\u0441\u0442\u0438 Tarantoolctl enter instance name. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c admin. \u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 \u043d\u0430\u0440\u0443\u0436\u0443 \u2014 \u043b\u0443\u0447\u0448\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u044e\u043d\u0438\u0442\u0441\u043e\u043a\u0435\u0442\u043e\u043c. \u0422\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0443 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u0442\u0435\u0445, \u0443 \u043a\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u043e\u043a\u0435\u0442. <\/p>\n<p>  \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>  <b>2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0443<\/b> <\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 listen, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439. \u042d\u0442\u043e\u0442 \u043f\u043e\u0440\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c, \u0438 \u0442\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f. <\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f tarantoolctl connect to port number. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0435\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0443\u0434\u0430\u043b\u0435\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\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0438 \u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. <\/p>\n<h2>\u0417\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u043e\u0434\u0443\u043b\u044c Box<\/h2>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a Tarantool \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 application-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c box \u2014 \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0432 box, Tarantool \u043f\u0438\u0448\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441 \u043d\u0438\u043c\u0438 \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435.<\/p>\n<h3>\u0417\u0430\u043f\u0438\u0441\u044c<\/h3>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043c\u043e\u0434\u0443\u043b\u044c box \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e box.once. \u041e\u043d\u0430 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 Tarantool \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \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. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c space, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. <\/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>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u2013 primary \u2014 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f \u043f\u0440\u0430\u0439\u043c\u0435\u0440\u0438-\u0438\u043d\u0434\u0435\u043a\u0441\u0430.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0434\u0435\u043b\u0430\u0435\u043c \u0433\u0440\u0430\u043d\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e guest, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443. \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c, \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c space \u2013 \u043e\u0431\u043b\u0430\u0441\u0442\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0442\u0435\u0436. \u041e\u043d\u0430 \u043f\u0430\u043a\u0443\u0435\u0442\u0441\u044f \u0432 MessagePack. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u2014 \u043e\u043d \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430 \u2013 18 \u0431\u0430\u0439\u0442 \u043f\u0440\u043e\u0442\u0438\u0432 27. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vo\/de\/q1\/vodeq1s8jofjmyjiifkus6-jzki.jpeg\"><\/p>\n<p>  \u0421 \u043d\u0438\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u043a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438.<\/p>\n<p>  \u0412\u0441\u0435 \u0441\u043f\u0435\u0439\u0441\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b Box.space. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u2013 \u043f\u0438\u0448\u0435\u043c box.space example \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043d\u0435\u043c\u0443. <\/p>\n<p>  \u0412 Tarantool \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0434\u0432\u0438\u0436\u043a\u043e\u0432: Memory \u0438 Vinyl. Memory \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e. \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043c\u043f\u044f\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c write ahead log, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>  Vinyl \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c \u043d\u0430\u043c \u0432\u0438\u0434\u0435 \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0435\u043c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438, \u0438 \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0445 \u0441 \u0434\u0438\u0441\u043a\u0430.<\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Memory. <\/p>\n<pre><code class=\"lua\">unix\/:\/var\/run\/tarantool\/example.control&gt; 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 ...  unix\/:\/var\/run\/tarantool\/example.control&gt;<\/code><\/pre>\n<p>  <b>Index:<\/b><\/p>\n<p>  \u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0441\u043f\u0435\u0439\u0441\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041a\u0430\u043a \u0438 \u0432 \u043b\u044e\u0431\u043e\u0439 \u0431\u0430\u0437\u0435, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u2013 ID \u0437\u0430\u043f\u0438\u0441\u0438. <\/p>\n<p>  <b>Parts:<\/b><\/p>\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. \u041e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u2013 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0442\u0438\u043f unsigned \u2014 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u2013 18 \u043a\u0432\u0438\u043d\u0442\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432. \u041e\u0444\u0438\u0433\u0435\u043d\u043d\u043e \u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b insert.<\/p>\n<pre><code class=\"lua\">unix\/:\/var\/run\/tarantool\/example.control&gt; box.space.example:insert{1, 'test1', 'test2'} --- - [1, 'test1', 'test2'] ...  unix\/:\/var\/run\/tarantool\/example.control&gt; box.space.example:insert{2, 'test2', 'test3', 'test4'} --- - [2, 'test2', 'test3', 'test4'] ...  unix\/:\/var\/run\/tarantool\/example.control&gt; box.space.example:insert{3, 'test3'} --- - [3, 'test3'] ...  unix\/:\/var\/run\/tarantool\/example.control&gt; box.space.example:insert{4, 'test4'} --- - [4, 'test4'] ...  unix\/:\/var\/run\/tarantool\/example.control&gt;<\/code><\/pre>\n<p>  \u041f\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, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u043c\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 MessagePack, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0432\u044b\u0448\u0435.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 select.<\/p>\n<p>  Box.example.select \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u044e\u0447\u0430 {1} \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0443\u0436\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043b\u044e\u0447, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u043a\u0430\u043a\u0438\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c. \u041e\u043d\u0438 \u0432\u0441\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u2014 \u0435\u0441\u0442\u044c \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u043e\u043b\u044f.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043c\u043d\u043e\u0433\u043e. \u0418 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u043f\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u043b\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \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 = falce, parts = {{field = 2, type =\u2019string\u2019} }}) <\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 Create_index.<br \/>  \u041d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e Secondary.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0422\u0438\u043f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u2014 TREE. \u041e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0432\u043e\u0434\u0438\u043c Unique = false.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0448 \u0438\u043d\u0434\u0435\u043a\u0441. Field \u2014 \u044d\u0442\u043e \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u043b\u044f, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441, \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0438\u043f string. \u0418 \u0432\u043e\u0442 \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u043b\u0441\u044f.<\/p>\n<pre><code class=\"lua\">unix\/:\/var\/run\/tarantool\/example.control&gt; 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 ...  unix\/:\/var\/run\/tarantool\/example.control&gt;<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"lua\">unix\/:\/var\/run\/tarantool\/example.control&gt; box.space.example.index.secondary:select('test1') --- - - [1, 'test1', 'test2'] ... <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430\u043d\u0435\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0438 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0438\u0445 \u043d\u0435\u0442 \u2014 \u0432\u0441\u0435 \u043f\u0443\u0441\u0442\u043e. \u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Tarantool \u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442\u044b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f, \u0442\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u043c \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b, \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 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442 \u2014 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0430\u043c\u043f\u0438\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a \u043f\u043e 20 \u0413\u0431 \u2014 \u0442\u0430\u043a \u0441\u0435\u0431\u0435 \u0437\u0430\u0442\u0435\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u0430 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f write-ahead log. \u0421 \u0435\u0435 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u043c write-ahead log \u0444\u0430\u0439\u043b\u0435. <\/p>\n<p>  \u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043e \u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043d\u0438\u0445. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 64 \u043c\u0431. \u041a\u043e\u0433\u0434\u0430 \u043e\u043d \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0438\u0434\u0442\u0438 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0444\u0430\u0439\u043b. \u0418 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 Tarantool \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442\u0430 \u0438 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0o\/rv\/qe\/0orvqe6fcfk-cnu09phhvdylpti.jpeg\"><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u044e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 box.cfg (\u0432 \u0444\u0430\u0439\u043b\u0435 example.lua): <\/p>\n<pre><code class=\"lua\">wal_mode = \u201cwrite\u201d;<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0421 \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0435\u0439\u0447\u0430\u0441, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0411\u0414. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u0430\u044f \u0432\u0438\u0448\u0435\u043d\u043a\u0430 \u043d\u0430 \u0442\u043e\u0440\u0442\u0435 \u2013 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u043e \u0432\u0441\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c. <\/p>\n<h3>\u041f\u0438\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0434\u043b\u044f \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0430 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c<\/b>                         <\/p>\n<div class=\"spoiler_text\">\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 = &quot;write&quot;;     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 }  local function bootstrap()     local space = box.schema.create_space('example')     space:create_index('primary')      box.schema.user.create('example', { password = 'secret' })     box.schema.user.grant('example', 'read,write,execute', 'space', 'example')      box.schema.user.create('repl', { password = 'replication' })     box.schema.user.grant('repl', 'replication') end  -- for first run create a space and add set up grants box.once('replica', bootstrap)  -- enabling console access console = require('console') console.listen('127.0.0.1:3302')  -- 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  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  local http_router = require('http.router') local http_server = require('http.server') local json = require('json')  local httpd = http_server.new('0.0.0.0', 8080, {     log_requests = true,     log_errors = true })  local router = http_router.new()  local function get_count()  local cnt = box.space.example:len()  return cnt end  router:route({method = 'GET', path = '\/count'}, function()     return {status = 200, body = json.encode({count = get_count()})} end)  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)  prometheus = require('prometheus')  fiber = require('fiber') tokens_count = prometheus.gauge(&quot;tarantool_tokens_count&quot;,                               &quot;API Tokens Count&quot;)  function monitor_tokens_count()   while true do     tokens_count:set(get_count())     fiber.sleep(5)   end end fiber.create(monitor_tokens_count)  router:route( { method = 'GET', path = '\/metrics' }, prometheus.collect_http)  httpd:set_router(router) httpd:start()<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041c\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0432 lua, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b. \u042d\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0430 \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u043d\u0434\u043e\u043c\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>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u2013 randomString \u0438 \u043f\u0440\u0438\u0434\u0430\u0434\u0438\u043c \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u043d\u044b. <\/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>  \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c http-\u0440\u043e\u0443\u0442\u0435\u0440 \u0438 http-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043d\u0430\u0448 \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b-\u0441\u0435\u0440\u0432\u0435\u0440, JSON, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0443.<\/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 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8080 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445 http server, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0448\u0438\u0431\u043a\u0438.<\/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>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c route, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0430 \u043f\u043e\u0440\u0442 8080 \/count \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c GET, \u0442\u043e \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u041e\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u2014 200, 404, 403 \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439, \u043a\u0430\u043a\u043e\u0439 \u0443\u043a\u0430\u0436\u0435\u043c. <\/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 \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c json.encode, \u0432 \u043d\u0435\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c count \u0438 getcount, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \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. <\/p>\n<p>  <b>\u0412\u0442\u043e\u0440\u043e\u0439 \u043c\u0435\u0442\u043e\u0434<\/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>  \u0413\u0434\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 <i>router:route({method = &#8216;GET&#8217;, path = &#8216;\/token&#8217;}, function()<\/i> \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0442\u043e\u043a\u0435\u043d.<\/p>\n<p>  \u0421\u0442\u0440\u043e\u043a\u0430 <i>local token = randomString(32)<\/i> \u2013 \u044d\u0442\u043e \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u0437 32 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. <br \/>  \u0412 \u0441\u0442\u0440\u043e\u043a\u0435 <i>local last = box.space.example:len()<\/i> \u043c\u044b \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442. <br \/>  \u0410 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 <i>box.space.example:insert{ last + 1, token }<\/i> \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043d\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c ID \u043d\u0430 1. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043a\u0441\u0442\u0430\u0442\u0438, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043a\u043e\u0440\u044f\u0432\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u0412 \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0435 \u0435\u0441\u0442\u044c \u0441\u0438\u043a\u0432\u0435\u043d\u0441\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430. <\/p>\n<p>  \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u0443\u0434\u0430 \u0442\u043e\u043a\u0435\u043d.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0412 \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0438 \u043c\u043e\u0434\u0443\u043b\u044c box \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u0432\u0430\u0441 \u0432\u0441\u044e \u0433\u0440\u044f\u0437\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p>  \u041e\u043d\u043e \u0441\u043b\u0443\u0448\u0430\u0435\u0442 http \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0432\u0441\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0435\u0434\u0438\u043d\u043e\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435 \u2014 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. <\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c http \u043c\u043e\u0434\u0443\u043b\u044c:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c, \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">root@test2:\/# tarantoolctl rocks install http Installing http:\/\/rocks.tarantool.org\/http-scm-1.src.rock Missing dependencies for http scm-1:    checks &gt;= 3.0.1 (not installed)  http scm-1 depends on checks &gt;= 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&gt;  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 &quot;2.4.2-80-g18f2bc82d&quot;) -- 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)-&gt;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: &quot;Debug&quot; -- 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>  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f prometheus:<\/p>\n<pre><code class=\"lua\">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\u043a\u0430\u0435\u043c \u0438 \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043c\u043e\u0434\u0443\u043b\u044f\u043c<\/p>\n<pre><code class=\"lua\">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  {&quot;token&quot;:&quot;e2tPq9l5Z3QZrewRf6uuoJUl3lJgSLOI&quot;}  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  {&quot;token&quot;:&quot;fR5aCA84gj9eZI3gJcV0LEDl9XZAG2Iu&quot;}  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  {&quot;count&quot;:2}root@test2:\/#<\/code><\/pre>\n<p>  \/count \u043e\u0442\u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0441\u0442\u0430\u0442\u0443\u0441 200.<br \/>  \/token \u0432\u044b\u0434\u0430\u0435\u0442 \u0442\u043e\u043a\u0435\u043d \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u0431\u0430\u0437\u0443.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c<\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u043d\u0430 50 000 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 500. <\/p>\n<pre><code class=\"lua\">root@test2:\/# ab -c 500 -n 50000 http:\/\/127.0.0.1:8080\/token This is ApacheBench, Version 2.3 &lt;$Revision: 1807734 $&gt; 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      0    3048 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 \u0432\u044b\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u0418 \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435. 99% \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0437\u0430 42 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0443 \u043d\u0430\u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 3500 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043a\u0435, \u0433\u0434\u0435 2 \u044f\u0434\u0440\u0430 \u0438 4 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c 50000-\u0442\u043e\u043a\u0435\u043d \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e http, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0431\u044d\u043a\u0433\u0440\u0430\u0443\u043d\u0434-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u043b\u044e\u0441 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0430\u043f\u0434\u0435\u0439\u0442\u0430\u0445, \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u2013 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b. <\/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 \u043f\u0440\u044f\u043c\u043e \u0432 \u0441\u0430\u043c\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443. <\/p>\n<p>  \u0410\u043f\u043f\u043b\u0438\u043a\u0435\u0439\u0448\u043d-\u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c, \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043a \u0441\u0435\u0431\u0435 \u0432 \u0431\u0430\u0437\u0443. \u0414\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0431\u0430\u0437\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c \u0422\u0430\u0440\u0430\u043d\u0442\u0443\u043b, \u0438 \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \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.<\/p>\n<h2>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u042d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0412\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u043a\u043e\u0440\u043e \u0432 \u0431\u043b\u043e\u0433\u0435 Mail.ru Group, \u0438 \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0435\u0435 \u0432 \u044d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b.<\/p>\n<p>  <i>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u0435\u0449\u0430\u0442\u044c \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f, \u0433\u0434\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0448\u0442\u0443\u043a\u0438 \u043e\u043d\u043b\u0430\u0439\u043d, \u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435\u0441\u044c \u043a<a href=\"https:\/\/rebrainme.com\/channel\"> \u043a\u0430\u043d\u0430\u043b\u0443 DevOps by REBRAIN<\/a>.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043f\u0435\u0440\u0435\u0435\u0437\u0434 \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, <a href=\"https:\/\/fevlake.com\"><b>\u0441\u043c\u0435\u043b\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0437\u0430\u044f\u0432\u043a\u0443<\/b><\/a>.<\/p>\n<p>  P.S. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c 2 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0430\u0443\u0434\u0438\u0442\u0430 \u0432 \u043c\u0435\u0441\u044f\u0446, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432 \u0438\u0445 \u0447\u0438\u0441\u043b\u0435.<\/i><\/div>\n<p> \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\/rebrainme\/blog\/521556\/\"> https:\/\/habr.com\/ru\/company\/rebrainme\/blog\/521556\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/rebrainme\/blog\/521556\/\">\u041f\u044f\u0442\u044c \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Tarantool, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043e\u043d \u043c\u043d\u0435 \u043d\u0435 \u0437\u0430\u0448\u0435\u043b. \u041d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b \u0432\u0435\u0431\u0438\u043d\u0430\u0440, \u0433\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e Hadoop, \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 MapReduce. \u0422\u0430\u043c \u043c\u043d\u0435 \u0437\u0430\u0434\u0430\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u00ab\u0410 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u043e\u0434 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Tarantool?\u00bb.<\/p>\n<p>  \u0420\u0430\u0434\u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u043c\u0443, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u0438 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 Tarantool \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u0433\u0440\u0443\u0436\u0443 \u0435\u0433\u043e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u043a \u0442\u0430\u043c \u0432\u0441\u0435 \u043b\u0435\u0433\u043a\u043e \u0438 \u043a\u0440\u0443\u0442\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6_\/g2\/kb\/6_g2kb4ctyo8t5etwtgkanfft7i.jpeg\">  <\/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-310826","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310826","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=310826"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310826\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=310826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=310826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}