// Tutorial //How To Optimize Unicorn Workers in a Ruby on Rails App Introducing Unicorn If you are a Rails developer, you’ve probably heard of Unicorn, a HTTP server that can handle multiple requests concurrently. Unicorn uses forked processes to achieve concurrency. Since forked processes are essentially copies of each other, this means that the Rails application need not be thread safe. This is
EngineeringUnicorn!We've been running Unicorn for more than a month. Time to talk about it. What is it? Unicorn is an HTTP server for Ruby, similar to Mongrel or Thin. It… We’ve been running Unicorn for more than a month. Time to talk about it. What is it? Unicorn is an HTTP server for Ruby, similar to Mongrel or Thin. It uses Mongrel’s Ragel HTTP parser but has a dramatically different architectu
rails_deploy.md Rails デプロイ Ruby on Railsの欠点と言えば,デプロイ作業が若干面倒くさいところかもしれません. コンテンツを公開ディレクトリに設置してパーミッションを設定するだけでは動作しません. ここではRailsのデプロイ方法について簡単に紹介します. Rackライブラリ RackはRuby系のWebサーバやWebアプリケーションフレームワークで主に使われています. Rackは,WebサーバとWebアプリケーションをつなぐインターフェースの役割を果たすライブラリです. サーバ,アプリ共にRackで共通化してしまえば,どちらかを差し替えても問題なく動作します. つまり,Rackに対応していればどんなサーバでも,どんなフレームワークでも組み合わせることができるというわけです. RailsもこのRackを使用しているので,Rackに対応したサーバを使わない
{{toc_here}} はじめに Unicornは、Unix系システムで動作するRackアプリケーション用サーバ。接続時間が短いことを前提とした設計となっている。 - http://unicorn.bogomips.org/ preforkモデル Unicornはpreforkモデルを採用している。 Reverse Proxy └TCP Socket[0.0.0.0:8080] > Unicorn(Master) ├(fork)─Worker[0] < TCP Socket[0.0.0.0:8080] ├(fork)─Worker[1] < TCP Socket[0.0.0.0:8080] ┆ └(fork)─Worker[N-1] < TCP Socket[0.0.0.0:8080] マスタプロセスからforkした複数のワーカープロセスがあり、クライアントからのリクエストを
Strongly consider https://github.com/tmm1/gctools if using Ruby 2.1+ It is built on new APIs in Ruby 2.1, so it is more intelligent than this historical implementation. Ruby2.1+の場合は https://github.com/tmm1/gctools を使ってね、とのこと。 作者の記事: http://tmm1.net/ruby21-oobgc/ 日本語訳: http://www.sawanoboly.net/contribution/2014/3/13/ruby-21-out-of-band-gc READMEによるとruby2.1で提供されているapiとイベントを使ってGCの挙動を変更するらしい。したがってuni
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く