You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
monitとは http://mmonit.com/monit/ http://labs.unoh.net/2008/03/_monit.html サーバに常駐してプロセス監視(pid,file,tcp/udp port checkなど)を行い、必要ならプロセス再起動とかしてくれるめちゃ便利なデーモン。 で、公式の例のような感じでこんな風に設定してるとする。 http://mmonit.com/wiki/Monit/ConfigurationExamples#apache check process apache with pidfile /usr/local/apache2/logs/httpd.pid group www start program = "/etc/init.d/httpd start" stop program = "/etc/init.d/httpd stop" i
(かきかけ)つい先日、surgemqの速さについての記事「SurgeMQ: MQTT Message Queue @ 750,000 MPS」が製作者本人により書かれ自分の周りのTLではにぎわいを見せました。 現時点ではまだまだ未実装な点が多いsurgemqですがgoでこの速度を達成した、ということは驚異に値します。 nsqdが約10万msg/sec、私のgoのmqttサーバーが4万msg/sec、ということで普通にgoでああいったTCPサーバーを書くと何もしないとSingle Coreで1〜2万に行くのがやっとこなはずなので凄さがわかると思います。 LMAX Disruptor style RingBuffer surgemqの実装周りの参考にしたのがLMAX DisruptorのRing Bufferだそうです。 Disruptorは高速な汎用QueueをRing Bufferを使って
今回はHTMLやCSS、Javascriptといった比較的軽量な静的コンテンツの配信をnginxでやるケースに絞ってチューニングする際のポイントについて紹介しようかと思います。 (注:worker_rlimit_nofileやsysctl.confのネットワーク周りの設定のような定石的なチューニングについてはあえて解説しないのであらかじめご了承ください。) コンテンツをgzip圧縮する 何はともあれgzip圧縮です。ネットワーク帯域に比べればCPUリソースなんて安いものです。 しかし、多くの場合これだけでは十分ではありません。何故ならnginxはデフォルトではContent-Typeがtext/htmlのコンテンツしか圧縮しないためです。圧縮対象のContent-Typeを増やすにはgzip_typesを使います。 単純なWebサイトであれば上記の設定で十分ですが、場合によってはappli
Ansible Tutorial July Tech Festa にて開催されたハンズオンの資料が公開されていたことに刺激され、Chef の代わりに Ansible を使う資料を作りました。 Ansible を使って WordPress サーバーのセットアップを行い、ServerSpec でテストを行います。 まだ Ansible を試し始めたばかりで自分の勉強がてら書いています。 Puppet にも Chef にも乗り遅れたので Ansible に飛び乗ってみようかと。 GitHub Repository Ansible Tutorial Wiki 2013年08月13日 一段落 コピペで動かないところを全体的に修正しました。今後は 詳細ページ Wiki を充実させていきます 2013年09月09日 role についての追記しました 2013年12月22日 リニューアル Ansible
これから Consul を使う方の参考になりましたら、というか自分のための整理です。 これは何? "Service discovery and configuration made easy. Distributed, highly available, and datacenter-aware." *訳:サービス検出と設定を簡単に。データセンタ間を意識した分散と高可用性。 Consul ( http://www.consul.io/ ) は、サービス検出や監視と設定を行うためのツール。Vagrant や Packer、Serf を製作している Hashicorp 社製のツールで、Go 言語で書かれており、オープンソース(Mozilla Public license, version 2.0)で公開されている。開発は GitHub を通してオープンに行われている。 Serf と Consu
Docker はただ LXC を再発明しているわけではないというお話。DotCloud のファウンダーによる stackoverflow の質問への回答。 LXC はネームスペースやコントロールグループ等の Linux カーネルケーパビリティ機能を利用し、プロセスを他のプロセスからサンドボックス化し、それらプロセスへのリソースの割当てをコントロールしている。Docker はこのローレベルのカーネル機能を軸に、以下のような機能を提供している。 LXC に対し Docker が提供している機能 どんなマシンへもポータブルデプロイ可能 Docker はアプリケーションをビルドするためのフォーマットが定義されており、その全ての依存関係を (Docker がインストールされている全てのマシンで動作する) 単一のオブジェクトに入れ、それはどこで実行してもアプリケーション実行環境が同一になります。LXC
Docker で開発環境を作る話 こんにちは、Docker 0.9 が出ましたね。 ちょっと Docker を触っていて幾つかアレな点があったので共有しておこうと思います。 その他も合わせてまとめてます。 私の Docker TIPS Docker を使って開発環境、および開発環境の土台を作る まあよくある Docker の使い方って nginx だの redis だのいろんなサーバーを構築する感じだと思いますが。 今回は開発環境を構築する話をしたいと思います。 よく dotfiles なんかを github においてーなんてことやってる方多いと思います。 もうここは思い切って Docker のイメージにしてしまいましょう。 利点 モテる なんかイケてる感じがする 案件、プロジェクト毎に個別環境をクリーンなまま維持できる みんな同じ環境で作業することができる(ライブラリのバージョンなどが揃
これまで、負荷テストの実行には専門知識と実行環境の準備に多くのコストが必要でした。社会からWebサービスの性能に関する不具合をゼロにするために、簡単、無料、圧倒的な負荷テストサービスを提供します。 ユーザビリティ サーバの応答速度は常に変化し、利用者の直帰率に大きく影響を与えます。サーバの応答速度を可視化し、日々計測することで、すみやかに問題個所を発見できます。 性能測定 サーバの性能不足により、せっかくの営業機会を失うサイトが多く存在します。サーバの性能を正しく把握することで、予測される負荷に応じたサーバの増強ができます。 負荷チェッカー/カレンダーを利用したテスト(ジョブ)の予約や、グラフィカルな結果画面を準備しており、初心者の方にも大変使いやすいサービス。インスタントテスト/URLを入力するだけで、すぐに負荷テストを行うことができます。シナリオテスト/ログインが必要なページや複数のペ
こんにちは!@at_grandpa です。 社内勉強会でdockerについて話す機会がありました。 以下に、勉強会で使用したスライドを載せます。 「dockerって聞いたことあるけどなんなんだ?」という人向けに作りました。 (自分もその立ち位置だったので) はじめてのdocker from at_grandpa 内容としては以下になります。 現在のサーバー運用が抱える問題 ( p.9 ) dockerを支える技術 ( p.56 ) AUFS LXC 実際にdockerを使う流れ ( p.85 ) pingとvimをインストールしてみる dockerのその他の機能 ( p.113 ) AUFSやLXCについては、以下のサイトが個人的にわかりやすかったです。 Dockerが利用しているAUFSとLXC スライド内で使用したURLはこちらです。 Docker: Linuxコンテナを使ってアプリ
Valentin V. Bartenev vbart at nginx.com Mon Jan 27 20:02:19 UTC 2014 Previous message: : [PATCH 0 of 1] Mail: add support for SSL client certificate Next message: [PATCH] SPDY/3.1 protocol implementation Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] http://nginx.org/patches/patch.spdy-v31.txt This patch upgrades implementation of SPDY protocol in the ngx_http_spdy_module from draf
スクリプトで一発簡単!iPhone/Android/Mac/Windowsから接続可能なL2TP/IPSecなVPN環境を構築する 2014/01/06 技術ネタ CentOS, L2TP/IPSec, VPN L2TP/IPSecサーバ構築の忘備録 喫茶店や街角の無料WiFiが信用出来ない時や海外での接続時など、 「悪い人が沢山いるインターネッツ怖い!」「今すぐVPNが使いたい!」 って時。意外とあると思います。 自分自身何度かそんな目にあった結果、何も考えずにコマンド一発でL2TP/IPSecなクライアントVPN環境を構築するスクリプトを紹介します。 (画像はイメージですが、オフィス内や自宅内に構築する事で、オフィスや自宅に安心して接続出来る環境を作る事もできます。) 最後に一応スクリプトの解説も載せておきます。 出先からの使い捨て用VPNではなく、長期で利用を検討している人は一部設定
背景 自前のサービスでhttps通信をサポートするには、SSL証明書が必要になります。 自分で使用するだけなら、SSL証明書も自前で作成するいわゆるオレオレ証明書を用いても良いのですが、外部に公開するサービスの場合そうとも行きません。 SSL証明書というと値段が高い印象がありましたが、StartSSLというサービスで無料でSSL証明書の発行を受けられると言うことで試してみました。 StartSSLにユーザー登録する 証明書の発行を行う前に、StartSSLにユーザー登録する必要があります。 StartSSLから、"StartSSL Free (Class1)"を選択します。 Certificate Control Panelを選択。 Sign-upに進みます。 名前、住所、メールアドレスなど 個人情報の登録を行います。 登録したメールアドレスに本人確認のメールが届くので、受信したメールのa
hashicorp/serf Serf Serf使ってますか!サーフ! 諸事情というか大人の事情で急遽自前でロードバランサを用意しないといけなくて、それをissueに書いてたら、 あんちぽさんがSerf+HAProxy使ったらいいのでは、 とIRCで助言をくれて、同日のmizzyさんのブログでもSerfに言及していたので、 ちょっとSerfの概要を知るためと、Serf+HAProxyが実際ロードバランサとしてどんな感じに使えるのか検証してみた。 I told @glidenote about a combination of Serf and HAProxy this morning, and he has already implemented the arch. and done investigation… — kentaro (@kentaro) October 29, 2013
varnish cache リバースプロキシ専用サーバ。キャッシュルールを細かく設定できるので、色々使えそうだし勉強がてら遊んでみた。 http://varnish-cache.org/wiki/Introduction http://varnish-cache.org/docs/ http://d.hatena.ne.jp/keita_yamaguchi/20080107/1199697651 http://dann.g.hatena.ne.jp/dann/20090628/p1 プロダクト環境で使ってなくて、backendはテスト用のapacheなので詳細なことはわかってないけど、まぁまぁ面白げ。 install ubuntuとかならaptで入る。テストサーバが古いfedora coreだったし、せっかくなのでsourceで入れてみた。 $ wget http://sourceforg
こんにちは。斎藤です。 ITインフラの障害は、多くの場合「予期せぬ」タイミングで発生します。特に、CPUリソースを多量に消費したり、Disk I/Oが輻輳している場合、その切り分けは困難な状況に陥りやすいものです。 そこで、本日はITインフラ、特にOS・ミドルウェアを支えるにあたって、問題解決を助けてくれるであろう12個のコマンドを取り上げてみます。「必ず押さえておきたい」5つのものと「更に覚えると便利なコマンド」7つの2節に分けてお話しします。 ※CentOS 6.4 (64bit)を前提に取り上げます 必ず押さえておきたいコマンド もしITインフラ管理者になりたてな方はぜひ サーバサイドのプログラマをやっていたのだけれど、ある日突然「君、サーバ管理担当ね!」と、バトンを渡される方っていらっしゃると思います。私も以前はそのクチでした...。そうなってしまったとき、まずは覚えておきたい5つ
Useful and less useful snippets, code, thoughts and stuff collected along the way. Follow Running wkhtmltopdf and wkhtmltoimage to create PDF files from HTML files on a Mac is easy and simple. When you need to install it on a non-mac production server a little bit of work is involved. The Problem: Installing it simply via sudo apt-get install wkhtmltopdf on Ubuntu will install a reduced functional
今更ながら、nginxにmapという機能があることを知った。 → HttpMapModule ということで、以下のことを試してみた。serverブロックの外側に以下のような記述を追加してみる(中に書くと怒られる)。 map $http_user_agent $myindex { default /index.html; ~(iPhone|Android) /index_sp.html; } んで、serverブロックの中のlocationの指定で location / { root /path/to/document/root; index $myindex; } って感じでindexの値をmapで指定した値に変えておくと、UserAgentに「iPhone」とか「Android」って入ってればindex_sp.htmlをインデックスファイルに、そうでなければindex.htmlをインデッ
人間とウェブの未来(旧) 「ウェブの歴史は人類の歴史の繰り返し」という観点から色々勉強しています。2014年までの人間とウェブの未来の旧ブログです。 久々のApache HTTP Server 2.4.1という安定版がリリースされたので、早速ベンチマーク評価を行う。今回はevent_mpmのExperimentがとれて、晴れてデフォルトMPMになったのでそれを使ってみたい。 日本一(ひょっとすると世界一)早いApache 2.4.1 event_mpmのレビューを意識してみた。 はじめに 個人的にも、event_mpmが採用されたことに最も注目している。event_mpmは非同期型のIO処理をしていて、nginxに近いアーキテクチャをとっている。厳密には、nginxの非同期と比べた場合、nginxは徹底的にノンブロッキング(accept4を使う等)してworkerスレッドで次々と並列処理し
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く