More Related Content
PDF
PPTX
PDF
PPT
PDF
PDF
PPTX
PDF
HTTP/2 でリバプロするだけでグラフツールを 高速化できた話 What's hot
PPTX
PDF
PPTX
OpenShift from Easy way to Hard ? Way PDF
PDF
PDF
【19-C-L】Web開発者ならおさえておきたい「常時SSL/TLS化の実装ポイント」 PPTX
PPTX
Dockerと外部ルータを連携させる仕組みを作ってみた PDF
PDF
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 PDF
PDF
Connect the Dots: Set yourself apart in a saturated market. PPTX
A Long Walk to Water: Lesson4 unit2 RTF
2010 National Latin Exam Information PDF
Reorganizing Website Architecture for HTTP/2 and Beyond 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
PPT
PPTX
PPSX
Donde esta el Dios de justicia PDF
More from Kazuho Oku
PPTX
Recent Advances in HTTP, controlling them using ruby PDF
H2O - the optimized HTTP server PPTX
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先 PDF
PPTX
JSX 速さの秘密 - 高速なJavaScriptを書く方法 PPTX
PDF
PDF
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜 PPTX
PPTX
Programming TCP for responsiveness PPT
Unix Programming with Perl 2 PPTX
JSON SQL Injection and the Lessons Learned PPTX
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 日