{"id":306900,"date":"2020-07-14T09:01:11","date_gmt":"2020-07-14T09:01:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=306900"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=306900","title":{"rendered":"\u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Redis, ClickHouse \u0438 Grafana"},"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\/post\/510776\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/km\/t-\/tt\/kmt-ttevuvcccy_idyl8kmin7cg.png\"><br \/>  <i>\u043f\u0440\u0438\u043c. latency\/time.<\/i><\/p>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. \u0421 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f xhprof \u043e\u0442 Facebook. \u0412\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0435, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, 1\/1000 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043a\u0442 \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u00ab\u0434\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u0431\u044b\u043b\u043e \u043b\u0443\u0447\u0448\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435\u00bb. \u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u0438 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u043e\u0433\u043b\u0438?<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e, \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430 \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u044b, \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u043e \u043a\u0430\u043a \u043a\u043e\u0434 \u043f\u043e\u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043f\u043e\u0434 \u0436\u0438\u0432\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439? \u0412\u0435\u0434\u044c \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u043e, \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043b\u0438\u0437\u0430, \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 10-15 \u043c\u0438\u043d\u0443\u0442 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043e\u0431\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0432 \u0431\u043e\u0435\u0432\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8v\/yx\/au\/8vyxautjbtzi-l-n_0qhpxuo6uy.png\"><br \/>  <i>\u043f\u0440\u0438\u043c. latency\/time. (1) \u0434\u0435\u043f\u043b\u043e\u0439, (2) \u043e\u0442\u043a\u0430\u0442<\/i><\/p>\n<h3>\u0421\u0442\u0435\u043a<\/h3>\n<p>  \u0414\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u044b \u0432\u0437\u044f\u043b\u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 ClickHouse (\u0441\u043e\u043a\u0440. \u043a\u0445). \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c, \u0441\u0436\u0430\u0442\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 deadlock \u0441\u0442\u0430\u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430. \u0421\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0431\u0430\u0437 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0430 \u0443\u0436\u0435 \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440\u0430\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0432 ClickHouse. \u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u043b\u0430 3-4 \u0447\u0430\u0441\u0430 (\u0434\u0430, ClickHouse \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u043f\u043e <b>\u043e\u0434\u043d\u043e\u0439<\/b> \u0437\u0430\u043f\u0438\u0441\u0438). \u0412\u0440\u0435\u043c\u044f \u0448\u043b\u043e \u0438 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0447\u0442\u043e-\u0442\u043e \u043c\u0435\u043d\u044f\u0442\u044c. \u0420\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0441 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u043c\u044b\u0441\u043b\u0430. \u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u0440\u043e\u043d-\u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0430 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0430 \u043f\u0430\u0447\u043a\u0443 \u0432 \u0431\u0430\u0437\u0443, \u043f\u043e\u0441\u043b\u0435, \u043f\u043e\u043c\u0435\u0447\u0430\u043b\u0430 \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438. \u041f\u0435\u0440\u0432\u044b\u0435 \u043f\u0430\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u043f\u043e\u043a\u0430 \u0438 \u0442\u0443\u0442 \u043d\u0435 \u043d\u0430\u0447\u0430\u043b\u0438\u0441\u044c \u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0421\u043e\u0431\u044b\u0442\u0438\u0439 \u0441\u0442\u0430\u043b\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u0443\u0431\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0435, \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0435 \u043f\u043e-\u043f\u0440\u044f\u043c\u043e\u043c\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e (\u0441\u0442\u0430\u043b\u0438 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445), \u0430 \u043a\u0440\u043e\u043d-\u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0432 ClickHouse. \u0417\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0435\u0449\u0451 \u043f\u0430\u0440\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0442\u0430\u0431\u043b\u0438\u0446, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0430\u0447\u043a\u0430\u043c\u0438 \u0432 \u043a\u0445. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u043f\u0430\u043b\u0430. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u043f\u043e\u0434\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u043e \u043d\u0430\u0441 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u043d\u0430 redis. \u0418\u0434\u0435\u044f \u0442\u0430\u043a\u0430\u044f: \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u043f\u0438\u0441\u043a\u0430, \u043a\u0440\u043e\u043d-\u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0447\u043a\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0451 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0414\u0430\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043f\u0430\u0447\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u043a\u0445.<\/p>\n<p>  <b>\u0418\u043c\u0435\u0435\u043c<\/b>: ClickHouse, Redis \u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c (\u043b\u044e\u0431\u0443\u044e \u2014 rabbitmq, kafka, beanstalkd\u2026)<\/p>\n<h3>Redis \u0438 \u0441\u043f\u0438\u0441\u043a\u0438<\/h3>\n<p>  \u0414\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, Redis \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u043a\u044d\u0448, \u043d\u043e \u0432\u0441\u0451 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0411\u0430\u0437\u0430 \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0430 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0432\u0441\u0435\u0433\u043e 3 \u043a\u043e\u043c\u0430\u043d\u0434\u044b: <a href=\"https:\/\/redis.io\/commands\/rpush\" rel=\"nofollow\">rpush<\/a>, <a href=\"https:\/\/redis.io\/commands\/lrange\" rel=\"nofollow\">lrange<\/a> \u0438 <a href=\"https:\/\/redis.io\/commands\/ltrim\" rel=\"nofollow\">ltrim<\/a>.<\/p>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b rpush \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u043f\u0438\u0441\u043a\u0430. \u0412 \u043a\u0440\u043e\u043d-\u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e lrange \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ltrim. <\/p>\n<p>  \u041e\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u2014 \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/y3\/qm\/wz\/y3qmwzssake38tl4umjbezufrbu.png\"><\/p>\n<p>  \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u0442\u0440\u0435\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kc\/hq\/na\/kchqnam-u54dbse5kxcdtpbu79g.png\"><\/p>\n<p>  \u041d\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u043f\u0438\u0441\u043a\u0430. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b lrange \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0447\u043a\u0443 (\u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 =5 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ds\/b_\/qb\/dsb_qbacwsgjtllz88rwzdu-xxk.png\"><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0430\u0447\u043a\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0430\u0447\u043a\u0443 \u0438\u0437 Redis, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0451 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wj\/rf\/nf\/wjrfnftnbuzsvdmejcwnmzdtq6c.png\"><\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0435\u0441\u0442\u044c, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u044b ClickHouse. \u041d\u0435 \u0441\u0442\u0430\u043b \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0432\u0441\u0451 \u0432 \u0442\u0438\u043f <i>String<\/i>.<\/p>\n<pre><code class=\"sql\">create table profile_logs (     hostname   String, \/\/ \u0445\u043e\u0441\u0442 \u0431\u044d\u043a\u044d\u043d\u0434\u0430, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435     project    String, \/\/ \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430     version    String, \/\/ \u0432\u0435\u0440\u0441\u0438\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430     userId     Nullable(String),     sessionId  Nullable(String),     requestId  String, \/\/ \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430     requestIp  String, \/\/ ip \u043a\u043b\u0438\u0435\u043d\u0442\u0430     eventName  String, \/\/ \u0438\u043c\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f     target     String, \/\/ URL     latency    Float32, \/\/ \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (latency=endTime - beginTime)     memoryPeak Int32,     date       Date,     created    DateTime )     engine = MergeTree(date, (date, project, eventName), 8192);<\/code><\/pre>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"json\">{   &quot;hostname&quot;: &quot;debian-fsn1-2&quot;,   &quot;project&quot;: &quot;habr&quot;,   &quot;version&quot;: &quot;7.19.1&quot;,   &quot;userId&quot;: null,   &quot;sessionId&quot;: &quot;Vv6ahLm0ZMrpOIMCZeJKEU0CTukTGM3bz0XVrM70&quot;,   &quot;requestId&quot;: &quot;9c73b19b973ca460&quot;,   &quot;requestIp&quot;: &quot;46.229.168.146&quot;,   &quot;eventName&quot;: &quot;app:init&quot;,   &quot;target&quot;: &quot;\/&quot;,   &quot;latency&quot;: 0.01384348869323730,   &quot;memoryPeak&quot;: 2097152,   &quot;date&quot;: &quot;2020-07-13&quot;,   &quot;created&quot;: &quot;2020-07-13 13:59:02&quot; }<\/code><\/pre>\n<p>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c <u>latency<\/u> \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a. \u0417\u0430\u0441\u0435\u043a\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <a href=\"https:\/\/www.php.net\/manual\/ru\/function.microtime.php\" rel=\"nofollow\">microtime<\/a>:  <\/p>\n<pre><code class=\"php\">$beginTime = microtime(true); \/\/ \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c $latency = microtime(true) - $beginTime;<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a laravel \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/github.com\/bavix\/laravel-entry\" rel=\"nofollow\">laravel-entry<\/a>. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c (\u0442\u0430\u0431\u043b\u0438\u0446\u0430 profile_logs):  <\/p>\n<pre><code class=\"php\">class ProfileLog extends \\Bavix\\Entry\\Models\\Entry {      protected $fillable = [         'hostname',         'project',         'version',         'userId',         'sessionId',         'requestId',         'requestIp',         'eventName',         'target',         'latency',         'memoryPeak',         'date',         'created',     ];      protected $casts = [         'date' =&gt; 'date:Y-m-d',         'created' =&gt; 'datetime:Y-m-d H:i:s',     ];  }<\/code><\/pre>\n<p>  \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <i>tick<\/i> (\u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u0435\u0440\u0432\u0438\u0441 <u>ProfileLogService<\/u>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 Redis. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f (\u043d\u0430\u0448 beginTime) \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $currentTime:  <\/p>\n<pre><code class=\"php\">$currentTime = \\microtime(true);<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0442\u0438\u043a \u043f\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044e \u0432\u044b\u0437\u0432\u0430\u043d \u0432\u043f\u0435\u0440\u0432\u044b\u0435, \u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0438\u043a\u043e\u0432 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434:  <\/p>\n<pre><code class=\"php\"> if (empty($this-&gt;ticks[$eventName])) {     $this-&gt;ticks[$eventName] = $currentTime;     return; }<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0442\u0438\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e, \u0442\u043e \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 Redis, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 rpush:  <\/p>\n<pre><code class=\"php\">$tickTime = $this-&gt;ticks[$eventName]; unset($this-&gt;ticks[$eventName]); Redis::rpush('events:profile_logs', \\json_encode([     'hostname' =&gt; \\gethostname(),     'project' =&gt; 'habr',     'version' =&gt; \\app()-&gt;version(),     'userId' =&gt; Auth::id(),     'sessionId' =&gt; \\session()-&gt;getId(),     'requestId' =&gt; \\bin2hex(\\random_bytes(8)),     'requestIp' =&gt; \\request()-&gt;getClientIp(),     'eventName' =&gt; $eventName,     'target' =&gt; \\request()-&gt;getRequestUri(),     'latency' =&gt; $currentTime - $tickTime,     'memoryPeak' =&gt; \\memory_get_usage(true),     'date' =&gt; $tickTime,     'created' =&gt; $tickTime, ]));<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u0430\u044f <i>$this-&gt;ticks<\/i> \u043d\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u043a\u0430\u043a singleton.<\/p>\n<pre><code class=\"php\">$this-&gt;app-&gt;singleton(ProfileLogService::class);<\/code><\/pre>\n<p>  \u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u0447\u043a\u0438 (<i>$batchSize<\/i>) \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u043d\u0430\u0447\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 10,000 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432). \u041f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d ClickHouse), \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0447\u043d\u0435\u0442 \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u0432 failed, \u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. <\/p>\n<p>  \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u0440\u043e\u043d-\u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code class=\"php\">$batchSize = 10000; $key = 'events:profile_logs' do {     $bulkData = Redis::lrange($key, 0, \\max($batchSize - 1, 0));     $count = \\count($bulkData);     if ($count) {         \/\/ \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043c \u0432 json, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c decode         foreach ($bulkData as $itemKey =&gt; $itemValue) {             $bulkData[$itemKey] = \\json_decode($itemValue, true);         }          \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 ch         \\dispatch(new BulkWriter($bulkData));         \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0430\u0447\u043a\u0443 \u0438\u0437 redis         Redis::ltrim($key, $count, -1);     } } while ($count &gt;= $batchSize);<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 ClickHouse, \u043d\u043e, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0440\u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c \u2014 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0447\u043a\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0438\u0445 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 ClickHouse. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u2014 \u044d\u0442\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440\u0430:  <\/p>\n<pre><code class=\"php\">class BulkWriter implements ShouldQueue {     use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;      protected $bulkData;      public function __construct(array $bulkData)     {         $this-&gt;bulkData = $bulkData;     }      public function handle(): void     {             ProfileLog::insert($this-&gt;bulkData);         }     } }<\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0447\u0435\u043a, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438 \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u2014 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e:  <\/p>\n<pre><code class=\"php\">app(ProfileLogService::class)-&gt;tick('post::paginate'); $posts = Post::query()-&gt;paginate(); $response = view('posts', \\compact('posts')); app(ProfileLogService::class)-&gt;tick('post::paginate'); return $response;<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u0435\u0440\u043d\u043e, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 Redis. \u0417\u0430\u043f\u0443\u0442\u0438\u043c \u043a\u0440\u043e\u043d-\u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u043f\u0430\u0447\u043a\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0430 \u0443\u0436\u0435 \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440 \u0432\u0441\u0442\u0430\u0432\u0438\u0442 \u0438\u0445 \u0432 \u0431\u0430\u0437\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/v1\/oj\/g0\/v1ojg0sxcgczd1m2n6g_vf3hxl0.png\"><\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0430\u0437\u0435. \u041c\u043e\u0436\u043d\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438.<\/p>\n<h3>Grafana<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/grafana.com\/\" rel=\"nofollow\">grafana<\/a>. \u041e\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043b\u044f debain-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043e\u043a, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/grafana.com\/docs\/grafana\/latest\/installation\/debian\/#1-download-and-install\" rel=\"nofollow\">\u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>. \u041e\u0431\u044b\u0447\u043d\u043e, \u044d\u0442\u0430\u043f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a <i>apt install grafana<\/i>.<\/p>\n<p>  \u041d\u0430 ArchLinux \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"bash\">yaourt -S grafana sudo systemctl start grafana<\/code><\/pre>\n<p>  \u0421\u0435\u0440\u0432\u0438\u0441 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f. URL: <a href=\"http:\/\/localhost:3000\" rel=\"nofollow\">http:\/\/localhost:3000<\/a><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/grafana.com\/grafana\/plugins\/vertamedia-clickhouse-datasource\" rel=\"nofollow\">ClickHouse datasource plugin<\/a>:  <\/p>\n<pre><code class=\"bash\">sudo grafana-cli plugins install vertamedia-clickhouse-datasource<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 grafana 7+, \u0442\u043e ClickHouse \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u041d\u0443\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"bash\">sudo vi \/etc\/grafana.ini<\/code><\/pre>\n<p>  \u041d\u0430\u0439\u0434\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443:  <\/p>\n<pre><code class=\"bash\">;allow_loading_unsigned_plugins =<\/code><\/pre>\n<p>  \u0417\u0430\u043c\u0435\u043d\u0438\u043c \u0435\u0451 \u043d\u0430 \u044d\u0442\u0443:  <\/p>\n<pre><code class=\"bash\">allow_loading_unsigned_plugins=vertamedia-clickhouse-datasource<\/code><\/pre>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441:  <\/p>\n<pre><code class=\"bash\">sudo systemctl restart grafana<\/code><\/pre>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 <a href=\"http:\/\/localhost:3000\" rel=\"nofollow\">grafana<\/a>.<br \/>  \u041b\u043e\u0433\u0438\u043d: admin \/ \u043f\u0430\u0440\u043e\u043b\u044c: admin \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bi\/t5\/4q\/bit54qdg8uplrvbun2ojowoivyq.png\"><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0430\u0436\u043c\u0435\u043c \u043d\u0430 \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0443. \u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f popup-\u043e\u043a\u043d\u0435 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043d\u0430 Data Sources, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 ClickHouse.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iu\/y5\/t0\/iuy5t0ub_d1qfg6gdll2fjxjgmc.png\"><\/p>\n<p>  \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043a\u0445. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abSave &amp; Test\u00bb, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u044b\u0439 dashboard:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/m9\/52\/xt\/m952xtecz2zcekuwefykalrfzcm.png\"><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u043d\u0435\u043b\u044c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dv\/n3\/wx\/dvn3wxfoqo-amvszsq_1gzkhnaq.png\"><\/p>\n<p>  \u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0431\u0430\u0437\u0443 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u0430\u043c\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gj\/m_\/f5\/gjm_f5fnx_zye3ha2sqy3kh6w2g.png\"><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0443:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fo\/sh\/4d\/fosh4dx5s62fbjc8jcrxm7d5ghk.png\"><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0433\u0440\u0430\u0444\u0438\u043a, \u043d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u043a\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043c <a href=\"https:\/\/clickhouse.tech\/docs\/ru\/sql-reference\/aggregate-functions\/reference\/#agg_function-avg\" rel=\"nofollow\">\u0441\u0440\u0435\u0434\u043d\u0438\u0439<\/a> latency \u0441 <a href=\"https:\/\/clickhouse.tech\/docs\/ru\/sql-reference\/functions\/date-time-functions\/#tostartoffiveminute\" rel=\"nofollow\">\u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u0442\u044b-\u0441-\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432\u043d\u0438\u0437 \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u044f\u0442\u0438\u043c\u0438\u043d\u0443\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430<\/a>:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/eu\/ko\/py\/eukopytctkumfjzndmsyfsylpqo.png\"><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u043e\u0436\u0435\u043c \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445. \u0414\u043b\u044f \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yh\/dv\/qm\/yhdvqmszg947snqx3kgns4qwu1e.png\"><\/p>\n<p>  \u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a, \u043d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c: <a href=\"https:\/\/github.com\/longxinH\/xhprof\" rel=\"nofollow\">xhprof (facebook)<\/a>, <a href=\"https:\/\/github.com\/tideways\/php-xhprof-extension\" rel=\"nofollow\">xhprof (tideways)<\/a>, <a href=\"https:\/\/habr.com\/en\/company\/badoo\/blog\/436364\/\">liveprof \u043e\u0442 (Badoo)<\/a>. \u0410 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u0445.<\/p>\n<p>  \u0412\u0435\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 <a href=\"https:\/\/github.com\/bavix\/laravel-prof\" rel=\"nofollow\">github<\/a> \u2014 <a href=\"https:\/\/github.com\/bavix\/laravel-prof\/blob\/d622caa46af2fb432671fac9fb4a364ba50fba76\/src\/Models\/ProfileLogEntry.php\" rel=\"nofollow\">\u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430<\/a>, <a href=\"https:\/\/github.com\/bavix\/laravel-prof\/blob\/d622caa46af2fb432671fac9fb4a364ba50fba76\/src\/Services\/ProfileLogService.php\" rel=\"nofollow\">\u0441\u0435\u0440\u0432\u0438\u0441<\/a>, <a href=\"https:\/\/github.com\/bavix\/laravel-entry\/blob\/c465e60842650b1270a2fa105b50c844ada402a5\/src\/Commands\/BulkWrite.php#L32\" rel=\"nofollow\">BulkWriteCommand<\/a>, <a href=\"https:\/\/github.com\/bavix\/laravel-entry\/blob\/c465e60842650b1270a2fa105b50c844ada402a5\/src\/Jobs\/BulkWriter.php#L56\" rel=\"nofollow\">BulkWriterJob<\/a> \u0438 middleware (<a href=\"https:\/\/github.com\/bavix\/laravel-prof\/blob\/d622caa46af2fb432671fac9fb4a364ba50fba76\/src\/Middleware\/ProfileLogMiddleware.php\" rel=\"nofollow\">1<\/a>, <a href=\"https:\/\/github.com\/bavix\/laravel-prof\/blob\/d622caa46af2fb432671fac9fb4a364ba50fba76\/src\/Middleware\/TerminateMiddleware.php\" rel=\"nofollow\">2<\/a>).<\/p>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430:  <\/p>\n<pre><code class=\"bash\">composer req bavix\/laravel-prof<\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 (config\/database.php), \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c clickhouse:  <\/p>\n<pre><code class=\"php\"> 'bavix::clickhouse' =&gt; [     'driver' =&gt; 'bavix::clickhouse',     'host' =&gt; env('CH_HOST'),     'port' =&gt; env('CH_PORT'),     'database' =&gt; env('CH_DATABASE'),     'username' =&gt; env('CH_USERNAME'),     'password' =&gt; env('CH_PASSWORD'), ], <\/code><\/pre>\n<p>  \u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b:  <\/p>\n<pre><code class=\"php\">use Bavix\\Prof\\Services\\ProfileLogService; \/\/ ... app(ProfileLogService::class)-&gt;tick('event-name'); \/\/ \u043a\u043e\u0434 app(ProfileLogService::class)-&gt;tick('event-name');<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0430\u0447\u043a\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 cron:  <\/p>\n<pre><code class=\"bash\">* * * * * php \/var\/www\/site.com\/artisan entry:bulk<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"bash\">php artisan queue:work --sleep=3 --tries=3<\/code><\/pre>\n<p>  \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c <a href=\"https:\/\/laravel.com\/docs\/7.x\/queues#supervisor-configuration\" rel=\"nofollow\">supervisor<\/a>. \u041a\u043e\u043d\u0444\u0438\u0433 (5 \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440\u043e\u0432):  <\/p>\n<pre><code class=\"bash\">[program:bulk_write] process_name=%(program_name)s_%(process_num)02d command=php \/var\/www\/site.com\/artisan queue:work --sleep=3 --tries=3 autostart=true autorestart=true user=www-data numprocs=5 redirect_stderr=true stopwaitsecs=3600 <\/code><\/pre>\n<p>  <b>UPD:<\/b><br \/>  1. <a href=\"https:\/\/clickhouse.tech\/docs\/ru\/engines\/table-engines\/integrations\/kafka\/\" rel=\"nofollow\">ClickHouse \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0443\u043c\u0435\u0435\u0442 \u0442\u044f\u043d\u0443\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 kafka<\/a>. \u0421\u043f\u0430\u0441\u0438\u0431\u043e, <a href=\"https:\/\/habr.com\/en\/users\/sdm\/\" class=\"user_link\">sdm<\/a><\/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\/post\/510776\/\"> https:\/\/habr.com\/ru\/post\/510776\/<\/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\/post\/510776\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/km\/t-\/tt\/kmt-ttevuvcccy_idyl8kmin7cg.png\"><br \/>  <i>\u043f\u0440\u0438\u043c. latency\/time.<\/i><\/p>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. \u0421 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f xhprof \u043e\u0442 Facebook. \u0412\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0435, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, 1\/1000 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043a\u0442 \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u00ab\u0434\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u0431\u044b\u043b\u043e \u043b\u0443\u0447\u0448\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435\u00bb. \u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u0438 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u043e\u0433\u043b\u0438?  <\/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-306900","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306900","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=306900"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306900\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=306900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=306900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=306900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}