{"id":170033,"date":"2013-02-20T08:25:03","date_gmt":"2013-02-20T04:25:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=170033"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=170033","title":{"rendered":"<span class=\"post_title\">Ruby \u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<b>\u0426\u0435\u043b\u044c: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Ruby.<\/b><\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e:<\/p>\n<p>   \u2014 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u0437\u044b\u0432\u0447\u0438\u0432\u043e\u0439 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c 100 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443<br \/>   \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 15GB RAM; \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 8-\u0438 \u044f\u0434\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0438\u0436\u0435 10-\u0438<br \/>   \u2014 \u00ab\u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f\u00bb \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u044b\u0445 \u0437\u0430\u0442\u0440\u0430\u0442<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  <b>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f:<\/b><\/p>\n<p>   \u2014 <a href=\"https:\/\/github.com\/espresso\/espresso\">Espresso<\/a> \u2014 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<br \/>   \u2014 <a href=\"http:\/\/rainbows.rubyforge.org\/\">Rainbows!<\/a> \u2014 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 streaming \u0438 forking<br \/>   \u2014 <a href=\"https:\/\/github.com\/eventmachine\/eventmachine\">EventMachine<\/a> \u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f I\/O \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f Ruby<\/p>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f Rainbows!:<\/p>\n<pre><code class=\"ruby\">Rainbows! do   use :EventMachine   keepalive_timeout  3600*12   worker_connections 128_000   client_max_body_size nil   client_header_buffer_size 512 end  worker_processes 8 <\/code><\/pre>\n<p>  Rainbows! \u0444\u043e\u0440\u043a\u043d\u0435\u0442 8 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u2014 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u044f\u0434\u0440\u043e \u2014 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u0438\u043d Ruby \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, <br \/>  \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441 \u043e\u0434\u043d\u0438\u043c Rainbows! \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u043c \u0438\u043b\u0438 \u0441 Thin \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c.<\/p>\n<p>  \u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"ruby\"> class App &lt; E   map '\/'    # index and status_watcher actions should return event-stream content type   before :index, :status_watcher do     content_type 'text\/event-stream'   end    def index     stream :keep_open do |stream|        # communicate to client every 15 seconds       timer = EM.add_periodic_timer(15) {stream &lt;&lt; &quot;\\0&quot;}        stream.errback do      # when connection closed\/errored:         DB.decr :connections # 1. decrement connections amount by 1         timer.cancel         # 2. cancel timer that communicate to client       end              # increment connections amount by 1       DB.incr :connections     end   end    # frontend for status watchers - http:\/\/localhost:5252\/status   def status     render   end    # backend for status watchers   def status_watcher     stream :keep_open do |stream|       # adding a timer that will update status watchers every second       timer = EM.add_periodic_timer(1) do         connections = FormatHelper.humanize_number(DB.get :connections)         stream &lt;&lt; &quot;data: %s\\n\\n&quot; % connections       end       stream.errback { timer.cancel } # cancel timer if connection closed\/errored     end   end    def get_ping   end end  <\/code><\/pre>\n<p>  <b>Ruby \u0432\u0435\u0440\u0441\u0438\u044f \u0438 \u0442\u0443\u043d\u0438\u043d\u0433<\/b><\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f MRI 1.9.3p385, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 rbenv.<\/p>\n<p>  \u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f Ruby \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c:<\/p>\n<pre><code class=\"bash\"># The initial number of heap slots as well as the minimum number of slots allocated. RUBY_HEAP_MIN_SLOTS=1000000  # The minimum number of heap slots that should be available after the GC runs. # If they are not available then, ruby will allocate more slots. RUBY_HEAP_FREE_MIN=100000  # The number of C data structures that can be allocated before the GC kicks in. # If set too low, the GC kicks in even if there are still heap slots available. RUBY_GC_MALLOC_LIMIT=80000000 <\/code><\/pre>\n<p>  JRuby \u043d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c:<\/p>\n<p>   \u2014 \u043d\u0435 \u0437\u043d\u0430\u044e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e\/\u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e JRuby \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 streaming<br \/>   \u2014 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435 \u0447\u0442\u043e JRuby \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 15GB RAM \u0434\u043b\u044f \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439<\/p>\n<p>  \u041f\u0440\u043e\u0431\u043e\u0432\u0430\u043b Rubinius 2.0.0rc1 1.9mode \u043d\u043e \u0431\u0435\u0437 \u0443\u0441\u043f\u0435\u0445\u0430 \u2014 segfault \u043f\u043e\u0441\u043b\u0435 ~10,000 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439.<br \/>  \u0427\u0442\u043e-\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 libpthread \u2014 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0443\u0441\u043f\u0435\u043b.<\/p>\n<p>  <b>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430<\/b><\/p>\n<p>  \u0412\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Ubuntu 12.04 \u2014 \u043b\u0435\u0433\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041d\u0430\u0434\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<p>  \/etc\/security\/limits.conf:  <\/p>\n<pre><code class=\"bash\">* - nofile 1048576 <\/code><\/pre>\n<p>  \/etc\/sysctl.conf:  <\/p>\n<pre><code class=\"bash\">net.ipv4.netfilter.ip_conntrack_max = 1048576 <\/code><\/pre>\n<p>  <b>\u041a\u0430\u043a \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u0435\u0441\u0442<\/b><\/p>\n<p>  <u>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/u><\/p>\n<p>  \u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c 1mc2 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code class=\"bash\">$ git clone https:\/\/github.com\/slivu\/1mc2 <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0433\u0435\u043c\u044b:  <\/p>\n<pre><code class=\"bash\">$ cd 1mc2\/ $ bundle $ rbenv rehash # in case you are using rbenv  <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Redis \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043d\u0444\u0438\u0433 \u0438\u0437 1mc2 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f:<\/p>\n<pre><code class=\"bash\">$ redis-server .\/redis.conf <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"bash\">$ .\/run <\/code><\/pre>\n<p>  <u>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u00ab\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432\u00bb:<\/u><\/p>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e 50 EC2 \u043c\u0438\u043a\u0440\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432.<\/p>\n<p>  \u041e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0421\u043f\u0430\u0441\u0438\u0431\u043e <a href=\"http:\/\/habrahabr.ru\/users\/ashtuchkin\/\"><a href=\"http:\/\/habrahabr.ru\/users\/ashtuchkin\/\" class=\"user_link\">ashtuchkin<\/a><\/a> \u0437\u0430 <br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/123154\/\">\u00ab\u041c\u0438\u043b\u043b\u0438\u043e\u043d \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 Node.js\u00bb<\/a> \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043b\u043e\u0442\u0430 EC2 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u2014 <a href=\"https:\/\/github.com\/ashtuchkin\/ec2-fleet\/\">ec2-fleet<\/a>!<\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u043e\u0440\u044f <b>ec2-fleet<\/b> \u043c\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0432\u0441\u0435\u0433\u043e 5 \u0441\u0442\u0440\u043e\u043a \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e-\u043f\u0440\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439:<\/p>\n<p>  \u0421\u0442\u0430\u0440\u0442\u0443\u0435\u043c 50 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432:  <\/p>\n<pre><code class=\"bash\">$ .\/aws.js start 50 <\/code><\/pre>\n<p>  \u0416\u0434\u0451\u043c \u043e\u043a\u043e\u043b\u043e \u0434\u0432\u0443\u0445 \u043c\u0438\u043d\u0443\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0441\u0451-\u043b\u0438 \u0433\u043e\u0442\u043e\u0432\u043e:  <\/p>\n<pre><code class=\"bash\">$ .\/aws.js status <\/code><\/pre>\n<p>  \u041d\u0430\u0442\u0440\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440:  <\/p>\n<pre><code class=\"bash\">$ .\/aws.js set host &lt;ip&gt; <\/code><\/pre>\n<p>  \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"bash\">$ .\/aws.js set port 5252 <\/code><\/pre>\n<p>  \u0417\u0430\u0434\u0430\u0451\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u2014 50 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u043f\u043e 20,000 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 1,000,000 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439:  <\/p>\n<pre><code class=\"bash\">$ .\/aws set n 20000 <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 <b><code>http:\/\/localhost:5252\/status<\/code><\/b><\/p>\n<p>  \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Chrome\/Firefox\/Safari\/Opera \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 ServerSentEvents.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/f82\/bb4\/f12\/f82bb4f128729f0f0abe3b2ff615d3a9.png\"\/><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0441\u043d\u0438\u043c\u043a\u0430, \u0432\u0441\u0435 \u0446\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u044b \u043d\u0430 \u0443\u0440\u0430:<\/p>\n<p>   \u2014 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 100 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443<br \/>   \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 15GB RAM \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0438\u0436\u0435 10-\u0438<br \/>   \u2014 \u00ab\u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f\u00bb \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 \u2014 \u0441\u043c\u043e\u0442\u0440\u0438 \u00abNetwork History\u00bb \u2014 ~3MB\/s in\/out<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0436\u0430\u043b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0447\u0430\u0441\u0430.<\/p>\n<p>  \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u043d\u0438 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u0438\u0441\u0447\u0435\u0437.<\/p>\n<p>  \u041d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0443\u0440\u043e\u0432\u043d\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  <b>\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439:<\/b><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/245\/dd1\/b86\/245dd1b86f40c0c6caa104e6b7cc0678.png\"\/><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/718\/643\/8dd\/7186438dd560434bc58080dd83d0e687.png\"\/><\/p>\n<p>  \u041a\u0430\u0436\u0434\u0443\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430.<br \/>  \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 60-\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0438 \u0435\u0441\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  \u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u0432\u0441\u0451 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u2014 \u0441\u043d\u0438\u043c\u043a\u0438 \u0434\u0435\u043b\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434(\u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 12-\u0433\u043e \u0441\u043b\u0430\u0439\u0434\u0430): <a href=\"https:\/\/speakerdeck.com\/slivu\/ruby-handling-1-million-concurrent-connections\">https:\/\/speakerdeck.com\/slivu\/ruby-handling-1-million-concurrent-connections<\/a><\/p>\n<hr\/>\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\/170033\/\"> http:\/\/habrahabr.ru\/post\/170033\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<b>\u0426\u0435\u043b\u044c: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Ruby.<\/b><\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e:<\/p>\n<p>   \u2014 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u0437\u044b\u0432\u0447\u0438\u0432\u043e\u0439 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c 100 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443<br \/>   \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 15GB RAM; \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 8-\u0438 \u044f\u0434\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0438\u0436\u0435 10-\u0438<br \/>   \u2014 \u00ab\u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f\u00bb \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u044b\u0445 \u0437\u0430\u0442\u0440\u0430\u0442<\/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-170033","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/170033","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=170033"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/170033\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=170033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=170033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=170033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}