人間とウェブの未来(旧) 「ウェブの歴史は人類の歴史の繰り返し」という観点から色々勉強しています。2014年までの人間とウェブの未来の旧ブログです。 mod_mrubyでApacheのスコアボードのデータを取得できるようになりましたので、アクセス数やトラフィック量、及びリクエスト処理中のスレッド数の割合でアクセス制限が可能になりました。 ということで、早速mod_mrubyを使って、Apacheのアクセス制限を行うためのサンプルRubyスクリプトを書いてみました。Githubでもexample/で公開中です。Rubyスキルが低すぎるのでスクリプトに関するツッコミは程々でお願いします… Apacheの1秒間トラフィック量でアクセス制限 サンプルスクリプトは以下のようになります。 # LoadModule mruby_module modules/mod_mruby.so # Extended