{"id":284231,"date":"2017-03-31T11:05:02","date_gmt":"2017-03-31T07:05:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=284231"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=284231","title":{"rendered":"\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 HTTP \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 Golang \u0438 Elixir. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/822\/a78\/2ca\/822a782ca92649978447b6d17e1eec3c.jpg\" alt=\"image\"\/><br \/>  \u041f\u0430\u0440\u0443 \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434, \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 <a href=\"https:\/\/golang.org\/doc\/articles\/wiki\/\">\u043f\u0440\u0438\u043c\u0435\u0440 HTTP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 Go<\/a> \u0438 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041f\u043e\u0442\u043e\u043c \u044f \u0441\u043c\u0435\u043b\u043e \u0432\u0437\u044f\u043b <a href=\"http:\/\/www.phoenixframework.org\/\">Phoenix<\/a>, \u043f\u0440\u043e\u0433\u043d\u0430\u043b \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u0442\u0435\u0441\u0442\u0430\u0445, \u0438 \u0440\u0430\u0441\u0441\u0442\u0440\u043e\u0438\u043b\u0441\u044f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0431\u044b\u043b\u0438 \u043d\u0435 \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 Elixir\/Erlang (45133 RPS \u0443 Go \u0438 \u0432\u0441\u0435\u0433\u043e 3065 RPS \u0443 Phoenix). \u041d\u043e Phoenix \u2014 \u044d\u0442\u043e \u0442\u044f\u0436\u0435\u043b\u043e. \u041d\u0430\u0434\u043e \u0447\u0442\u043e-\u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0432\u043d\u043e\u0435 \u043f\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0438 \u043b\u043e\u0433\u0438\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 Go: \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043f\u0443\u0442\u044c \u2014 &quot;\/&quot; \u0438 handler \u0434\u043b\u044f \u043d\u0435\u0433\u043e. \u041b\u043e\u0433\u0438\u0447\u043d\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0435\u0439 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 <a href=\"https:\/\/github.com\/ninenines\/cowboy\">cowboy<\/a> + <a href=\"https:\/\/github.com\/elixir-lang\/plug\">plug<\/a>, \u0433\u0434\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <a href=\"https:\/\/hexdocs.pm\/plug\/Plug.Router.html\">Router<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a \u0436\u0435 \u043b\u043e\u0432\u0438\u0442 &quot;\/&quot; \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0443\u0431\u0438\u043b\u0438 \u2014 Elixir\/Erlang \u043e\u043f\u044f\u0442\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code>Golang sea@sea:~\/go$ wrk -t10 -c100 -d10s http:\/\/127.0.0.1:4000\/ ...   452793 requests in 10.03s, 58.30MB read Requests\/sec:  45133.28 Transfer\/sec:      5.81MB<\/code><\/pre>\n<p>  <\/p>\n<pre><code>elixir cowboy plug sea@sea:~\/http_test$ wrk -t10 -c100 -d10s http:\/\/127.0.0.1:4000\/ ...   184703 requests in 10.02s, 28.57MB read Requests\/sec:  18441.79 Transfer\/sec:      2.85MB<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0436\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435? \u0414\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u044f \u043d\u0435 \u0441\u043f\u0430\u043b \u0438 \u043d\u0435 \u0435\u043b (\u043f\u043e\u0447\u0442\u0438). \u0412\u0441\u0435, \u0432\u043e \u0447\u0442\u043e \u044f \u0432\u0435\u0440\u0438\u043b \u0432\u0441\u0435 \u044d\u0442\u0438 \u0433\u043e\u0434\u044b: \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e vm erlang, \u0424\u041f, \u0437\u0435\u043b\u0435\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0442\u043e\u043f\u0442\u0430\u043d\u043e \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043d\u043e, \u0441\u043e\u0436\u0436\u0435\u043d\u043e \u0438 \u043f\u0443\u0449\u0435\u043d\u043e \u043f\u043e \u0432\u0435\u0442\u0440\u0443. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0439\u0434\u044f \u043e\u0442 \u0448\u043e\u043a\u0430, \u0443\u0441\u043f\u043e\u043a\u043e\u0438\u0432\u0448\u0438\u0441\u044c, \u0438 \u043f\u043e\u0434\u0442\u0435\u0440\u0435\u0432 \u0441\u043e\u043f\u043b\u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0430\u0442\u044c\u0441\u044f, \u0432 \u0447\u0435\u043c \u0434\u0435\u043b\u043e.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043f\u0435\u0448\u0438\u0442, \u0434\u0430\u043c \u043e\u0442\u0432\u0435\u0442 \u0441\u0440\u0430\u0437\u0443.<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\u0418 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0431\u044b\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0432\u043d\u0443\u0442\u0440\u0438 VirtualBOX, \u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u044f\u0434\u0440\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0434\u043d\u0430\u043a\u043e,<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\u0435\u0441\u043b\u0438 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432 \u0442\u0430\u043a\u0438\u0445 \u0438\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u0442\u043e Go \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e,<\/b><\/p>\n<div class=\"spoiler_text\">\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u043d\u0430 \u0431\u044b\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440<\/h4>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b. \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0441 Windows 7 x64, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 i7, 8 Gb RAM, \u0430 Linux \u2014 \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Ubuntu 16, \u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0432\u043d\u0443\u0442\u0440\u0438 VirtualBOX. \u0414\u043b\u044f \u043d\u0435\u0435 \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b 1 Gb RAM \u0438 2 \u044f\u0434\u0440\u0430. \u0412\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b HTTP \u0441\u0435\u0440\u0432\u0435\u0440, \u0438 \u043d\u0430 \u044d\u0442\u043e\u0439 \u0436\u0435 \u043c\u0430\u0448\u0438\u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/programs\/ab.html\">ab<\/a> \u0438 <a href=\"https:\/\/github.com\/wg\/wrk\">wrk<\/a>. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u0435, \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0442\u0435\u0441\u0442\u043e\u043c; \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0441\u0435\u0442\u0438 \u043d\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u043e \u0441\u0435\u0442\u0438 \u043d\u0435\u0442. <\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0430\u0437\u0433\u0440\u043e\u043c:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">go vs cowboy wrk -t10 -c100 -d10s http:\/\/127.0.0.1:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Go: sea@sea:~\/go$ wrk -t10 -c100 -d10s http:\/\/127.0.0.1:4000\/ Running 10s test @ http:\/\/127.0.0.1:4000\/   10 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    65.18ms  109.44ms   1.05s    86.48%     Req\/Sec     4.60k     5.87k   25.40k    86.85%   452793 requests in 10.03s, 58.30MB read Requests\/sec:  45133.28 Transfer\/sec:      5.81MB  Elixir cowboy: sea@sea:~\/http_test$ wrk -t10 -c100 -d10s http:\/\/127.0.0.1:4000\/ Running 10s test @ http:\/\/127.0.0.1:4000\/   10 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency     8.94ms   11.38ms 123.57ms   86.53%     Req\/Sec     1.85k   669.61     4.99k    71.70%   184703 requests in 10.02s, 28.57MB read Requests\/sec:  18441.79 Transfer\/sec:      2.85MB<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">go vs cowboy wrk -t10 -c1000 -d10s http:\/\/127.0.0.1:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Go: sea@sea:~\/go$ wrk -t10 -c1000 -d10s http:\/\/127.0.0.1:4000\/ Running 10s test @ http:\/\/127.0.0.1:4000\/   10 threads and 1000 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    61.16ms  231.88ms   2.00s    92.97%     Req\/Sec     7.85k     8.65k   26.13k    79.49%   474853 requests in 10.09s, 61.14MB read   Socket errors: connect 0, read 0, write 0, timeout 1329 Requests\/sec:  47079.39 Transfer\/sec:      6.06MB  Elixir cowboy: sea@sea:~\/http_test$ wrk -t10 -c1000 -d10s http:\/\/127.0.0.1:4000\/ Running 10s test @ http:\/\/127.0.0.1:4000\/   10 threads and 1000 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency   123.00ms  303.25ms   1.94s    88.91%     Req\/Sec     2.06k     1.85k   11.26k    71.80%   173220 requests in 10.09s, 26.79MB read   Socket errors: connect 0, read 0, write 0, timeout 43 Requests\/sec:  17166.03 Transfer\/sec:      2.65MB<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0437\u0430\u0449\u0438\u0442\u0443 Erlang\/Elixir \u2014 \u044d\u0442\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e timeout&#8217;\u043e\u0432. \u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 HiPE \u043d\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u043e \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443<\/p>\n<p>  <\/p>\n<h4>\u0422\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 v.2<\/h4>\n<p>  <\/p>\n<p>\u0421\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0430 \u043d\u0435 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 http \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u044b\u043b\u043e \u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u0430\u0431\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043c\u043e\u0433\u043b\u0430 \u043f\u043e \u043f\u043e\u043b\u043d\u043e\u0439 \u0437\u0430\u0432\u0430\u043b\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0434\u043e\u0432\u0435\u0434\u044f \u0435\u0433\u043e \u0434\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0441\u0435\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043f\u0435\u0440\u0435\u0442\u044c\u0441\u044f \u0432 \u0435\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043d\u043e\u0443\u0442\u0431\u0443\u043a \u043d\u0430 i7. \u0410 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043c\u0443\u0447\u0430\u0442\u044c Orange PI One. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043b, \u0447\u0442\u043e \u044f \u0441\u043a\u043e\u0440\u0435\u0435 &quot;\u0443\u043f\u0440\u0443\u0441\u044c&quot; \u0432 \u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0447\u0435\u043c \u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u043c\u0435\u043d\u0430 \u043f\u043e \u0441\u0435\u0442\u0438. Orange PI One \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0443 \u043f\u043e UTP \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 100 \u041c\u0431\u0438\u0442\/\u0441.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/398\/5b3\/c81\/3985b3c8153b4eebaf573409e5f4f237.jpg\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u043d\u0430 Orange PI One \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 A7 Quad Core \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 1200 \u041c\u0413\u0446. \u041d\u043e \u0438\u0437 \u0437\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0432\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442 \u043e\u0442 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u044f\u0434\u0440\u0430 \u043f\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u044f \u0437\u0430\u0436\u0430\u043b \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0434\u043e 600 \u041c\u0413\u0446. \u0422\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u043d\u043e \u0434\u0430\u0436\u0435 \u0441 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u044f, \u0435\u0435 load average: 2.00, 2.01, 2.05. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 Ubuntu 14. \u041f\u0430\u043c\u044f\u0442\u0438 512\u041c\u0431, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b swap \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u0444\u0430\u0439\u043b \u043d\u0430 \u0444\u043b\u0435\u0448\u043a\u0435.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/186\/479\/5e1\/1864795e11c44244957dbb5b5747f8b0.jpg\" alt=\"image&lt;h4&gt;\u0420\u0430\u0443\u043d\u0434 2&lt;\/h4&gt;\"\/><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Go \u0438 \u043d\u0430 Elixir \u043d\u0430 Orange PI, \u044f \u0441\u0440\u0430\u0437\u0443 \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u0432\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Github:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/UA3MQJ\/go-small-http\">https:\/\/github.com\/UA3MQJ\/go-small-http<\/a><br \/>  <a href=\"https:\/\/github.com\/UA3MQJ\/elx-small-http-cowboy\">https:\/\/github.com\/UA3MQJ\/elx-small-http-cowboy<\/a><\/p>\n<p>  <\/p>\n<p>Golang \u043d\u0430 Orange PI \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0410 \u0432\u043e\u0442 \u0441 Erlang\/Elixir \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041d\u043e \u044d\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e. \u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0448\u043b\u0438 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u044f \u0432\u0437\u044f\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0434 Windows \u2014 \u044d\u0442\u043e <a href=\"http:\/\/jmeter.apache.org\/\">Jmeter<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0436\u0435 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/450\/287\/ca4\/450287ca46344bacaa87ede74cccb95f.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u0441\u0438\u043b\u044b\u2026 \u0440\u0430\u0432\u043d\u044b!<\/p>\n<p>  <\/p>\n<p>RPS \u2014 Go:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/df8\/626\/d64\/df8626d6479f4e19820d3d1204952206.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>RPS \u2014 Elixir:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/25e\/8d1\/2b7\/25e8d12b7b0c4cbf9b6d295192673a82.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>Resp Time \u2014 Go:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/72b\/656\/18b\/72b65618b2d6428aa828aee195600b7c.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>Resp Time \u2014 Elixir:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c65\/3a1\/a6f\/c653a1a6f3fe4a44b6a2b75a059c4a2a.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<h4>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>  <\/p>\n<p>Go \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0441 \u043e\u0434\u043d\u0438\u043c \u044f\u0434\u0440\u043e\u043c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b71\/71f\/3ff\/b7171f3ff6cf40c1a67baa68b2bcc379.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043a\u0430\u043a Elixir \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0440\u0430\u0437\u0443:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e4e\/ed7\/bdb\/e4eed7bdbc0e4c2da77f6ca4babfc346.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0442\u0435\u0441\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e Elixir \u0432\u044b\u0438\u0433\u0440\u0430\u043b.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">go vs cowboy wrk -t10 -c100 -d10s http:\/\/192.168.1.16:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Go: sea@sea:~$ wrk -t10 -c100 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   10 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    19.04ms    7.70ms  81.05ms   70.53%     Req\/Sec   531.09     78.11   828.00     77.10%   52940 requests in 10.02s, 6.82MB read Requests\/sec:   5282.81 Transfer\/sec:    696.46KB  Elixir cowboy: sea@sea:~$ wrk -t10 -c100 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   10 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    14.27ms   10.54ms 153.60ms   95.81%     Req\/Sec   753.20    103.47     1.09k    80.40%   74574 requests in 10.04s, 11.53MB read Requests\/sec:   7429.95 Transfer\/sec:      1.15MB <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">go vs cowboy wrk -t100 -c100 -d10s http:\/\/192.168.1.16:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Go: sea@sea:~$ wrk -t100 -c100 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    60.14ms  137.57ms   1.52s    94.28%     Req\/Sec    38.45     20.62   130.00     60.30%   34384 requests in 10.10s, 4.43MB read Requests\/sec:   3404.19 Transfer\/sec:    448.79KB  Elixir cowboy: sea@sea:~$ wrk -t100 -c100 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    13.32ms    5.25ms  90.37ms   73.31%     Req\/Sec    75.51     22.04   191.00     67.49%   75878 requests in 10.10s, 11.74MB read Requests\/sec:   7512.75 Transfer\/sec:      1.16MB <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">go vs cowboy wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Go: sea@sea:~$ wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 500 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    93.81ms   18.63ms 328.78ms   84.98%     Req\/Sec    53.13     11.12   101.00     77.60%   52819 requests in 10.10s, 6.80MB read Requests\/sec:   5232.01 Transfer\/sec:    689.77KB  Elixir cowboy: sea@sea:~$ wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 500 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    93.24ms   96.80ms   1.26s    94.47%     Req\/Sec    62.95     23.33   292.00     79.87%   61646 requests in 10.10s, 9.53MB read Requests\/sec:   6106.38 Transfer\/sec:      0.94MB <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0440\u043b\u0430\u043d\u0433\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/erlang.org\/doc\/man\/HiPE_app.html\">HiPE<\/a>?<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0433\u0443\u0433\u043b\u0438\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 Erlang \u2014 \u044f\u0441\u043d\u043e\u0435 \u0434\u0435\u043b\u043e. \u041d\u043e \u043f\u0440\u043e Elixir \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c &quot;\u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0442\u044c&quot;. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0432\u0448\u0438\u0435 HiPE \u043f\u0438\u0448\u0443\u0442, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0432 HiPE \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u0435\u0435, \u0447\u0435\u043c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0431\u0435\u0437 HiPE (\u0430 \u043d\u0430\u0434\u043e \u0438 \u0438\u0445 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432 \u0442\u043e\u043c \u0436\u0435 \u0440\u0435\u0436\u0438\u043c\u0435), \u043f\u043b\u044e\u0441 \u043d\u0443\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0438 \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e, \u0442\u043e \u044d\u0442\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0445\u0443\u0434\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c HiPE<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ERL_COMPILER_OPTIONS=&quot;[native,{hipe, [verbose, o3]}]&quot; mix deps.compile --force<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ERL_COMPILER_OPTIONS=&quot;[native,{hipe, [verbose, o3]}]&quot; mix compile<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u0441\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e HiPE \u043d\u0435 \u0434\u0430\u0435\u0442 \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430, \u0430 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0445\u0443\u0434\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">cowboy vs cowboy(HiPE) wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Elixir cowboy: sea@sea-tpro:~$ wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 500 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    93.24ms   96.80ms   1.26s    94.47%     Req\/Sec    62.95     23.33   292.00     79.87%   61646 requests in 10.10s, 9.53MB read Requests\/sec:   6106.38 Transfer\/sec:      0.94MB  Elixir cowboy (HiPE): sea@sea-tpro:~$ wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 500 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency   111.84ms  160.53ms   1.89s    95.42%     Req\/Sec    59.19     29.68   383.00     81.63%   56425 requests in 10.10s, 8.72MB read   Socket errors: connect 0, read 0, write 0, timeout 34 Requests\/sec:   5587.39 Transfer\/sec:      0.86MB<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h4>Go \u043d\u0430\u043d\u043e\u0441\u0438\u0442 \u043e\u0442\u0432\u0435\u0442\u043d\u044b\u0439 \u0443\u0434\u0430\u0440<\/h4>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 Go \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440? \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043f\u0430\u043a\u0435\u0442 \u0441 Go, \u0447\u0442\u043e \u0438\u0434\u0435\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0435\u0449\u0435 Go \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440? \u0422\u0430\u043a \u0438 \u0435\u0441\u0442\u044c!<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sea@OrangePI:~$ go version go version go1.2.1 linux\/arm<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c!<br \/>  \u0421\u043e\u0431\u0440\u0430\u043d\u043d\u0443\u044e Go \u0432\u0435\u0440\u0441\u0438\u0438 1.7.3 \u0434\u043b\u044f armv7 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"https:\/\/github.com\/hypriot\/golang-armbuilds\/releases\"><a href=\"https:\/\/github.com\/hypriot\/golang-armbuilds\/releases\">https:\/\/github.com\/hypriot\/golang-armbuilds\/releases<\/a><\/a><\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 Golang, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0443\u0436\u0435 \u0432\u0441\u0435 4 \u044f\u0434\u0440\u0430:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f8b\/eb1\/cfb\/f8beb1cfb9094945bccdff1cc4a13105.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">cowboy vs Go1.7.4 wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Elixir cowboy: sea@sea:~$ wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 500 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    93.24ms   96.80ms   1.26s    94.47%     Req\/Sec    62.95     23.33   292.00     79.87%   61646 requests in 10.10s, 9.53MB read Requests\/sec:   6106.38 Transfer\/sec:      0.94MB  sea@sea:~\/tender_pro_bots$ wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 500 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    70.17ms   57.84ms 754.39ms   90.61%     Req\/Sec    84.09     31.01   151.00     73.20%   78787 requests in 10.10s, 10.14MB read Requests\/sec:   7800.43 Transfer\/sec:      1.00MB <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>Go \u0432\u044b\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u0435\u0440\u0435\u0434!<\/p>\n<p>  <\/p>\n<h4>Go \u0438 fasthttp<\/h4>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e Golang, \u043c\u043d\u0435 \u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b\u0438 <a href=\"https:\/\/github.com\/valyala\/fasthttp\">fasthttp<\/a> \u0438 gccgo. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/UA3MQJ\/go-small-fasthttp\"><a href=\"https:\/\/github.com\/UA3MQJ\/go-small-fasthttp\">https:\/\/github.com\/UA3MQJ\/go-small-fasthttp<\/a><\/a><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0433\u043b\u044f\u0434\u0438\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443. \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0432\u0441\u0435 4 \u044f\u0434\u0440\u0430, \u043d\u043e \u043d\u0435 \u043d\u0430 100%.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/165\/8cb\/5f6\/1658cb5f636642e8ba7be8b90b1165a0.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c wrk<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">go vs cowboy wrk -t10 -c100 -d10s http:\/\/192.168.1.16:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Go fasthttp: sea@sea:~\/tender_pro_bots$ wrk -t10 -c100 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   10 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    43.56ms   85.95ms 738.51ms   89.71%     Req\/Sec   676.18    351.12     1.17k    70.80%   67045 requests in 10.04s, 9.78MB read Requests\/sec:   6678.71 Transfer\/sec:      0.97MB  Elixir cowboy: sea@sea:~$ wrk -t10 -c100 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   10 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    14.27ms   10.54ms 153.60ms   95.81%     Req\/Sec   753.20    103.47     1.09k    80.40%   74574 requests in 10.04s, 11.53MB read Requests\/sec:   7429.95 Transfer\/sec:      1.15MB <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">go vs cowboy wrk -t100 -c100 -d10s http:\/\/192.168.1.16:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Go fasthttp: sea@sea:~\/tender_pro_bots$ wrk -t100 -c100 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency     8.95ms    3.08ms  42.23ms   75.69%     Req\/Sec   112.61     16.65   320.00     70.18%   112561 requests in 10.10s, 16.42MB read Requests\/sec:  11144.39 Transfer\/sec:      1.63MB  Elixir cowboy: sea@sea:~$ wrk -t100 -c100 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 100 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    13.32ms    5.25ms  90.37ms   73.31%     Req\/Sec    75.51     22.04   191.00     67.49%   75878 requests in 10.10s, 11.74MB read Requests\/sec:   7512.75 Transfer\/sec:      1.16MB <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">go vs cowboy wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">Go fasthttp: sea@sea-tpro:~\/tender_pro_bots$ wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 500 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    46.44ms   10.69ms 327.50ms   93.21%     Req\/Sec   107.71     15.10   170.00     82.06%   107349 requests in 10.10s, 15.66MB read Requests\/sec:  10627.97 Transfer\/sec:      1.55MB  Elixir cowboy: sea@sea:~$ wrk -t100 -c500 -d10s http:\/\/192.168.1.16:4000\/ Running 10s test @ http:\/\/192.168.1.16:4000\/   100 threads and 500 connections   Thread Stats   Avg      Stdev     Max   +\/- Stdev     Latency    93.24ms   96.80ms   1.26s    94.47%     Req\/Sec    62.95     23.33   292.00     79.87%   61646 requests in 10.10s, 9.53MB read Requests\/sec:   6106.38 Transfer\/sec:      0.94MB <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>Golang \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 fasthttp \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Elixir cowboy.<\/p>\n<p>  <\/p>\n<h4>\u041e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439<\/h4>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e cowboy \u0438 Go \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0430\u0439\u0442. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 HTTP Headers&#8217;\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u0432\u044b\u0434\u0430\u044e\u0442.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b\u0434\u0430\u0447\u0430 go:<\/p>\n<p>  <\/p>\n<pre><code>HTTP\/1.1 200 OK Date: Thu, 30 Mar 2017 14:37:08 GMT Content-Length: 18 Content-Type: text\/plain; charset=utf-8<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0434\u0430\u0447\u0430 cowboy:<\/p>\n<p>  <\/p>\n<pre><code>HTTP\/1.1 200 OK server: Cowboy date: Thu, 30 Mar 2017 14:38:17 GMT content-length: 18 cache-control: max-age=0, private, must-revalidate<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, cowboy \u0432\u044b\u0434\u0430\u0435\u0442 \u0435\u0449\u0435 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 &quot;server: Cowboy&quot;, \u0447\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0430\u0439\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 cowboy. \u041f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<p>  <\/p>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>  <\/p>\n<p>\u0410 \u0432\u044b\u0432\u043e\u0434\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0432\u043e\u0438. Go&#8217;\u0448\u043d\u0438\u043a\u0438 \u043f\u043e\u0440\u0430\u0434\u0443\u044e\u0442\u0441\u044f \u0437\u0430 Go, \u0430 \u042d\u0440\u043b\u0430\u043d\u0433\u0438\u0441\u0442\u044b \u0438 \u042d\u043b\u0438\u043a\u0441\u0438\u0440\u0449\u0438\u043a\u0438 \u2014 \u0437\u0430 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442. \u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0432\u043e\u0435\u043c. \u041f\u0440\u0438\u0432\u0435\u0440\u0436\u0435\u043d\u0435\u0446 Erlang \u0443\u0432\u0438\u0434\u0435\u043b \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c Go, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432\u044b\u0448\u0435 \u043d\u0435 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0438 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0432 2 \u0440\u0430\u0437\u0430 (\u043d\u043e \u0447\u0443\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d \u043d\u0435 \u043e\u0442\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Erlang \u0434\u0430\u0436\u0435 \u0440\u0430\u0434\u0438 10 \u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f Go&#8217;\u0448\u043d\u0438\u043a \u0432\u0440\u044f\u0434\u043b\u0438 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f Erlang, \u0432\u0438\u0434\u044f \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u0441\u043b\u044b\u0448\u0430\u0432 \u043f\u0440\u043e \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435, \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0440\u043e\u0433\u043e, \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 &quot;\u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445&quot; RPS \u043d\u0430 &quot;\u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439&quot; \u0437\u0430\u0434\u0430\u0447\u0435, \u043d\u043e \u0438 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u044f. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0442\u0430\u043a \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u043f\u0438\u0442\u044c \u043d\u0430 \u0432\u0441\u0435 <del>\u043b\u043e\u0448\u0430\u0434\u0438\u043d\u043d\u044b\u0435 \u0441\u0438\u043b\u044b<\/del> \u043c\u0435\u0433\u0430\u0433\u0435\u0440\u0446\u044b \u0438 \u0443\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0435\u0437\u0434\u043e\u0432 \u0432 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438! \u041e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u043a\u0430\u0442\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/17a\/f1f\/b57\/17af1fb574a9446b9baf9eb693639f7a.gif\" alt=\"image\"\/><\/p>\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:\/\/habrahabr.ru\/post\/324818\/\"> https:\/\/habrahabr.ru\/post\/324818\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/822\/a78\/2ca\/822a782ca92649978447b6d17e1eec3c.jpg\" alt=\"image\"\/><br \/>  \u041f\u0430\u0440\u0443 \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434, \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 <a href=\"https:\/\/golang.org\/doc\/articles\/wiki\/\">\u043f\u0440\u0438\u043c\u0435\u0440 HTTP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 Go<\/a> \u0438 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041f\u043e\u0442\u043e\u043c \u044f \u0441\u043c\u0435\u043b\u043e \u0432\u0437\u044f\u043b <a href=\"http:\/\/www.phoenixframework.org\/\">Phoenix<\/a>, \u043f\u0440\u043e\u0433\u043d\u0430\u043b \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u0442\u0435\u0441\u0442\u0430\u0445, \u0438 \u0440\u0430\u0441\u0441\u0442\u0440\u043e\u0438\u043b\u0441\u044f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0431\u044b\u043b\u0438 \u043d\u0435 \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 Elixir\/Erlang (45133 RPS \u0443 Go \u0438 \u0432\u0441\u0435\u0433\u043e 3065 RPS \u0443 Phoenix). \u041d\u043e Phoenix \u2014 \u044d\u0442\u043e \u0442\u044f\u0436\u0435\u043b\u043e. \u041d\u0430\u0434\u043e \u0447\u0442\u043e-\u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0432\u043d\u043e\u0435 \u043f\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0438 \u043b\u043e\u0433\u0438\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 Go: \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043f\u0443\u0442\u044c \u2014 &quot;\/&quot; \u0438 handler \u0434\u043b\u044f \u043d\u0435\u0433\u043e. \u041b\u043e\u0433\u0438\u0447\u043d\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0435\u0439 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 <a href=\"https:\/\/github.com\/ninenines\/cowboy\">cowboy<\/a> + <a href=\"https:\/\/github.com\/elixir-lang\/plug\">plug<\/a>, \u0433\u0434\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <a href=\"https:\/\/hexdocs.pm\/plug\/Plug.Router.html\">Router<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a \u0436\u0435 \u043b\u043e\u0432\u0438\u0442 &quot;\/&quot; \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0443\u0431\u0438\u043b\u0438 \u2014 Elixir\/Erlang \u043e\u043f\u044f\u0442\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code>Golang sea@sea:~\/go$ wrk -t10 -c100 -d10s http:\/\/127.0.0.1:4000\/ ...   452793 requests in 10.03s, 58.30MB read Requests\/sec:  45133.28 Transfer\/sec:      5.81MB<\/code><\/pre>\n<p>  <\/p>\n<pre><code>elixir cowboy plug sea@sea:~\/http_test$ wrk -t10 -c100 -d10s http:\/\/127.0.0.1:4000\/ ...   184703 requests in 10.02s, 28.57MB read Requests\/sec:  18441.79 Transfer\/sec:      2.85MB<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0436\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435? \u0414\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u044f \u043d\u0435 \u0441\u043f\u0430\u043b \u0438 \u043d\u0435 \u0435\u043b (\u043f\u043e\u0447\u0442\u0438). \u0412\u0441\u0435, \u0432\u043e \u0447\u0442\u043e \u044f \u0432\u0435\u0440\u0438\u043b \u0432\u0441\u0435 \u044d\u0442\u0438 \u0433\u043e\u0434\u044b: \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e vm erlang, \u0424\u041f, \u0437\u0435\u043b\u0435\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0442\u043e\u043f\u0442\u0430\u043d\u043e \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043d\u043e, \u0441\u043e\u0436\u0436\u0435\u043d\u043e \u0438 \u043f\u0443\u0449\u0435\u043d\u043e \u043f\u043e \u0432\u0435\u0442\u0440\u0443. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0439\u0434\u044f \u043e\u0442 \u0448\u043e\u043a\u0430, \u0443\u0441\u043f\u043e\u043a\u043e\u0438\u0432\u0448\u0438\u0441\u044c, \u0438 \u043f\u043e\u0434\u0442\u0435\u0440\u0435\u0432 \u0441\u043e\u043f\u043b\u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0430\u0442\u044c\u0441\u044f, \u0432 \u0447\u0435\u043c \u0434\u0435\u043b\u043e.<\/p>\n<p>  <\/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-284231","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/284231","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=284231"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/284231\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=284231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=284231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=284231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}