少し前にQiitaにこんなエントリが載っていました。問題としては、ELB配下に配置したApacheサーバで、レスポンスコード408で中身のないログが数秒おきに出続けるというものです。 AWS - ELBからの通信で408が多発する - Qiita この現象は、自分のところでも出ていて、このエントリにあるように公式フォーラムを見ても解決せず、原因がわからず困っていました。このエントリを見て、自分でも検証してみましたが、事象の分析としては、このQiitaのエントリにある内容の通りみたいです。 TCPコネクションを張ったあと、HTTPデータが来ないため、mod_reqtimeoutがDoSと判定して、apacheがコネクションを終了させている。 この件をググって見つけたのですが、qpstudyのリーダーこと、@iaraさんも2年前にこれを取り上げていますね。 Cloudpack night03
ELB配下のEC2インスタンスは接続元がELBのアドレスになる ELB配下のEC2インスタンスが、接続元のIPアドレスなど情報を得ようとする場合、初期設定ではおそらくELBのIPアドレスが返されてしまいます。これは、ELBを経由しているので当たり前といえば当たり前ですが、これではどこからアクセスされているのか把握できません。そこで、ELBの機能を利用して接続元のIPアドレス等を取得したいと思います。 X-Forwarded-ForとX-Forwarded-Proto ELBには市販されているロードバランサー製品と同じように、接続元のIPアドレスをヘッダー情報に付けてくれます。そこで、EC2インスタンス側でその情報を取得してログとして書き出してみます。また、ELBはSSLターミネーション機能がありますので、接続元がどのプロトコル(HTTPかHTTPSか)でEC2インスタンスにアクセスしたのか
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く