{"id":358151,"date":"2024-05-21T00:05:35","date_gmt":"2024-05-21T00:05:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=358151"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=358151","title":{"rendered":"<span>\u0422\u0435\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Web-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f Rust<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c 3 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0435\u043a\u044d\u043d\u0434-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f Rust: Axum, Actix \u0438 Rocket.<\/p>\n<h2>\u041c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0442\u0440\u0438 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">POST \/test\/simple<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 JSON, \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 JSON  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">POST \/test\/timed  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 JSON, \u0437\u0430\u0441\u044b\u043f\u0430\u0435\u0442 \u043d\u0430 20 \u043c\u0441, \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 JSON  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">POST \/test\/bcrypt  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 JSON, \u0445\u0435\u0448\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c bcrypt \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c cost=10, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 JSON  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u043e\u0439. \u0412\u0442\u043e\u0440\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0441 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0435\u0442\u044f\u0436\u0451\u043b\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043a \u0411\u0414 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443. \u0422\u0440\u0435\u0442\u0438\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u044f\u0436\u0451\u043b\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443. \u0412\u0441\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 JSON-\u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u043f\u043e\u043b\u0435\u043c payload.<\/p>\n<p>\u041a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0440\u0451\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432, \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<h2>Axum<\/h2>\n<p>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d 30 \u0438\u044e\u043b\u044f 2021 \u0433\u043e\u0434\u0430. \u0421\u0430\u043c\u044b\u0439 \u043c\u043e\u043b\u043e\u0434\u043e\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 tokio \u2014 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u0434\u043b\u044f Rust (Actix \u0438 Rocket \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0442\u043e\u0436\u0435 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442).<\/p>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u0434 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c\u0438 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0432 IDE. \u041d\u0430\u0440\u0430\u0432\u043d\u0435 \u0441 \u044d\u0442\u0438\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u044b \u0437\u0430\u044f\u0432\u043b\u044f\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c extractor-\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 middleware, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0443\u0442\u0438\u043b\u0438\u0442 tower \u0438 tower-http<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u2014 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f main \u0438\u0437 tokio, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>GitHub:\u00a0<a href=\"https:\/\/github.com\/tokio-rs\/axum\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/tokio-rs\/axum<\/a><br \/>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f:\u00a0<a href=\"https:\/\/docs.rs\/axum\/latest\/axum\/\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.rs\/axum\/latest\/axum\/<\/a><br \/>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u043d\u0430\u00a0<a href=\"https:\/\/crates.io\/crates\/axum\" rel=\"noopener noreferrer nofollow\">crates.io<\/a>:\u00a0<strong>23 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430<\/strong><\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<h4>main.rs<\/h4>\n<pre><code class=\"rust\">use std::str::FromStr; use std::time::Duration; use axum::Json; use axum::response::IntoResponse; use tokio::time::sleep;  #[derive(Debug, serde::Serialize, serde::Deserialize)] struct Data { payload: String }  async fn simple_endpoint(Json(param): Json&lt;Data>) -> impl IntoResponse { Json(Data { payload: format!(\"Hello, {}\", param.payload) }) }  async fn timed_endpoint(Json(param): Json&lt;Data>) -> impl IntoResponse { sleep(Duration::from_millis(20)).await; Json(Data { payload: format!(\"Hello, {}\", param.payload) }) }  async fn bcrypt_endpoint(Json(param): Json&lt;Data>) -> impl IntoResponse { Json(Data { payload: bcrypt::hash(&amp;param.payload, 10).unwrap() }) }  #[tokio::main] async fn main() -> Result&lt;(), Box&lt;dyn std::error::Error>> { env_logger::init_from_env(env_logger::Env::default().default_filter_or(\"info\")); let router = axum::Router::new() .route(\"\/test\/simple\", axum::routing::post(simple_endpoint)) .route(\"\/test\/timed\", axum::routing::post(timed_endpoint)) .route(\"\/test\/bcrypt\", axum::routing::post(bcrypt_endpoint)); let address = \"0.0.0.0\"; let port = 3000; log::info!(\"Listening on http:\/\/{}:{}\/\", address, port); axum::Server::bind( &amp;std::net::SocketAddr::new( std::net::IpAddr::from_str(&amp;address).unwrap(), port ) ).serve(router.into_make_service()).await?; Ok(()) }<\/code><\/pre>\n<h4>Cargo.xml<\/h4>\n<pre><code>[package] name = \"rust_web_benchmark\" version = \"0.1.0\" edition = \"2021\"  [dependencies] log = \"0.4.20\" env_logger = \"0.10.0\" tokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\"] } axum = \"0.6.20\" serde = { version = \"1.0.189\", features = [\"derive\"] } bcrypt = \"0.15.0\"<\/code><\/pre>\n<h2>Actix<\/h2>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043d\u0430 GitHub \u0434\u0430\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f 31 \u043e\u043a\u0442\u044f\u0431\u0440\u044f 2017 \u0433\u043e\u0434\u0430.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0422\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u0433\u0430\u0442\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (HTTP\/2, \u043b\u043e\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0442. \u0434.)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u042d\u043a\u0441\u0442\u0440\u0435\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<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u044b. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 main \u0432 tokio, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u2014 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0435, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0431\u0435\u0437 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u0438\u0439 \u0441 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430 Axum, \u0445\u043e\u0442\u044f \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Actix.<\/p>\n<p>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442:\u00a0<a href=\"https:\/\/actix.rs\/\" rel=\"noopener noreferrer nofollow\">https:\/\/actix.rs\/<\/a><br \/>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u043d\u0430\u00a0<a href=\"https:\/\/crates.io\/crates\/actix\" rel=\"noopener noreferrer nofollow\">crates.io<\/a>:\u00a0<strong>5,8 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432<\/strong><\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<h4>main.rs<\/h4>\n<pre><code class=\"rust\">use std::time::Duration; use actix_web::{post, App, HttpResponse, HttpServer, Responder}; use actix_web::web::Json; use tokio::time::sleep;  #[derive(Debug, serde::Serialize, serde::Deserialize)] struct Data { payload: String }  #[post(\"\/test\/simple\")] async fn simple_endpoint(Json(param): Json&lt;Data>) -> impl Responder { HttpResponse::Ok().json(Json(Data { payload: format!(\"Hello, {}\", param.payload) })) }  #[post(\"\/test\/timed\")] async fn timed_endpoint(Json(param): Json&lt;Data>) -> impl Responder { sleep(Duration::from_millis(20)).await;     HttpResponse::Ok().json(Json(Data { payload: format!(\"Hello, {}\", param.payload) })) }  #[post(\"\/test\/bcrypt\")] async fn bcrypt_endpoint(Json(param): Json&lt;Data>) -> impl Responder { HttpResponse::Ok().json(Json(Data { payload: bcrypt::hash(&amp;param.payload, 10).unwrap() })) }  #[actix_web::main] async fn main() -> std::io::Result&lt;()> { env_logger::init_from_env(env_logger::Env::default().default_filter_or(\"info\")); let address = \"0.0.0.0\"; let port = 3000; log::info!(\"Listening on http:\/\/{}:{}\/\", address, port);     HttpServer::new(|| {         App::new()             .service(simple_endpoint)             .service(timed_endpoint) .service(bcrypt_endpoint)     })         .bind((address, port))?         .run()         .await }<\/code><\/pre>\n<h4>Cargo.toml<\/h4>\n<pre><code>[package] name = \"rust_web_benchmark\" version = \"0.1.0\" edition = \"2021\"  [dependencies] log = \"0.4.20\" env_logger = \"0.10.0\" tokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\"] } actix-web = \"4\" serde = { version = \"1.0.189\", features = [\"derive\"] } bcrypt = \"0.15.0\"<\/code><\/pre>\n<h2>Rocket<\/h2>\n<p>\u0423\u0432\u0438\u0434\u0435\u043b \u0441\u0432\u0435\u0442 \u0432 2016 \u0433\u043e\u0434\u0443. \u0421\u0442\u0430\u0440\u0435\u0439\u0448\u0438\u0439 \u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432, \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 0.5 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u0438, \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 0.5 \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u043d\u0430 tokio.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0422\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0432\u043e\u0431\u043e\u0434\u0430 \u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439, \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 API<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043a\u0440\u043e\u0441 rocket::launch \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<p>\u0425\u043e\u0442\u044f \u0432\u0435\u0440\u0441\u0438\u044f 0.5 \u0437\u0430\u044f\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 stable \u0432\u0435\u0442\u043a\u0438 Rust, \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 pear \u0442\u0440\u0435\u0431\u0443\u0435\u0442 nighly, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0440\u0430\u043d \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0443 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438\u0437-\u0437\u0430 \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f API \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 0.5. \u041f\u043e\u0438\u0441\u043a \u0432 Google \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0451\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 0.4, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 0.5. \u041d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043d\u043e \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441.<\/p>\n<p>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442:\u00a0<a href=\"https:\/\/rocket.rs\/\" rel=\"noopener noreferrer nofollow\">https:\/\/rocket.rs\/<\/a><br \/>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u043d\u0430\u00a0<a href=\"https:\/\/crates.io\/crates\/rocket\" rel=\"noopener noreferrer nofollow\">crates.io<\/a>:\u00a0<strong>3,7 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430<\/strong><\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<h4>main.rs<\/h4>\n<pre><code class=\"rust\">use std::time::Duration; use tokio::time::sleep; use rocket::serde::json::Json;  #[macro_use] extern crate rocket;  #[derive(Debug, serde::Serialize, serde::Deserialize)] struct Data { payload: String }  #[post(\"\/test\/simple\", data = \"&lt;param>\")] async fn simple_endpoint(param: Json&lt;Data>) -> Json&lt;Data> { Json(Data { payload: format!(\"Hello, {}\", param.into_inner().payload) }) }  #[post(\"\/test\/timed\", data = \"&lt;param>\")] async fn timed_endpoint(param: Json&lt;Data>) -> Json&lt;Data> { sleep(Duration::from_millis(20)).await; Json(Data { payload: format!(\"Hello, {}\", param.into_inner().payload) }) }  #[post(\"\/test\/bcrypt\", data = \"&lt;param>\")] async fn bcrypt_endpoint(param: Json&lt;Data>) -> Json&lt;Data> { Json(Data { payload: bcrypt::hash(&amp;param.into_inner().payload, 10).unwrap() }) }  #[launch] fn rocket() -> _ { rocket::build() .configure(rocket::Config::figment() .merge((\"address\", \"0.0.0.0\")) .merge((\"port\", 3000)) ) .mount(\"\/\", routes![ simple_endpoint, timed_endpoint, bcrypt_endpoint ]) }<\/code><\/pre>\n<h4>Cargo.toml<\/h4>\n<pre><code>[package] name = \"rust_web_benchmark\" version = \"0.1.0\" edition = \"2021\"  [dependencies] tokio = \"1\" rocket = { version = \"0.5.0-rc.3\", features = [\"json\"] } serde = { version = \"1.0.189\", features = [\"derive\"] } bcrypt = \"0.15.0\"<\/code><\/pre>\n<h2>\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a<\/h2>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0435\u0435 N \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c M \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 URL. \u0418\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 (200 OK) \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445), \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u0414\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438).<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f tokio \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 reqwest.<\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<h4>main.rs<\/h4>\n<pre><code class=\"rust\">use reqwest::StatusCode;  static REQ_PAYLOAD: &amp;str = \"{\\n\\t\\\"payload\\\": \\\"world\\\"\\n}\\n\";  #[tokio::main] async fn main() -> Result&lt;(), Box&lt;dyn std::error::Error>> { let args = std::env::args().collect::&lt;Vec&lt;_>>(); if args.len() != 4 { println!(\"Usage: {} url thread-count request-count\", args[0]); return Ok(()); }  let url = args[1].clone(); let request_count = args[2].parse().unwrap(); let thread_count = args[3].parse().unwrap();  let client = reqwest::Client::new(); let start = std::time::Instant::now(); let handles = (0..thread_count).map(|_| { let url = url.clone(); let client = client.clone(); tokio::spawn(async move { let mut error_count = 0; let mut results = Vec::new(); for _ in 0..request_count { let start = std::time::Instant::now(); let res = client .post(&amp;url) .header(\"Content-Type\", \"application\/json\") .body(REQ_PAYLOAD) .send() .await .unwrap(); if res.status() == StatusCode::OK { res.text().await.unwrap(); let elapsed = std::time::Instant::now().duration_since(start); results.push(elapsed.as_micros()); } else { error_count += 1; } } (results, error_count) }) }).collect::&lt;Vec&lt;_>>();  let mut results = Vec::new(); let mut error_count = 0; for handle in handles { let (out, err_count) = handle.await.unwrap(); results.extend(out.into_iter()); error_count += err_count; } let elapsed = std::time::Instant::now().duration_since(start); let rps = results.len() as f64 \/ elapsed.as_secs_f64();  results.sort(); println!( \"average={}us, median={}us, errors={}, total={}, rps={}\", results.iter() .copied() .reduce(|a, b| a + b).unwrap() \/ results.len() as u128, results[results.len() \/ 2], error_count, results.len(), rps ); Ok(()) }<\/code><\/pre>\n<h4>Cargo.toml<\/h4>\n<pre><code>[package] name = \"bench\" version = \"0.1.0\" edition = \"2021\"  [dependencies] tokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\"] } reqwest = \"0.11.22\"<\/code><\/pre>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h2>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0432 \u0441\u0432\u043e\u0451\u043c Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 (\u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432). \u0417\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0443 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u043b\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430 \u0438 \u0442. \u0434. \u041f\u043e\u043b\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0431\u044b\u043b \u043f\u043e\u0432\u0442\u043e\u0440\u0451\u043d \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u0434\u043b\u044f \u0442\u0440\u0451\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 (\u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432 \u0442\u0435\u0441\u0442\u0435 \u0438\u0437-\u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0442\u0440\u043e\u0442\u0442\u043b\u0438\u043d\u0433\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0438\u0437-\u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0438\u0437 \u044d\u043d\u0435\u0440\u0433\u043e\u0441\u0431\u0435\u0440\u0435\u0433\u0430\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430), \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u044b.<\/p>\n<p>\u0414\u043b\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430 simple \u0438 timed \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c 100 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e 100 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0414\u043b\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430 bcrypt \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c 10 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e 50 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">\u0422\u0435\u0441\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0435\u0442\u0440\u0438\u043a\u0430<\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><strong>Axum<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><strong>Actix<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Rocket<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p align=\"left\">Simple<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 (\u043c\u0441)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\">7,727<\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>7,239<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>12,971<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041c\u0435\u0434\u0438\u0430\u043d\u0430 (\u043c\u0441)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\">3,698<\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>3,1<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>9,097<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>RPS<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\">12010<\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>12483<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>7419<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p align=\"left\">Timed<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 (\u043c\u0441)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\">25,922<\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>25,764<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>26,402<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041c\u0435\u0434\u0438\u0430\u043d\u0430 (\u043c\u0441)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\">22,379<\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>21,906<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>22,659<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>RPS<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>3799<\/u><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\">3789<\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>3696<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p align=\"left\">Bcrypt<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 (\u043c\u0441)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>493<\/u><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><em>505<\/em><\/p>\n<\/td>\n<td>\n<p align=\"left\">501<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041c\u0435\u0434\u0438\u0430\u043d\u0430 (\u043c\u0441)<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>474<\/u><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\">486<\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>503<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>RPS<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><u>93<\/u><\/p>\n<\/td>\n<td data-colwidth=\"140\" width=\"140\">\n<p align=\"left\"><em>86<\/em><\/p>\n<\/td>\n<td>\n<p align=\"left\">91<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>(\u043f\u043e\u0434\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 <u>\u043b\u0443\u0447\u0448\u0438\u0439<\/u> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043a\u0443\u0440\u0441\u0438\u0432 &#8212; <em>\u0445\u0443\u0434\u0448\u0438\u0439<\/em>)<\/p>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, Axum \u0438 Actix \u0438\u0434\u0443\u0442 \u043d\u043e\u0437\u0434\u0440\u044f \u0432 \u043d\u043e\u0437\u0434\u0440\u044e \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c Actix \u2014 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u0435\u0440\u0451\u0434. Rocket \u2014 \u044f\u0432\u043d\u044b\u0439 \u0430\u0443\u0442\u0441\u0430\u0439\u0434\u0435\u0440 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u0432\u0441\u0451 \u0436\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0432\u0441\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u044a\u0435\u0441\u0442\u0441\u044f \u043d\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435, \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a \u0411\u0414 \u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0442. \u0434. (\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043d\u0430 \u0442\u0435\u0441\u0442\u0430\u0445 timed \u0438 bcrypt &#8212; \u0440\u0430\u0437\u0440\u044b\u0432 \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u0442\u0440\u0435\u043c\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c).  <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u041e\u0417\u0423<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Axum<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Actix<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Rocket<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><u>0,75 MiB<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>1,3 MiB<\/em><\/p>\n<\/td>\n<td>\n<p align=\"left\">0,97 MiB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0430 (\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><u>71 MiB<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><u>71 MiB<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>102 MiB<\/em><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041f\u043e\u0441\u043b\u0435 \u0442\u0435\u0441\u0442\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><u>0,91 MiB<\/u><\/p>\n<\/td>\n<td>\n<p align=\"left\"><em>2,4 MiB<\/em><\/p>\n<\/td>\n<td>\n<p align=\"left\">1,8 MiB<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 Axum \u2014 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0439 \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c, Actix \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u041e\u0417\u0423 \u043f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, \u043d\u043e \u0432\u043e\u0442 \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043f\u043e\u0442\u0440\u0435\u0431\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0445. Rocket \u2014 \u0441\u0440\u0435\u0434\u043d\u044f\u0447\u043e\u043a \u043f\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044e \u041e\u0417\u0423 \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u043d\u0430 \u0442\u0440\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435.  <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041c\u043e\u0439 \u0444\u0430\u0432\u043e\u0440\u0438\u0442 \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043e\u0431\u0437\u043e\u0440\u0430 \u2014 Axum. \u0421\u0430\u043c\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0438 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f, \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u043a\u043e\u043d\u043e\u043c\u043d\u043e\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u041e\u0417\u0423 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432). \u041e\u0442\u0441\u0442\u0430\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 Actix \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0442\u0430\u043a \u043a\u0430\u043a Axum \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u043b\u043e\u0434\u043e\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u044b\u0432 \u0438\u0441\u0447\u0435\u0437\u043d\u0435\u0442 \u043f\u043e \u043c\u0435\u0440\u0435 \u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0438 \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u0430.\u00a0<\/p>\n<p>\u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u044f \u0431\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b Actix, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u0445\u0443\u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f, \u0447\u0443\u0442\u044c \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0434 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439. \u041d\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u043c\u0438.\u00a0<\/p>\n<p>\u041a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0443 Rocket \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043d\u0435 \u0432\u0438\u0436\u0443. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043d \u0431\u044b\u043b \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432 2016 \u0433\u043e\u0434\u0443, \u043f\u0435\u0440\u0432\u043e\u043f\u0440\u043e\u0445\u043e\u0434\u0446\u0435\u043c, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u043d \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0438 \u043f\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044e \u043f\u0430\u043c\u044f\u0442\u0438, \u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u043e\u0432\u044b\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c, \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e stable \u0432\u0435\u0442\u043a\u043e\u0439 Rust \u0438 \u0438\u043c\u0435\u0435\u0442 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438\u0437-\u0437\u0430 \u043b\u043e\u043c\u0430\u044e\u0449\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 0.4 \u0438 0.5.<\/p>\n<p><a href=\"https:\/\/github.com\/KivApple\/rust_web_benchmark\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u043d\u0430 GitHub<\/a><\/p>\n<p><a href=\"https:\/\/t.me\/kiv_apple_blog\/12\" rel=\"noopener noreferrer nofollow\">\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0432 \u043c\u043e\u0451\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0431\u043b\u043e\u0433\u0435 \u0432 Telegram<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/769100\/\"> https:\/\/habr.com\/ru\/articles\/769100\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c 3 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0435\u043a\u044d\u043d\u0434-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f Rust: Axum, Actix \u0438 Rocket.<\/p>\n<h2>\u041c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0442\u0440\u0438 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">POST \/test\/simple<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 JSON, \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 JSON  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">POST \/test\/timed  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 JSON, \u0437\u0430\u0441\u044b\u043f\u0430\u0435\u0442 \u043d\u0430 20 \u043c\u0441, \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 JSON  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">POST \/test\/bcrypt  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 JSON, \u0445\u0435\u0448\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c bcrypt \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c cost=10, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 JSON  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u043e\u0439. \u0412\u0442\u043e\u0440\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0441 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0435\u0442\u044f\u0436\u0451\u043b\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043a \u0411\u0414 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443. \u0422\u0440\u0435\u0442\u0438\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u044f\u0436\u0451\u043b\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443. \u0412\u0441\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 JSON-\u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u043f\u043e\u043b\u0435\u043c payload.<\/p>\n<p>\u041a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0440\u0451\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432, \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<h2>Axum<\/h2>\n<p>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d 30 \u0438\u044e\u043b\u044f 2021 \u0433\u043e\u0434\u0430. \u0421\u0430\u043c\u044b\u0439 \u043c\u043e\u043b\u043e\u0434\u043e\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 tokio \u2014 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u0434\u043b\u044f Rust (Actix \u0438 Rocket \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0442\u043e\u0436\u0435 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442).<\/p>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u0434 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c\u0438 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0432 IDE. \u041d\u0430\u0440\u0430\u0432\u043d\u0435 \u0441 \u044d\u0442\u0438\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u044b \u0437\u0430\u044f\u0432\u043b\u044f\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c extractor-\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 middleware, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0443\u0442\u0438\u043b\u0438\u0442 tower \u0438 tower-http<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u2014 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f main \u0438\u0437 tokio, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>GitHub:\u00a0<a href=\"https:\/\/github.com\/tokio-rs\/axum\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/tokio-rs\/axum<\/a><br \/>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f:\u00a0<a href=\"https:\/\/docs.rs\/axum\/latest\/axum\/\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.rs\/axum\/latest\/axum\/<\/a><br \/>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u043d\u0430\u00a0<a href=\"https:\/\/crates.io\/crates\/axum\" rel=\"noopener noreferrer nofollow\">crates.io<\/a>:\u00a0<strong>23 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430<\/strong><\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<h4>main.rs<\/h4>\n<pre><code class=\"rust\">use std::str::FromStr; use std::time::Duration; use axum::Json; use axum::response::IntoResponse; use tokio::time::sleep;  #[derive(Debug, serde::Serialize, serde::Deserialize)] struct Data { payload: String }  async fn simple_endpoint(Json(param): Json&lt;Data>) -> impl IntoResponse { Json(Data { payload: format!(\"Hello, {}\", param.payload) }) }  async fn timed_endpoint(Json(param): Json&lt;Data>) -> impl IntoResponse { sleep(Duration::from_millis(20)).await; Json(Data { payload: format!(\"Hello, {}\", param.payload) }) }  async fn bcrypt_endpoint(Json(param): Json&lt;Data>) -> impl IntoResponse { Json(Data { payload: bcrypt::hash(&amp;param.payload, 10).unwrap() }) }  #[tokio::main] async fn main() -> Result&lt;(), Box&lt;dyn std::error::Error>> { env_logger::init_from_env(env_logger::Env::default().default_filter_or(\"info\")); let router = axum::Router::new() .route(\"\/test\/simple\", axum::routing::post(simple_endpoint)) .route(\"\/test\/timed\", axum::routing::post(timed_endpoint)) .route(\"\/test\/bcrypt\", axum::routing::post(bcrypt_endpoint)); let address = \"0.0.0.0\"; let port = 3000; log::info!(\"Listening on http:\/\/{}:{}\/\", address, port); axum::Server::bind( &amp;std::net::SocketAddr::new( std::net::IpAddr::from_str(&amp;address).unwrap(), port ) ).serve(router.into_make_service()).await?; Ok(()) }<\/code><\/pre>\n<h4>Cargo.xml<\/h4>\n<pre><code>[package] name = \"rust_web_benchmark\" version = \"0.1.0\" edition = \"2021\"  [dependencies] log = \"0.4.20\" env_logger = \"0.10.0\" tokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\"] } axum = \"0.6.20\" serde = { version = \"1.0.189\", features = [\"derive\"] } bcrypt = \"0.15.0\"<\/code><\/pre>\n<h2>Actix<\/h2>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043d\u0430 GitHub \u0434\u0430\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f 31 \u043e\u043a\u0442\u044f\u0431\u0440\u044f 2017 \u0433\u043e\u0434\u0430.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0422\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u0433\u0430\u0442\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (HTTP\/2, \u043b\u043e\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0442. \u0434.)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u042d\u043a\u0441\u0442\u0440\u0435\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<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u044b. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 main \u0432 tokio, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u2014 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0435, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0431\u0435\u0437 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u0438\u0439 \u0441 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430 Axum, \u0445\u043e\u0442\u044f \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Actix.<\/p>\n<p>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442:\u00a0<a href=\"https:\/\/actix.rs\/\" rel=\"noopener noreferrer nofollow\">https:\/\/actix.rs\/<\/a><br \/>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u043d\u0430\u00a0<a href=\"https:\/\/crates.io\/crates\/actix\" rel=\"noopener noreferrer nofollow\">crates.io<\/a>:\u00a0<strong>5,8 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432<\/strong><\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<h4>main.rs<\/h4>\n<pre><code class=\"rust\">use std::time::Duration; use actix_web::{post, App, HttpResponse, HttpServer, Responder}; use actix_web::web::Json; use tokio::time::sleep;  #[derive(Debug, serde::Serialize, serde::Deserialize)] struct Data { payload: String }  #[post(\"\/test\/simple\")] async fn simple_endpoint(Json(param): Json&lt;Data>) -> impl Responder { HttpResponse::Ok().json(Json(Data { payload: format!(\"Hello, {}\", param.payload) })) }  #[post(\"\/test\/timed\")] async fn timed_endpoint(Json(param): Json&lt;Data>) -> impl Responder { sleep(Duration::from_millis(20)).await;     HttpResponse::Ok().json(Json(Data { payload: format!(\"Hello, {}\", param.payload) })) }  #[post(\"\/test\/bcrypt\")] async fn bcrypt_endpoint(Json(param): Json&lt;Data>) -> impl Responder { HttpResponse::Ok().json(Json(Data { payload: bcrypt::hash(&amp;param.payload, 10).unwrap() })) }  #[actix_web::main] async fn main() -> std::io::Result&lt;()> { env_logger::init_from_env(env_logger::Env::default().default_filter_or(\"info\")); let address = \"0.0.0.0\"; let port = 3000; log::info!(\"Listening on http:\/\/{}:{}\/\", address, port);     HttpServer::new(|| {         App::new()             .service(simple_endpoint)             .service(timed_endpoint) .service(bcrypt_endpoint)     })         .bind((address, port))?         .run()         .await }<\/code><\/pre>\n<h4>Cargo.toml<\/h4>\n<pre><code>[package] name = \"rust_web_benchmark\" version = \"0.1.0\" edition = \"2021\"  [dependencies] log = \"0.4.20\" env_logger = \"0.10.0\" tokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\"] } actix-web = \"4\" serde = { version = \"1.0.189\", features = [\"derive\"] } bcrypt = \"0.15.0\"<\/code><\/pre>\n<h2>Rocket<\/h2>\n<p>\u0423\u0432\u0438\u0434\u0435\u043b \u0441\u0432\u0435\u0442 \u0432 2016 \u0433\u043e\u0434\u0443. \u0421\u0442\u0430\u0440\u0435\u0439\u0448\u0438\u0439 \u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432, \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 0.5 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u0438, \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 0.5 \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u043d\u0430 tokio.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0422\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0432\u043e\u0431\u043e\u0434\u0430 \u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439, \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 API<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043a\u0440\u043e\u0441 rocket::launch \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<p>\u0425\u043e\u0442\u044f \u0432\u0435\u0440\u0441\u0438\u044f 0.5 \u0437\u0430\u044f\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 stable \u0432\u0435\u0442\u043a\u0438 Rust, \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 pear \u0442\u0440\u0435\u0431\u0443\u0435\u0442 nighly, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0440\u0430\u043d \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0443 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438\u0437-\u0437\u0430 \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f API \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 0.5. \u041f\u043e\u0438\u0441\u043a \u0432 Google \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0451\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 0.4, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 0.5. \u041d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043d\u043e \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441.<\/p>\n<p>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442:\u00a0<a href=\"https:\/\/rocket.rs\/\" rel=\"noopener noreferrer nofollow\">https:\/\/rocket.rs\/<\/a><br \/>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u043d\u0430\u00a0<a href=\"https:\/\/crates.io\/crates\/rocket\" rel=\"noopener noreferrer nofollow\">crates.io<\/a>:\u00a0<strong>3,7 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430<\/strong><\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<h4>main.rs<\/h4>\n<pre><code class=\"rust\">use std::time::Duration; use tokio::time::sleep; use rocket::serde::json::Json;  #[macro_use] extern crate rocket;  #[derive(Debug, serde::Serialize, serde::Deserialize)] struct Data { payload: String }  #[post(\"\/test\/simple\", data = \"&lt;param>\")] async fn simple_endpoint(param: Json&lt;Data>) -> Json&lt;Data> { Json(Data { payload: format!(\"Hello, {}\", param.into_inner().payload) }) }  #[post(\"\/test\/timed\", data = \"&lt;param>\")] async fn timed_endpoint(param: Json&lt;Data>) -> Json&lt;Data> { sleep(Duration::from_millis(20)).await; Json(Data { payload: format!(\"Hello, {}\", param.into_inner().payload) }) }  #[post(\"\/test\/bcrypt\", data = \"&lt;param>\")] async fn bcrypt_endpoint(param: Json&lt;Data>) -> Json&lt;Data> { Json(Data { payload: bcrypt::hash(&amp;param.into_inner().payload, 10).unwrap() }) }  #[launch] fn rocket() -> _ { rocket::build() .configure(rocket::Config::figment() .merge((\"address\", \"0.0.0.0\")) .merge((\"port\", 3000)) ) .mount(\"\/\", routes![ simple_endpoint, timed_endpoint, bcrypt_endpoint ]) }<\/code><\/pre>\n<h4>Cargo.toml<\/h4>\n<pre><code>[package] name = \"rust_web_benchmark\" version = \"0.1.0\" edition = \"2021\"  [dependencies] tokio = \"1\" rocket = { version = \"0.5.0-rc.3\", features = [\"json\"] } serde = { version = \"1.0.189\", features = [\"derive\"] } bcrypt = \"0.15.0\"<\/code><\/pre>\n<h2>\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a<\/h2>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0435\u0435 N \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c M \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 URL. \u0418\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 (200 OK) \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445), \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u0414\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438).<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f tokio \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 reqwest.<\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<h4>main.rs<\/h4>\n<pre><code class=\"rust\">use reqwest::StatusCode;  static REQ_PAYLOAD: &amp;str = \"{\\n\\t\\\"payload\\\": \\\"world\\\"\\n}\\n\";  #[tokio::main] async fn main() -> Result&lt;(), Box&lt;dyn std::error::Error>> { let args = std::env::args().collect::&lt;Vec&lt;_>>(); if args.len() != 4 { println!(\"Usage: {} url thread-count request-count\", args[0]); return Ok(()); }  let url = args[1].clone(); let request_count = args[2].parse().unwrap(); let thread_count = args[3].parse().unwrap();  let client = reqwest::Client::new(); let start = std::time::Instant::now(); let handles = (0..thread_count).map(|_| { let url = url.clone(); let client = client.clone(); tokio::spawn(async move { let mut error_count = 0; let mut results = Vec::new(); for _ in 0..request_count { let start = std::time::Instant::now(); let res = client .post(&amp;url) .header(\"Content-Type\", \"application\/json\") .body(REQ_PAYLOAD) .send()<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-358151","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/358151","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=358151"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/358151\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=358151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=358151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=358151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}