Upload
shota-onishi
View
554
Download
4
Embed Size (px)
Citation preview
Heroku add-onBounscale
Auto-scaling to your application
13年9月5日木曜日
About this LT
• BounscaleというオートスケールするHerokuのadd-onを作っています。紹介させてください。
• 現在Public Betaでどなたでも使えます!
13年9月5日木曜日
About me
• 大西 正太 @shouta_dev
• (株)DTS
• 2005年位からお仕事でRailsやってます
• 自社サービスも受託開発も
• インプレスさんとの案件はRuby AssociatiomのHPで紹介されました
• http://www.ruby.or.jp/ja/showcase/case19.html
• お酒が大好き!クズ居酒屋が大好き!吉田類の酒場放浪記が大好き!
13年9月5日木曜日
家宝
13年9月5日木曜日
Bounscale?
Heroku上のサービス運営者が
四六時中heroku ps:scale
をせずに
突如の高負荷時に一定のレスポンスタイムを
維持できる
13年9月5日木曜日
Install
$ heroku addons:add bounscale
OR
https://addons.heroku.com/bounscale/
13年9月5日木曜日
Adding agent to your app# Rails (Rack) :Gemgem ’bounscale’ #Gemfile
# node.js/express:npm [EXPERIMENTAL]”dependencies” : {”bounscale”, ”*”} // package.jsonapp.use(require(’bounscale’)); // app.js
# Play Framework2:sbt [EXPERIMENTAL]/* Build.scala */"bounscale" % "bounscale_2.10" % "0.0.1";resolvers += "r" at "http://bounscale.github.io/maven/";
more detail: https://devcenter.heroku.com/articles/bounscale
13年9月5日木曜日
Open dashboard
13年9月5日木曜日
Settings
13年9月5日木曜日
Auto-scaling config
• レスポンスタイム+別指標値で負荷を測定
• ビジー率 / スループット / cpu / memory
• グラフ上でスケールアウトの閾値を指定
13年9月5日木曜日
Dyno History
13年9月5日木曜日
Architecture
AWS
CentOS
Apa
che
Twitte
r Boo
tstr
ap
Rack Server
Ruby on Rails
MySQLZab
bix
API (A
pach
e/PHP)
AWS
CentOS
ProvisionController
Bizca Multitenant
Zabbix Server
Zabbix Custom Items Zabbix Custom Action
Heroku
Developer
User Addon Provisioning API
Heroku API
Service Appliction
www.heroku.com(heroku console)
bounscale gem
(middleware)
Rac
k Ser
ver
Rails/Application
Heroku LogsResource Data
UserATenant
ConsoleController
UserATenant
Zabbix Access Model
Tenantdatabase
Tenantdatabase
Tenantdatabase
zabbix cachedata
UserATenant
UserATenant
Multitenant Access Model
UserATenant
UserATenant
Heroku Access Model
UserATenant
UserATenant
Cache Model
MySQL
memory Item
Throughput Item
Web ItemBusyness
Item
Trigger(scale condition)
CPU Item
shell scipt / Ruby
Zabbix database
Tenant1zabbix history
data
Tenant1zabbix config
data
Tenant2zabbix history
data
Tenant2zabbix config
data
Tenant3zabbix history
data
Tenant3zabbix config
data
shell scipt / Ruby
ScaleoutAction
Scalein Action
Resource Data
Resource Data
Provisioning Request
Update Scale Config
Create tenant
Provisioning Response
Get Cache Data
Create tenant
Tenant Control
Provisioning
Heroku SSO
Show Resource Graph
Update Zabbix
Cache CollectorResource
Data
Update&Create Items, Triggers, Actions
Collect History Data
Save Cache Data
Get cache
Resource Data
Per
iodi
cally
Kic
k Ret
urn
Res
ourc
e
Resource Data
Sav
e Res
ourc
e Dat
a
Get
Ite
m,
Trig
ger,
Act
ion
Conditionally Kick Actions
Scale out Scale in
Use this service
Collect and Write Resource Datas
Request Addon / Request SSO
redirect
Get Logs(heroku logs)
Extract resource datas
Update/Get
Sav
e Sca
lein
/ou
t hi
tories
Bounscale Architecture
13年9月5日木曜日
Try it out !!
$ heroku addons:add bounscale
現在Public Betaで利用は無料です!
13年9月5日木曜日
Resources
• https://devcenter.heroku.com/articles/bounscale
• https://github.com/bounscale
• http://qiita.com/bounscale/
• https://twitter.com/bounscale/
13年9月5日木曜日