{"id":179629,"date":"2013-05-14T12:45:05","date_gmt":"2013-05-14T08:45:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=179629"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=179629","title":{"rendered":"<span class=\"post_title\">\u0411\u0438\u0442\u0432\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0435\u0440\u043e\u0432<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       \u00ab\u0411\u0438\u0442\u0432\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0435\u0440\u043e\u0432\u00bb \u2014 \u044d\u0442\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0435\u0440\u043e\u0432 \/ \u043f\u0440\u043e\u043a\u0441\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 WebSockets. \u0414\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0435\u0437\u0430\u043c\u0435\u043d\u0438\u043c\u044b \u043f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438:<\/p>\n<p>   \u2014 <a href=\"http:\/\/github.com\/nodejitsu\/node-http-proxy\/\">http-proxy<\/a>, \u0432\u0435\u0440\u0441\u0438\u044f: 0.10.0<br \/>   \u2014 <a href=\"http:\/\/haproxy.1wt.eu\/\">HAProxy<\/a>, \u0432\u0435\u0440\u0441\u0438\u044f: 1.5-dev18 (\u0434\u0435\u0432\u0435\u043b\u043e\u043f\u043c\u0435\u043d\u0442 \u0440\u0435\u043b\u0438\u0437)<br \/>   \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0439 \u201cecho \u0441\u0435\u0440\u0432\u0435\u0440\u201d, \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>  \u0411\u044b\u043b\u0438 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <a href=\"https:\/\/github.com\/dotcloud\/hipache\">hipache<\/a>. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d \u0431\u044b\u043b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u0430 \u2014 \u043e\u043d \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 <a href=\"https:\/\/github.com\/dotcloud\/hipache\/blob\/master\/package.json#L18-L23\">http-proxy<\/a>. \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0444\u043e\u0440\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0430\u0442\u0447\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. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b 3 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445, \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432\u0441\u0435 \u0445\u043e\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u043d\u0430 <a href=\"http:\/\/joyent.com\">joyent<\/a>.<\/p>\n<p>  1. \u041f\u0440\u043e\u043a\u0441\u0438, 512\u041c\u0431, Ubuntu \u0441\u0435\u0440\u0432\u0435\u0440. \u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0431\u044b\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u043e\u0431\u0440\u0430\u0437: sdc:jpc:ubuntu-12.04:2.4.0<br \/>  2. WebSocket-\u0441\u0435\u0440\u0432\u0435\u0440, 512\u041c\u0431 \u00ab\u0443\u043c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430\u00bb \u0441 Node.js, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u0440\u0443\u0442\u0438\u043b\u0441\u044f \u043d\u0430\u0448 WebSocket echo \u0441\u0435\u0440\u0432\u0435\u0440. \u0421\u0435\u0440\u0432\u0435\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Node.js \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044f\u0434\u0440\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f cluster \u043c\u043e\u0434\u0443\u043b\u044c. \u043e\u0431\u0440\u0430\u0437: sdc:sdc:nodejs:1.4.0<br \/>  3. Thor, 512\u041c\u0431, \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u00ab\u0443\u043c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430\u00bb \u043d\u0430 Node.js \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u043c\u0438, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443. \u0421 \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443. Thor \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 WebSocket \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"http:\/\/github.com\/observing\/thor\">http:\/\/github.com\/observing\/thor<\/a>.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>  \u041d\u0430\u0448\u0438\u043c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0431\u044b\u043b \u00ab\u0447\u0438\u0441\u0442\u044b\u0439\u00bb \u0441\u0435\u0440\u0432\u0435\u0440 c Ubuntu 12.04. \u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438. \u0427\u0442\u043e \u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438:<\/p>\n<pre><code class=\"bash\">apt-get upgrade  <\/code><\/pre>\n<p>  \u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<br \/>   \u2014 git \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c github<br \/>   \u2014 build-essential \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043a\u0441\u0438 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043e\u0431\u0437\u0430\u0432\u0435\u043b\u0438\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 WebSockets \u0438\u043b\u0438 HTTPS<br \/>   \u2014 libssl-dev \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 HTTPS<br \/>   \u2014 libev-dev \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f stud, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u0435\u043d<\/p>\n<pre><code class=\"bash\">apt-get install git build-essential libssl-dev libev-dev <\/code><\/pre>\n<p>  <\/p>\n<h5>Node.js<\/h5>\n<p>Node.js \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f http-proxy. \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a http-proxy \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Node.js, \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 0.8.19 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. Node.js \u0431\u044b\u043b \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d \u0441 github.<\/p>\n<pre><code class=\"bash\">git clone git:\/\/github.com\/joyent\/node.git cd node git checkout v0.8.19 .\/configure make make install <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 npm, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 npm install \u0432 \u043a\u043e\u0440\u043d\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 http-proxy \u0438 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<h5>Nginx<\/h5>\n<p>Nginx \u0443\u0436\u0435 \u0448\u0438\u0440\u043e\u043a\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u041e\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0431\u0435\u043a\u0435\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b WebSockets. \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u043c\u0435\u043d\u0442 \u0432\u0435\u0442\u043a\u0443 Nginx. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u043c\u0435\u043d\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432:<br \/>  <b>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b\u0448\u0435\u043b nginx 1.4.0, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 WebSockets. \u0422\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0412\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u044d\u0442\u043e \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435, \u043c\u043e\u0439 \u0441\u043e\u0432\u0435\u0442 \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 1.4.0. \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u0441\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. <\/b><\/p>\n<pre><code class=\"bash\">wget http:\/\/nginx.org\/download\/nginx-1.3.15.tar.gz tar xzvf nginx-1.3.15.tar.gz cd nginx-1.3.15 .\/configure --with-http_spdy_module --with-http_ssl_module \\ --pid-path=\/var\/run\/nginx.pid --conf-path=\/etc\/nginx\/nginx.conf \\ --sbin-path=\/usr\/local\/sbin --http-log-path=\/var\/log\/nginx\/access.log \\ --error-log-path=\/var\/log\/nginx\/error.log --without-http_rewrite_module <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0446\u0438\u0439, \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 SSL, SPDY \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0432\u044b\u0448\u043b\u0430 \u0442\u0430\u043a\u0430\u044f \u043e\u0431\u0449\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f:<\/p>\n<pre><code class=\"bash\">Configuration summary   + PCRE library is not used   + using system OpenSSL library   + md5: using OpenSSL library   + sha1: using OpenSSL library   + using system zlib library    nginx path prefix: &quot;\/usr\/local\/nginx&quot;   nginx binary file: &quot;\/usr\/local\/sbin&quot;   nginx configuration prefix: &quot;\/etc\/nginx&quot;   nginx configuration file: &quot;\/etc\/nginx\/nginx.conf&quot;   nginx pid file: &quot;\/var\/run\/nginx.pid&quot;   nginx error log file: &quot;\/var\/log\/nginx\/error.log&quot;   nginx http access log file: &quot;\/var\/log\/nginx\/access.log&quot;   nginx http client request body temporary files: &quot;client_body_temp&quot;   nginx http proxy temporary files: &quot;proxy_temp&quot;   nginx http fastcgi temporary files: &quot;fastcgi_temp&quot;   nginx http uwsgi temporary files: &quot;uwsgi_temp&quot;   nginx http scgi temporary files: &quot;scgi_temp&quot; <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<pre><code class=\"bash\">make make install <\/code><\/pre>\n<p>  <\/p>\n<h5>HAProxy<\/h5>\n<p>HAProxy \u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u0443\u043c\u0435\u043b\u0430 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c WebSockets \u0432 tcp \u0440\u0435\u0436\u0438\u043c\u0435, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0449\u0435 \u0438 \u0432 http \u0440\u0435\u0436\u0438\u043c\u0435. HAProxy \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 HTTPS. \u0422\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u043c \u043e\u043f\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u043c\u0435\u043d\u0442 \u0431\u0440\u0430\u043d\u0447.<\/p>\n<pre><code class=\"bash\">wget http:\/\/haproxy.1wt.eu\/download\/1.5\/src\/devel\/haproxy-1.5-dev18.tar.gz tar xzvf haproxy-1.5-dev18.tar.gz cd haproxy-1.5-dev18 make TARGET=linux26 USE_OPENSSL=1 make install <\/code><\/pre>\n<p>  <\/p>\n<h5>Stud<\/h5>\n<p>\u0425\u043e\u0442\u044f HAProxy \u0438 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c SSL-\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f SSL \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 HAProxy \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f stud. \u0418 \u044d\u0442\u043e \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c.<\/p>\n<pre><code class=\"bash\">git clone git:\/\/github.com\/bumptech\/stud.git cd stud make make install <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0414\u043b\u044f Nginx \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c nginx.conf \u0438\u0437 \u043a\u043e\u0440\u043d\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0432 \/etc\/nginx\/nginx.conf. \u0414\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u201c\u043d\u0430 \u043b\u0435\u0442\u0443\u201d.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044f\u0434\u0440\u0430<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u043a\u0441\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u044e\u043d\u043d\u0438\u043d\u0433 \u0441\u043e\u043a\u0435\u0442\u043e\u0432. \u042d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u044f \u0443\u0442\u044f\u043d\u0443\u043b \u0438\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430:<\/p>\n<pre><code class=\"bash\">vim \/etc\/sysctl.conf <\/code><\/pre>\n<p>  \u0418 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\"># General gigabit tuning: net.core.somaxconn = 16384 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 net.ipv4.tcp_syncookies = 1 # this gives the kernel more memory for tcp # which you need with many (100k+) open socket connections net.ipv4.tcp_mem = 50576   64768   98152 net.core.netdev_max_backlog = 2500 <\/code><\/pre>\n<h4>\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438\u043d\u0433<\/h4>\n<p>  \u041f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f 2 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u0430:<br \/>  1. \u041d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 SSL. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f WebSockets.<br \/>  2. \u041d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0441 SSL. \u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0435 WebSockets, \u0442.\u043a. \u0443 \u043d\u0438\u0445 \u043e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0445\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445. \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u043d\u044f\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 SSL-\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440.<br \/>  \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u043d\u0430\u0448\u0438\u043c \u0434\u0432\u0443\u043c \u0442\u0435\u0441\u0442\u0430\u043c \u043c\u044b \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439:<br \/>   \u2014 2k<br \/>   \u2014 5k<br \/>   \u2014 10k<br \/>  \u0410 \u0434\u043b\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0435\u0449\u0435 \u0438:<br \/>   \u2014 20k<br \/>   \u2014 30k<br \/>  \u041f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u043c \u0432\u0441\u0435 WebSocket \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f, \u0430 \u043f\u0440\u043e\u043a\u0441\u0438 \u2013 \u0440\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f. Thor \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 X-\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 100 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e UTF-8 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e, \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a<\/h4>\n<p>  <\/p>\n<h5>Stud<\/h5>\n<p>  <\/p>\n<pre><code class=\"bash\">stud --config stud.conf <\/code><\/pre>\n<p>  <\/p>\n<h5>HAProxy<\/h5>\n<p>  <\/p>\n<pre><code class=\"bash\">haproxy -f .\/haproxy.cfg <\/code><\/pre>\n<p>  <\/p>\n<h5>Nginx<\/h5>\n<p>  <\/p>\n<pre><code class=\"bash\">nginx <\/code><\/pre>\n<p>  <\/p>\n<h5>http-proxy<\/h5>\n<p>  <\/p>\n<pre><code class=\"bash\">FLAVOR=http node http-proxy.js <\/code><\/pre>\n<p>  <\/p>\n<h5>WebSocketServer<\/h5>\n<p>  <\/p>\n<pre><code class=\"bash\">FLAVOR=http node index.js <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<p>  http-proxy \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043b \u0441\u0432\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043e\u043d \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u043e \u0442.\u043a. \u043e\u043d \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 Node.js, \u043e\u043d \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u0430\u0436\u0435 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e node-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e 12+ \u041c\u0431 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f 10k \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u043a\u043e\u043b\u043e 70 \u041c\u0431 \u043f\u0430\u043c\u044f\u0442\u0438. \u0415\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u043c, HTTP \u043f\u0440\u043e\u043a\u0441\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043d\u0430 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0431\u043e\u043b\u044c\u0448\u0435. HTTPS, \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0441\u0430\u043c\u044b\u0439 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0432\u0435\u0434\u044c Node.js \u0441 \u0442\u0440\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u043e SSL. \u0418 \u044d\u0442\u043e \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0435\u0449\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e, \u0431\u0443\u0434\u0443\u0447\u0438 \u043f\u043e\u0434 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, \u043e\u043d \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0438\u043a\u043b(event loop).<br \/>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/github.com\/nodejitsu\/node-http-proxy\/pull\/370\">pull request<\/a> \u0434\u043b\u044f http-proxy, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u042f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b \u043f\u0430\u0442\u0447, \u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u044a\u0435\u0434\u0430\u0435\u043c\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u043d\u0438\u0437\u0438\u043b\u0430\u0441\u044c \u0432\u0434\u0432\u043e\u0435. \u041d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e, \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0430\u0442\u0447\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Nginx \u0447\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c \u0421. <br \/>  \u042f \u0432\u043e\u0437\u043b\u0430\u0433\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0430\u0434\u0435\u0436\u0434\u044b \u043d\u0430 Nginx, \u0438 \u043e\u043d \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u043b. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 10 \u041c\u0431 \u043f\u0430\u043c\u044f\u0442\u0438, \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043a\u043e\u0433\u0434\u0430 \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b Nginx, \u043e\u043d \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0443\u0436\u0430\u0441\u0442\u043d\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. Node \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b c SSL \u0447\u0435\u043c Nginx, \u0438 \u044f \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u043b, \u0447\u0442\u043e \u0442\u0443\u0442 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430, \u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0448\u0438\u0431\u0441\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Nginx. \u041f\u043e\u0441\u043b\u0435 \u043f\u0430\u0440\u044b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u043e\u0442 \u0434\u0440\u0443\u0437\u0435\u0439 \u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u2013 \u0431\u044b\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 openssl s_client -connect server:ip \u0432\u0441\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u043e (\u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 RC4). <br \/>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0431\u044b\u043b \u041d\u0410\u0420roxy, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u043a \u0438 NGINX, \u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043c\u0435\u043d\u044c\u0448\u0435 (7 \u041c\u0431) \u043f\u0430\u043c\u044f\u0442\u0438. <s>\u0421\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e HTTPS: \u043e\u043d \u0431\u044b\u043b \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439, \u0434\u0430\u0436\u0435 \u0431\u043b\u0438\u0437\u043a\u043e \u043d\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0441 Nginx. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e, \u0442.\u043a. \u043c\u044b \u043f\u043e\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u0441\u043a\u0438\u0439 \u0431\u0440\u0430\u043d\u0447.<\/s> \u0422\u0443\u0442 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u0430\u043a \u0438 \u0441 Nginx, \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043e \u0447\u0435\u043c \u043c\u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u043d\u0430 <a href=\"https:\/\/news.ycombinator.com\/item?id=5517258\">HackerNews<\/a>. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e HTTPS \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 stud \u043f\u0435\u0440\u0435\u0434 \u043d\u0438\u043c, \u0447\u0442\u043e\u0431 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>  http-proxy \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0433\u0438\u0431\u043a\u0430\u044f \u043f\u0440\u043e\u043a\u0441\u0438, \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u0430\u044f \u0438 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0430\u044f. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d \u044f \u0431\u044b \u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043d\u0435\u0439 stud \u0434\u043b\u044f \u0434\u043b\u044f SSL \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438.<br \/>  nginx \u0438 haproxy \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0442\u0440\u0443\u0434\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0431\u044b \u043a\u0442\u043e-\u0442\u043e \u0438\u0437 \u043d\u0438\u0445 \u0431\u044b\u043b \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0435. \u041d\u043e \u0435\u0441\u043b\u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0449\u0435 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0434\u043d\u0438\u043c nginx, \u0447\u0435\u043c \u0441\u043e stud \u0438 haproxy.<\/p>\n<h5>HTTP<\/h5>\n<table border=\"1\" cellpadding=\"5\">\n<tr>\n<th>Proxy<\/th>\n<th>Connections<\/th>\n<th>Handshaken (\u0441\u0440\u0435\u0434\u043d\u0435)<\/th>\n<th>Latency (\u0441\u0440\u0435\u0434\u043d\u0435)<\/th>\n<th>\u0412\u0441\u0435\u0433\u043e<\/th>\n<\/tr>\n<tr>\n<td>http-proxy<\/td>\n<td>10k<\/td>\n<td>293 \u043c\u0441<\/td>\n<td>44 \u043c\u0441<\/td>\n<td>30168 \u043c\u0441<\/td>\n<\/tr>\n<tr>\n<td>nginx<\/td>\n<td>10k<\/td>\n<td>252 \u043c\u0441<\/td>\n<td>16 \u043c\u0441<\/td>\n<td>28433 \u043c\u0441<\/td>\n<\/tr>\n<tr>\n<td>haproxy<\/td>\n<td>10k<\/td>\n<td>209 \u043c\u0441<\/td>\n<td>18 \u043c\u0441<\/td>\n<td>26974 \u043c\u0441<\/td>\n<\/tr>\n<tr>\n<td>\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e<\/td>\n<td>10k<\/td>\n<td>189 \u043c\u0441<\/td>\n<td>16 \u043c\u0441<\/td>\n<td>25310 \u043c\u0441<\/td>\n<\/tr>\n<\/table>\n<p><b>\u041f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c<\/b>: Nginx \u0438 HAProxy \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0438\u043c\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0431\u043b\u0438\u0437\u043a\u0438. <\/p>\n<h5>HTTPS<\/h5>\n<table border=\"1\" cellpadding=\"5\">\n<tr>\n<th>Proxy<\/th>\n<th>Connections<\/th>\n<th>Handshaken (\u0441\u0440\u0435\u0434\u043d\u0435)<\/th>\n<th>Latency (\u0441\u0440\u0435\u0434\u043d\u0435)<\/th>\n<th>\u0412\u0441\u0435\u0433\u043e<\/th>\n<\/tr>\n<tr>\n<td>http-proxy<\/td>\n<td>10k<\/td>\n<td>679 \u043c\u0441<\/td>\n<td>62 \u043c\u0441<\/td>\n<td>68670 \u043c\u0441<\/td>\n<\/tr>\n<tr>\n<td>nginx<\/td>\n<td>10k<\/td>\n<td>470 \u043c\u0441<\/td>\n<td>30 \u043c\u0441<\/td>\n<td>50180 \u043c\u0441<\/td>\n<\/tr>\n<tr>\n<td>haproxy<\/td>\n<td>10k<\/td>\n<td>464 \u043c\u0441<\/td>\n<td>25 \u043c\u0441<\/td>\n<td>50058 \u043c\u0441<\/td>\n<\/tr>\n<tr>\n<td>haproxy + stud<\/td>\n<td>10k<\/td>\n<td>492 \u043c\u0441<\/td>\n<td>42 \u043c\u0441<\/td>\n<td>52403 \u043c\u0441<\/td>\n<\/tr>\n<tr>\n<td>\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e<\/td>\n<td>10k<\/td>\n<td>703 \u043c\u0441<\/td>\n<td>65 \u043c\u0441<\/td>\n<td>71500 \u043c\u0441<\/td>\n<\/tr>\n<\/table>\n<p><b>\u041f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c<\/b>: Nginx \u0438 HAProxy \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0438\u043c\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0431\u043b\u0438\u0437\u043a\u0438.<\/p>\n<p>  \u0412\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e: <a href=\"https:\/\/github.com\/observing\/balancerbattle\/tree\/master\/results\">https:\/\/github.com\/observing\/balancerbattle\/tree\/master\/results<\/a><\/p>\n<h4>\u0412\u043a\u043b\u0430\u0434\u044b(Contributions)<\/h4>\n<p>  \u0412\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u044f \u0431\u044b\u043b \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.<\/p>\n<p>  P.S. \u0442.\u043a. \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434, \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u043a\u0430\u043a \u043f\u043e\u0441\u0442. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b <a href=\"https:\/\/github.com\/observing\/balancerbattle#readme\">\u0437\u0434\u0435\u0441\u044c<\/a>.        \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/179629\/\"> http:\/\/habrahabr.ru\/post\/179629\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       \u00ab\u0411\u0438\u0442\u0432\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0435\u0440\u043e\u0432\u00bb \u2014 \u044d\u0442\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0435\u0440\u043e\u0432 \/ \u043f\u0440\u043e\u043a\u0441\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 WebSockets. \u0414\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0435\u0437\u0430\u043c\u0435\u043d\u0438\u043c\u044b \u043f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438:<\/p>\n<p>   \u2014 <a href=\"http:\/\/github.com\/nodejitsu\/node-http-proxy\/\">http-proxy<\/a>, \u0432\u0435\u0440\u0441\u0438\u044f: 0.10.0<br \/>   \u2014 <a href=\"http:\/\/haproxy.1wt.eu\/\">HAProxy<\/a>, \u0432\u0435\u0440\u0441\u0438\u044f: 1.5-dev18 (\u0434\u0435\u0432\u0435\u043b\u043e\u043f\u043c\u0435\u043d\u0442 \u0440\u0435\u043b\u0438\u0437)<br \/>   \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0439 \u201cecho \u0441\u0435\u0440\u0432\u0435\u0440\u201d, \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>  \u0411\u044b\u043b\u0438 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <a href=\"https:\/\/github.com\/dotcloud\/hipache\">hipache<\/a>. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d \u0431\u044b\u043b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u0430 \u2014 \u043e\u043d \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 <a href=\"https:\/\/github.com\/dotcloud\/hipache\/blob\/master\/package.json#L18-L23\">http-proxy<\/a>. \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0444\u043e\u0440\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0430\u0442\u0447\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.   <\/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-179629","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/179629","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=179629"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/179629\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=179629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=179629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=179629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}