なんか、2/6 の夜に「修士論文の代わりに退学願を提出してきた」が Twitter でばずったらしく、Yahoo 砲よろしく突如としてアクセスが集中しました。下の方にリソースモニタリングのグラフを貼りつけてますが、今までがほぼ 0 に見えてしまうくらいに来てたのでびっくりでした。 まぁ色々コメントつけて頂いたりしてますが、もう2 年も前なんでこのエントリについて今更僕から突っ込むことは無くて、あのエントリはあのエントリとして見て頂ければと思います。ここでは今回そんな突然のアクセス集中にも見事耐えてくれたさくら VPS に感謝しつつ、アクセス集中の状況を鯖管的立場から分析してみましょう。 ちなみに、以前エントリに書いていますがサーバの構成としてはさくら VPS1 台で、CentOS+Apache+mod_fastcgi+PHP-FPM+MySQL5.5(InnoDB)で WordPress
nginxとは? nginxはロシアで開発されている軽量で高速なWebサーバです。 現在シェアは 7% 近くあるようです。もちろんApacheに比べれば少ないですが、Apache 55%、IIS 25%, nginx 7%で3番目に使われているWebサーバになります。 昔は、Pound+Lighttpd+Apacheの組み合わせをよく使っていましたが、ここ数年はnginx+Apacheとかになりました。 主に、静的コンテンツをnginxが受け持ち、PHPなどの動的コンテンツはApacheに渡す形になります。Railsを使う場合は、nginx+Unicornの組み合わせが多いです。 いまさらな感じもありますが、インフラ周りの見直しも含めて紹介したいと思います。 静的コンテンツをnginxに任せる nginx+Apacheの場合の設定は次のようになります。(nginxがport 80、Apac
Google の Page Speed の Apache module 版 mod_pagespeed をインストールして、ちょっとだけ動きを見てみた。 インストールは Ubuntu に deb パッケージで。 $ wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb # sudo dpkg -i mod-pagespeed-beta_current_amd64.debconfig はデフォルトで入るものそのまま。 <IfModule pagespeed_module> SetOutputFilter MOD_PAGESPEED_OUTPUT_FILTER ModPagespeed on ModPagespeedUrlPrefix "http://localhost/mod_p
仕事で画像キャッシュサーバーを構築した時のメモ。大規模事例の設定例が検索してもあまり見つからなかったので同じような境遇の誰かの参考になれば。 ピーク時のトラフィックは数Gbps 画像総容量は数十TB バックエンドのstorageが複数種類 規模とアクセス量とアクセスされる画像の種類が多いので、squidでdisk cacheを使用するとCOSS等を使用してもdiskIOで詰まる為、全てon memory cache。cache容量を確保する為に必然的にcacheサーバーの台数も数十台。 1. squidをsibling構成で並列に並べる cache_peer 10.0.1.1 sibling 80 3130 no-query no-digest proxy-only cache_peer 10.0.1.2 sibling 80 3130 no-query no-digest proxy-o
Plack::Server::Standalone 系を使ってウェブアプリケーション開発と運用が楽になる話 - JPerl Advent Calendar 2009 Perl に関するちょっとした Tips をのっけてみるよ。ちゃんと続くかな? 既存の環境に対する不満 Perl のウェブアプリケーションを構築するにあたっては、リバースプロキシと mod_perl を組み合わせるか、あるいは FastCGI (ExternalServer) を利用するのが一般的だと思います。しかし、どちらをとっても、環境を構築して設定するのが難しいというのが個人的な不満でした (mod_redirect を設定したり mod_fastcgi にパッチをあててインストールしたり startup.pl を書いたり...)。自分が Plack の開発 (主に Server::Standalone と Server
YAPC::Asia 2009 第一日目で「『Ficia』インフラとPerlにまつわるエトセトラ」というタイトルでしゃべってきましたのでその資料を公開します。 『Ficia』インフラとPerlにまつわるエトセトラView more documents from Masaaki HIROSE. 他の方のスライドも http://www.slideshare.net/event/yapcasia-2009 から参照できるようでっす。 以下、今回のトークの内容で参考にさせてもらったURLのリストです。 Linux のプロセスが Copy on Write で共有しているメモリのサイズを調べる - naoyaのはてなダイアリー http://d.hatena.ne.jp/naoya/20080212/1202830671 mod_perl における C10K Problem, 竹迫 良範 http
10分で、といいながらたぶん mod_perl と Apache2 をビルドするのに 10 分以上かかるという罠。まあいいや。以下のやり方で Linux、MacOSX どちらでもちゃんと動くと思われます。 まず、mod_perl 2.0 のインストール。DSO でもいいけど、ここでは Apache にスタティックに組み込みます。 インストールディレクトリは /usr/local/httpd_mp2 に。 MPM は prefork。perl を thread 有効でビルドしてるなら mpm=worker でもいいと思います。 $ wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz $ wget http://www.apache.org/dist/httpd/httpd-2.0.55.tar.gz $ tar zxvf
第1回 CGMサイト構築で悩む負荷対策と拡張性の確保 林田 幸一 株式会社Cuon 2008/8/4 Rubyを使った大規模エンタープライズ開発が始まっている。Ruby on Railsでの開発において、インフラやアプリケーションアーキテクチャをどのように構成すべきかを考える(編集部) 最近、Ruby on Rails(RoR)で構築されているCGM(Consumer Generated Media)サイトやコミュニティサイトが確実に増えてきている。例を挙げるまでもないが、Twitter、食べログ、iknowなどだ。 RoRの採用の理由として、 実験的なプロジェクトとして。最近評判のRoRを次期言語・フレームワークとして評価するため 人材採用のためのコマーシャル 開発リーダーやマネージャが純粋にRuby好き など、会社レベルから個人レベルまでさまざまな採用理由が存在する。 われわれの会社(
あなたは自分の会社のウェブサイトをサービスするApacheをインストールしたところだとしよう。Apacheはスムーズに動作しており、万が一の場合にもLinuxのセーフティネットが助けになるはずだと思う。ところが、2週間ほど経ったところで、いろいろとおかしなことが起こり始める。なぜだろう。ApacheとLinuxを使っているのに・・・おかしくなることなどあるだろうか? もちろん、注意を払わなければ、おかしくなることはいくらでもあり得る。Apacheを安全にする方法はあるが、もちろん何もしなければ安全にはならない。以下に示すのは、Apacheをより安全なウェブサーバにするための簡単な10の方法だ。 #1: とにかくアップデート LinuxでApacheを動かしているからと言って、アップデートが不要だということにはならない。常に新しいセキュリティホールやリスクが登場している。あなたは、最新のパッ
naoya です。最近、とうとう花粉症の季節に入ったので、生まれて初めて空気清浄機を購入しました。 さて、今日は Apache HTTP サーバの MPM (Multi Processing Module) について解説したいと思います。普段、ウェブサーバを構築するとき、Apache HTTP サーバを使うことが多いと思いますが、Apache HTTP サーバを使う上で MPM について理解しておくことは大事です。 この MPM ですが、Apache HTTP サーバではリクエストを処理する部分のことをさします。MPM は、Apache HTTP サーバ 2.0 系から採用されています。Apache HTTP サーバの MPM には、次の種類があります。 prefork worker perchild winnt それぞれの MPM について解説します。まずは、一番代表的な prefork
サキとは彼女の自宅近く、湘南台駅前のスーパーマーケットで待ち合わせをした。彼女は自転車で後から追いつくと言い、僕は大きなコインパーキングへ車を停めた。煙草を一本吸ってからスーパーマーケットへ向かうと、ひっきりなしに主婦的な女性かおばあちゃんが入り口を出たり入ったりしていた。時刻は午後5時になる。時計から目を上げると、待たせちゃったわねと大して悪びれてない様子でサキが手ぶらでやってきた。 お礼に料理を作るとはいえ、サキの家には食材が十分足りていないらしく、こうしてスーパーマーケットに寄ることになった。サキは野菜コーナーから精肉コーナーまで、まるで優秀なカーナビに導かれるように無駄なく点検していった。欲しい食材があると、2秒間程度それらを凝視し、一度手に取ったじゃがいもやら豚肉やらを迷うことなく僕が持っているカゴに放り込んだ。最後にアルコール飲料が冷やされている棚の前へ行くと、私が飲むからとチ
Perlで書かれており、RRD Toolと連携して、サーバに関するあらゆる情報をグラフ化し、HTMLを作ってくれます。MRTGよりも圧倒的にインストールも設定も簡単。グラフ化する対象はプラグインで簡単に拡張可能。 グラフ化できるのは、初期状態でディスク使用量・MySQL・IOstat・トラフィック・プロセス数・VMstat・CPU温度・CPU使用率・ロードアベレージ・メモリ使用率・スワップ・Netstat・HDD温度など。プラグインを追加することでさらにApacheのロードタイム・メールキュー・Asterisk・NFSクライアント・BIND・ColdFusion・DNSキャッシュ・MySQLの各種数値・PostgreSQL・印刷キュー・ProFTP・Qmail・電圧・S.M.A.R.T.・SpamAssassin・Tomcat・Tor・Windows Server・VMware・Xenなど
最近、雨の日が続いて自転車通勤ができていない naoya です。 今日は、先週ぐらいからフォト蔵に導入した Apache で mod_expires と mod_rewrite を使ったウェブサーバへのアクセスを減らす方法を紹介します。 通常のウェブサーバは、更新されていないリリースに対してアクセスすると、ステータスコード 304 とIf-Modified-Since ヘッダをつけて応答データを返しますが、CSS や JavaScript など比較的更新頻度の少ないファイルに対して、毎回応答を返すのはウェブサーバから見ると無駄なアクセスです。 Apache の mod_expires と mod_rewrite を使うと、この無駄なアクセスをブラウザキャッシュを有効活用にすることにより、静的なファイルに対するアクセスを減らすことができます。 まず、仕組みから説明すると、とても単純で mod
ApacheCon US 2007の、『Apache Performance Tuning / Part One: Scaling Up』, Sander Temme (PDF) より。 ab おなじみ、Apache付属のあいつ http_load http://www.acme.com/software/http_load/ flood http://httpd.apache.org/test/flood/ JMeter http://jakarta.apache.org/jmeter/ 最近のバージョンは使いやすくなったらしい あと、ほかには httperf http://www.hpl.hp.com/research/linux/httperf/ とか。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く