Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Auto Scaling でサーバーを 安定稼動させたい
Search
shida
May 29, 2012
Technology
1
240
Auto Scaling でサーバーを 安定稼動させたい
24時間365日安定稼動
急にアクセスが増えても大丈夫
できるだけ安くしたい
そういう顧客のニーズにEC2のauto scalingで応えるための
サーバー構成やアーキテクチャについての発表
shida
May 29, 2012
Tweet
Share
More Decks by shida
See All by shida
受託開発で ビジネスづくりを楽しむ
shida
0
2.2k
受託アジャイルでの契約書作り請求や、外注パートナーへの支払いスキームまで
shida
0
790
スクレイピングの安定運用のために苦労したところ、工夫したところ
shida
4
1.9k
DevLOVEリンスタカフェ vol.7
shida
1
90
DevLOVE リンスタカフェ vol2 成長を促すKPIが見つからん
shida
0
33
現場の開発者でもできるユーザー中心かつ 仮説検証型の企画アプローチ
shida
0
2.5k
ユーザーが「それいいね!」と言うまで
shida
0
3k
ハイブリッドアプリの 受け入れテスト自動化
shida
0
170
SkypインタビューとKA法による分析
shida
4
820
Other Decks in Technology
See All in Technology
技育祭2024春 LT Finatextホールディングス
kevinrobot34
1
160
家族アルバム みてねで直面してきた技術的負債 / MIXI KAG 2024
isaoshimizu
17
7.7k
ハイパフォーマンスな組織をつくるための開発生産性の考え方 / developer-productivity-high-performer-link-and-motivation
lmi
3
250
MongoDB Atlas Vectorsearchではじめる生成AIアプリ開発
chie8842
3
510
LLM + RAG を使った SORACOM Support Bot の裏側の歴史
soracom
PRO
1
640
Getting started with controlling LEGO using Swift
hcrane
0
130
サービス成長と共に肥大化するモノレポ、長くなるCI時間 / As services grow, monorepos get bigger and CI time gets longer
kohbis
5
2.1k
AMLD 2024 - Build Your Own GPT
donlelef
1
260
やっていきテスト
k6s4i53rx
0
160
Autopsy of a Cascading Outage from a MySQL Crashing Bug
jfg956
0
200
#51 “Empowering Azure Storage with RDMA”
cafenero_777
3
210
データ品質をコード化! LINEヤフーのMLOpsを最適化する "ACP Data Quality" の紹介
lycorptech_jp
PRO
2
170
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
14
2.6k
Documentation Writing (for coders)
carmenintech
59
3.8k
Designing the Hi-DPI Web
ddemaree
275
33k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
75
4.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
657
120k
The Brand Is Dead. Long Live the Brand.
mthomps
48
21k
Facilitating Awesome Meetings
lara
39
5.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
225
51k
Building Adaptive Systems
keathley
29
1.8k
How to train your dragon (web standard)
notwaldorf
71
5.1k
Transcript
Auto Scaling でサーバーを 安定稼動させたい 志田 裕樹 2012.05.29
自己紹介 • 三鷹市下連雀1丁目在住 • FLATz久末君と友達 • Railsとか、 Zen Cartとか、 MTとか
• pgcafeは2,3回来たことあります
よくいただく要望 • 24時間365日安定稼動 • 急にアクセスが増えても大丈夫 • できるだけ安くしたい 人間が張り付くのは無理 AWSのauto scaling
で自動的に解決したい
Auto Scaling とは • 監視対象は? – CPU, Disc IO, トラフィック,
ELBからみたLaytencey, … – Custom Metricsを何でも監視対象にできる • それがいくつになったら? – 5分平均でCPU使用率 20%以上になったら、とか • どのAMIで? • どのサーバータイプで? – Small, large,.. • 何台を? – 1度に5台とか、1台ずつとか (一度増やしたら次は5分後とか) • 増やす?、減らす?
scaling group 2 ELB Apache cron Apache Apache scaling group
1 Min: 1 Max: 1 Health Check: ELB 起動時に自分にEIP付与 Min: 0 Max: 10 Scale in: ELBのLaytency2以下 Scale out: ELBのLaytency5以上 Health Check: ELB MySQL scaling group 3 Min: 1 Max: 1 Health Check: EC2 起動時に自分でEIP付与 Cronマシンから接続性を定期チェック し、接続できなければterminate 現状の構成
scaling group 2 ELB Apache cron Apache Apache scaling group
1 MySQL(master:3306) MySQL(slave:3307) scaling group 3 scaling group 4 MySQL (slave) MySQL (slave) Min: 0 Max: 10 Scale in: SC3のCPU XX以下 Scale out: SC3のCPUXX以上 Health Check: EC2 起動時SC3のMySQL:3307 を停 止し、rsyncしてsalveとして起動 server-idもSC3側のプログラムか ら取得 起動時 rsync もっとスマートな方法ない でしょうか? ^^; 今後の構成