ついカッとなって書いた。 タイトルにもある通り、ngx_bumpylifeはnginxでApache HTTP ServerのMaxRequestsPerChildに相当する挙動を実現するための拡張モジュールです。 さらに言うとap-mod_bumpy_lifeがやってるようなMaxRequestsPerChildの値を一定範囲内でランダムにする機能も合わせて提供します。bumpylifeという名前はこちらのモジュールから来ています。 使い方と動作解説 こんな感じで設定します。 ngx_bumpylifeは以下の3つのディレクティブを提供します。 bumpylife -> ngx_bumpylifeを有効/無効にする bumpylife_min -> nginxの各ワーカプロセスが終了するまでに処理するリクエスト数の下限値 bumpylife_max -> nginxの各ワーカプロセスが終
nginxのアクセスログやエラーログをsyslogに直接飛ばす機能は商用版のNGINX Plusでのみ提供されていたのだが、1.7.1でオープンソース版にもその機能が取り込まれた。 CHANGES Changes with nginx 1.7.1 27 May 2014 *) Feature: the "error_log" and "access_log" directives now support logging to syslog.早速試してみた。 docker-nginx syslogサーバのホスト名は仮にlogserverとする。 Dockerfile FROM centos:latest ADD nginx.repo /etc/yum.repos.d/ RUN yum install -y nginx ADD access_log.conf /etc/nginx/conf.d
HTTP Live Streaming(HLS)配信の基本的な手順をまとめます。 去年の記事 「NginxのHTTP Pseudo-Streamingを試す」 ではNginxの疑似ストリーミング配信モジュールを試してみましたが、機能不足のため実サービスで使うのは難しいです。そのためWebサーバでストリーミング配信を行いたい場合は今回紹介するHLSなどの利用が推奨されます。 HTTP Live Streaming(HLS)とは Apple公式のドキュメントを読む方が理解は進むと思いますが、一応ここでも簡単に概要を。 HTTP Live Streaming (also known as HLS) is an HTTP-based media streaming communications protocol implemented by Apple Inc. HTTP Live Streami
[Infrataster] InfratasterでNginxのルーティングのテスト書いてるサーバーのテストはServerspecで書いているんだけど、Nginxの設定ファイルで書いているウェブサーバーのルーティングのテストをどうしようかと思っていました。自分で、簡単なツールでも書くべきかなあと。 /path/to/app でアプリケーションにプロクシーする 但しcookieがない場合は静的ファイルをサーブする /path/to/static/file で静的ファイルをNginxが直接サーブする /path/to/health/check でヘルスチェック用のレスポンスを返す、但しHTTPヘッダーを見て普通のブラウザーアクセスではForbiddenにする バーチャルドメインごとに微妙にパスとかが違う みたいなルーティングのテストは、外側からのテストなのでちょっとServerspecのスコー
Libmodsecurity is one component of the ModSecurity v3 project. The library codebase serves as an interface to ModSecurity Connectors taking in web traffic and applying traditional ModSecurity processing. In general, it provides the capability to load/interpret rules written in the ModSecurity SecRules format and apply them to HTTP content provided by your application via Connectors. If you are loo
こんにちは、@tkuchiki です。 このエントリーは tech.kayac.com Advent Calendar 2013、9 日目のエントリーです。 本エントリーでは、弊社で主に利用している Web サーバ (Nginx) の bundle OpenResty について簡単に紹介したいと思います。 OpenResty OpenResty (ngx_openresty) は、lua-nginx-module を始めとする多数の 3rd party module を内包した Nginx です。 作者は、lua-nginx-module のメンテナを務める agentzh さんです。 lua-nginx-module Nginx を Lua / LuaJIT で処理するためのモジュールです。 API は 全て Non-Blocking I/O で書かれています。 使用したモジュール 以下
Maxim Dounin mdounin at mdounin.ru Tue Nov 19 15:02:26 UTC 2013 Previous message: [nginx-announce] nginx-1.4.4 Next message: [nginx-announce] nginx-1.5.8 Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hello! Ivan Fratric of the Google Security Team discovered a bug in nginx, which might allow an attacker to bypass security restrictions in certain configurations by using a specially
人間とウェブの未来(旧) 「ウェブの歴史は人類の歴史の繰り返し」という観点から色々勉強しています。2014年までの人間とウェブの未来の旧ブログです。 論文や発表が少し落ち着いたので、研究の実装を再開しています。 そこでふと思ったのですが、そういえばngx_mrubyとlua-nginx-moduleのパフォーマンス比較していないなぁと思いました。でも、今検証環境が色々あって揃っていないので微妙だなぁと思いつつも、やっぱり気になると試さずにはいられないたちなので、簡単なhello worldのベンチマーク比較をしてみました。 ngx_mrubyとlua-nginx-moduleの導入 検証環境がないので一から導入しました。意外と簡単ですね。 [program lang=’bash’ escaped=’true’] wget http://nginx.org/download/nginx-1.
Analytics cookies are off for visitors from the UK or EEA unless they click Accept or submit a form on nginx.com. They’re on by default for everybody else. Follow the instructions here to deactivate analytics cookies. This deactivation will work even if you later click Accept or submit a form. Check this box so we and our advertising and social media partners can use cookies on nginx.com to better
人間とウェブの未来(旧) 「ウェブの歴史は人類の歴史の繰り返し」という観点から色々勉強しています。2014年までの人間とウェブの未来の旧ブログです。 ようやくngx_mrubyでもmod_mrubyのように動的なリバースプロキシ設定ができるようになりました。タイトルは完全に@hibomaさんによる「lua-nginx-module の紹介 ならびに Nginx+Lua+Redisによる動的なリバースプロキシの実装案」をパク … inspireしたものになっています。 今回の工夫点としては、 ngxin内部の変数をうまく使う redisとのセッションはnginx起動時に一度だけ行なって、そのオブジェクトを使いまわす proxy_passを使って汎用的な設定にする の3点です。 1に関しては、前回の「ngx_mrubyでnginxの内部変数を操作する」で紹介しました。 2に関しては、リクエスト
今更ながら、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をインデッ
非常にレアなケースですが、僕はそのケースにヒットどころかホームランしてしまったのでブログに残しておきます。 どうやら、nginxの1.1.9以前のバージョンだとDNSキャッシュを独自で持ってTTLを無視する動作をします。 nginxのCHANGEには以下のように記述されています。 Changes with nginx 1.1.9 28 Nov 2011 *) Change: now double quotes are encoded in an "echo" SSI-command output. Thanks to Zaur Abasmirzoev. *) Feature: the "valid" parameter of the "resolver" directive. By default TTL returned by a DNS server is used. Thanks t
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx. Generally, properly configured nginx can handle up to 400,000 to 500,000 requests per second (clustered), most what i saw is 50,000 to 80,000 (non-clustered) requests per second and 30% CPU load, course, this was 2xIntel Xeon with HT enabled, but it can work without problem on slower mach
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く