More Related Content
PDF
PPTX
PDF
PDF
PPT
PDF
PPTX
PDF
HTTP/2 でリバプロするだけでグラフツールを 高速化できた話 What's hot
PPTX
PDF
PDF
PDF
PPTX
OpenShift from Easy way to Hard ? Way PDF
PPTX
PDF
PPTX
Dockerと外部ルータを連携させる仕組みを作ってみた PDF
【19-C-L】Web開発者ならおさえておきたい「常時SSL/TLS化の実装ポイント」 PDF
第2回Web技術勉強会 webパフォーマンス改善編 PDF
PDF
PPTX
PDF
PDF
PDF
PDF
PDF
Open flow tunnel extension on lagopus vswitch PDF
HTTP2 時代の Web - web over http2 Viewers also liked
PDF
Developing the fastest HTTP/2 server PPTX
A Long Walk to Water: Lesson4 unit2 PDF
PDF
Connect the Dots: Set yourself apart in a saturated market. PDF
Reorganizing Website Architecture for HTTP/2 and Beyond RTF
2010 National Latin Exam Information PDF
SDCSB CYTOSCAPE AND NETWORK ANALYSIS WORKSHOP at Sanford Consortium PDF
Gazelle - Plack Handler for performance freaks #yokohamapm PPT
Unix Programming with Perl KEY
PPTX
The changing landscape, a personal view for OER Wales PDF
Standardisierte Medizinische Übergaben - Wie lernen, lehren und implementiere... PPT
PDF
PPT
PPT
PPTX
PDF
PPSX
Donde esta el Dios de justicia PPT
More from Kazuho Oku
PPTX
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先 PPTX
Recent Advances in HTTP, controlling them using ruby PDF
H2O - the optimized HTTP server PPTX
JSX 速さの秘密 - 高速なJavaScriptを書く方法 PDF
PPTX
JSON SQL Injection and the Lessons Learned PPTX
PPTX
PPT
Unix Programming with Perl 2 PDF
PPTX
PPTX
Programming TCP for responsiveness PDF
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜 PPTX
Cache aware-server-push in H2O version 1.5 PDF
H2O - making the Web faster PPTX
PPTX
JSX Design Overview (日本語) PDF
Programming TCP for responsiveness PDF
JSX - developing a statically-typed programming language for the Web PPTX
Webアプリケーションの無停止稼働
- 1.
- 2.
- 3.
要旨 高負荷・大規模環境における、プリフォーク型アプリサーバの fork 負荷問題について 以下のタイミングおける fork 処理の分散する手法 ワーカープロセス回収時 アプリケーション再起動時 Server::Starter, Parallel::Prefork, Starlet による実装と運用法 Web アプリケーションの無停止稼働 2011 年 1 月 21 日 - 4.
プリフォーク型サーバが抱える問題 ワーカープロセスの起動コストが大きい fork が多発するタイミングでパフォーマンスが劣化 既存解決策 : mod_bumpy_life (Apache) by hirose31++ MaxRequestsPerChild をランダマイズ ワーカープロセスの終了時期を分散する効果 ⇒ ワーカープロセス再起動のタイミングが分散される Starlet でも同様のことができればいいのに… Web アプリケーションの無停止稼働 2011 年 1 月 21 日 - 5.
Starlet における再起動間隔ランダム化plackup -s Starlet \ --min-reqs-per-child=50 \ --max-reqs-per-child=100 Web アプリケーションの無停止稼働 2011 年 1 月 21 日 - 6.
- 7.
- 8.
解決策 : SlowRestart 「じわじわ起動/終了する機能 ワーカープロセスの数を保ちながら fork のタイミングを分散 Web アプリケーションの無停止稼働 2011 年 1 月 21 日 listen spawn app. servers accept app. logic fork & exec accept app. logic SIGUSR1 fork & exec accept app. logic SIGHUP - 9.
- 10.
Using Slow Restartwith Starlet start_server --port=80 \ --signal-on-hup=USR1 -- \ plackup -s Starlet … \ --spawn-interval=1 \ yourapp.psgi Web アプリケーションの無停止稼働 2011 年 1 月 21 日 - 11.
Parallel::Prefork の Slow Restart 対応 $pm = Parallel::Prefork->new({ … , spawn_interval => $interval, trap_signals => { ‘ TERM’ => ‘TERM’, ‘ HUP’ => ‘TERM’, ‘ USR1’ => [ ‘TERM’, $interval ], }, }); Web アプリケーションの無停止稼働 2011 年 1 月 21 日 - 12.
- 13.
成果と次回予告 完了 :fork 負荷の分散 課題 : アプリケーションのバージョン一貫性 ファイル配布と再起動には、必ずタイムラグがある 一部のファイルは遅延読み込みされる e.g. テンプレート 旧世代のプロセスが新世代のファイルを読んでしまう ⇩ 続きは次回の SoozyCon で! Web アプリケーションの無停止稼働 2011 年 1 月 21 日 - 14.
参考資料 Writing Hot-deployableservers (introduction of Server::Starter) http://developer.cybozu.co.jp/kazuho/2009/09/writing-hot-dep.html Web アプリケーションの無停止稼働 2011 年 1 月 21 日