20090717 ruby kaigi lightning talk

Post on 15-May-2015

2.208 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Wakame is an Open Source Project in Ruby to control servers on Amazon EC2.

TRANSCRIPT

Wakame で手軽にRails を大規模化す

る株式会社あくしゅ

山崎泰宏

例えばこんな話!

ある日突然僕のサイトにたくさんの人が来た

あっさり

キャパシティオーバー

ボスが怒ってる!「なんとかしろ!」

「えっ?!」

急に言われても、

今いっぱいいっぱいです…

「…や、やります」

「明日の朝までにな!」

急にスケールアウトしとけとか言われて泣きそうになったこと、ありませんか?

間に合わないからAmazon EC2 にしよう!

これで仮想マシンの調達が

自動化できちゃう!

けど!

セットアップは手動なのか?!

俺がやんの?

2009/6/26 Ver. 0.4 Release

# gem install wakame

セットアップも自動化すべき!

# wakameadm propagate_service \ Wakame::Service::Apache_APP 10

Rails (passenger) を

10個増やす!

# wakameadm propagate_service \ Wakame::Service::MySQL_Slave 3

MySQL レプリケーションも3個追加する!

あと見てるだけ

Load Balanc

er

Load Balanc

er

MySQLSlave

Static Passenger

MySQLSlave

MySQLSlave

PassengerPassenger

MySQL Master

Rails が増える!

MySQL が増える!

大規模化する… !

Storage

Machine Image

File

Master

Agent

Server + XenOther

s(Web+DB+etc.)

Server + XenServer + Xen

Web APIs

Amazon S3

Amazon Machine Image

Amazon EC2

Amazon Management Console / Elasticfox

Wakame はどのように増えるか ?

Storage

Machine Image

File

Wakame をインストールしておく(1/7)

Master

Agent

Server + XenOther

s(Web+DB+etc.)

Server + XenServer + Xen

Web APIsマシン起動

Wakame

Storage

Machine Image

File

マシンイメージを起動する (2/7)

Master

Agent

Server + XenOther

s(Web+DB+etc.)

Server + XenServer + Xen

Web APIs

Machine Image

File

Master

Agent

Others

(Web+DB+etc.)

インスタンスの起動

Storage

Machine Image

File

Master は Agent に指示をする (3/7)

Master

Agent

Server + XenOther

s(Web+DB+etc.)

Server + XenServer + Xen

Web APIs

Machine Image

File

Master

Agent

Others

(Web+DB+etc.)

サービス起動指示

サービス起動

Storage

Machine Image

File

スケールアウトしろ! (4/7)

Master

Agent

Server + XenOther

s(Web+DB+etc.)

Server + XenServer + Xen

Web APIs

Machine Image

File

Master

Agent

Others

(Web+DB+etc.)

スケールアウト計画の指示

Storage

Machine Image

File

Master から新インスタンスを要求(5/7)

Master

Agent

Server + XenOther

s(Web+DB+etc.)

Server + XenServer + Xen

Web APIs

Machine Image

File

Master

Agent

Others

(Web+DB+etc.)

マシン起動

Storage

Machine Image

File

新しい Agent が登場 (6/7)

Master

Agent

Server + XenOther

s(Web+DB+etc.)

Server + XenServer + Xen

Web APIs

Machine Image

File

Master

Agent

Others

(Web+DB+etc.)

Machine Image

File

Master

Agent

Others

(Web+DB+etc.)

インスタンスの起動

Storage

Machine Image

File

新 Agent 経由でセットアップ (7/7)

Master

Agent

Server + XenOther

s(Web+DB+etc.)

Server + XenServer + Xen

Web APIs

Machine Image

File

Master

Agent

Others

(Web+DB+etc.)

Machine Image

File

Master

Agent

Others

(Web+DB+etc.)

サービス起動指示

サービス起動

いまどき

ソフトウェアは最初から

スケールアウト可能なように

書くのが当たり前です!

しかし!

大規模サイトの運用まで経験した人は数少ない!

珍獣

混ぜてみよう

Wakame まとめLet’s 実験 ,

be 珍獣Rails を大規模化できる

手軽に

Photo copyrights

http://www.flickr.com/photos/fotoosvanrobin/3644415777/http://www.flickr.com/photos/zadeus/345628105/http://www.flickr.com/photos/janramroth/2596734632/http://www.flickr.com/photos/smailtronic/506742200/http://www.flickr.com/photos/66164549@N00/2093219011/http://www.flickr.com/photos/gillesgonthier/2158761836/http://www.flickr.com/photos/tscherno/1439629882/http://www.flickr.com/photos/55638925@N00/2386548957/http://www.flickr.com/photos/mscheltgen/56521788/http://www.flickr.com/photos/falsepositives/2862982252/http://www.flickr.com/photos/tsackett/8664708/http://www.flickr.com/photos/a_mason/3993146/http://www.flickr.com/photos/smatkins/2233167722/http://www.flickr.com/photos/rhouse/1679839435/

Creative Commons - Attribution-Share Alike 2.0 Generic

分散テクノロジグループ山崎泰宏 (y-yamazaki@axsh.net / @sparklegate)藤原勝弘 (m-fujiwara@axsh.net)吉田将士 (masahito@axsh.net)三上悟  (s-mikami@axsh.net)

http://github.com/axsh/wakame/

top related