bounscale 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.ja.md +164 -0
  2. data/README.md +66 -67
  3. data/lib/bounscale/version.rb +1 -1
  4. metadata +5 -4
@@ -0,0 +1,164 @@
1
+ # Bounscale
2
+ Bounscaleは、HerokuへデプロイされたRailsアプリケーションをオートスケールする環境を提供するアドオンです。
3
+
4
+ Bounscaleを追加することによって次のような利点を得ることができます。
5
+
6
+ 1. レスポンスの低下を抑えます。
7
+
8
+ 2. アプリケーションへの負荷に合わせて最適なDyno数の調整を行うことによりコストを抑えることができます。
9
+
10
+ Bounscaleはgemのbounscaleにより、RackMiddlewareからアプリケーションの状態を取得してオートスケールを実現しています。
11
+
12
+ ## サポート環境
13
+ __Application__
14
+
15
+ * 動作確認済
16
+ * Rails 2.3 or 3.0 or 3.2
17
+ * 仕組み上はRackに対応していれば利用可能です
18
+
19
+ __Heroku Stack__
20
+
21
+ * Ceder Stack
22
+
23
+ Ruby 1.9.2 or 1.9.3
24
+
25
+ ## はじめに
26
+
27
+ プロジェクトのGemfileに以下を追加します。
28
+
29
+ ```Gemfile
30
+ config.after_initialize do
31
+ require 'bounscale'
32
+ end
33
+ ```
34
+
35
+ Rails2の場合はconfig/environment.rbに以下を追加します。
36
+ (Rails3の場合は不要)
37
+
38
+ ```config/environment.rb
39
+ config.gem 'bounscale'
40
+ ```
41
+
42
+ ## アドオンのインストール
43
+
44
+ アドオンを追加するために以下のコマンドを入力します。
45
+
46
+ ```
47
+ $ heroku addons:add bounscale
48
+ ```
49
+
50
+ ## Bounscale初期設定
51
+
52
+ Herokuのアプリケーション画面へ移動し、AddonsにBounscaleが追加されていることを確認します。
53
+
54
+ 確認を行った後に、Bounscaleアドオンをクリックします。
55
+
56
+ ![sample01](https://s3.amazonaws.com/bounscale/sample01.png)
57
+
58
+ Bounscaleボタンをクリック後、以下のような画面が表示されます。
59
+ 次に、3つの入力を行なってください。
60
+
61
+ 1. API Key
62
+
63
+ HerokuアカウントのAPIキーを入力してください。
64
+
65
+ APIキーの取得については、heroku dashboard画面で
66
+ `Account > API Key > Show API Keyボタン`
67
+ を押すことで入手できます。
68
+
69
+ 2. Web URL
70
+
71
+ アプリケーションの監視するURLを入力してください。
72
+
73
+ 3. Time Zone
74
+
75
+ 現在地のタイムゾーンを選択してください。
76
+
77
+ 入力後、Saveボタンを押してください。
78
+
79
+ ![sample02](https://s3.amazonaws.com/bounscale/sample02.png)
80
+
81
+ BounscaleのTop画面が表示されれば完了となります。
82
+
83
+ 設定完了後の初期状態はデータがないため、グラフが表示されません。
84
+ 5~10分程度待つとアプリケーションのデータを取得してグラフが表示され始めます。
85
+
86
+ ![sample03](https://s3.amazonaws.com/bounscale/sample03.png)
87
+
88
+ ## オートスケール設定
89
+
90
+ オートスケール設定画面は、オートスケールに関する各種設定値を指定することで、適切にオートスケールが行われるように制御する画面です。
91
+
92
+ ![sample04](https://s3.amazonaws.com/bounscale/sample04.png)
93
+
94
+ ### (a)Auto Scale
95
+ _Auto Scale_ではオートスケールのオンオフを設定することができます。有効(enable)の場合、グラフのデータを取得し、高負荷の条件を満たすとオートスケールが実施されます。無効(disable)の場合、グラフのデータを取得しますが、オートスケールは一切実施されません。
96
+
97
+ 使い始めはひとまず無効を指定し、収集されたグラフに基づき、適切な閾値を指定できた後で、有効に設定する事をお勧めします。
98
+
99
+ ### (b)Dyno Limit
100
+ _Dyno limit_ではオートスケールにより変更されるDyno数の範囲を設定することができます。Dynoの最小値は、どれだけ負荷が少なくても、指定値よりもDynoが少なくなることはありません。Dynoの最大値は、どれだけ負荷が小さくても、指定値よりもDynoが大きくなる事はありません。
101
+
102
+ 最小値は最低限の性能を確保するための数値を指定してください。また、最大値はコストに合わせて数値を指定してください。また、current dynoは今現在のDyno数を表しています。
103
+
104
+ ### (c)Response Time
105
+ Bounscaleのスケールアウトは2つの指標値が両方高負荷状態になった場合に実行されます。
106
+
107
+ 指標値"ResponseTime"はBounscaleから該当のURLに実際にHTTPリクエストを発行したレスポンスタイムです。この指標値はアプリケーションの負荷を測定するために最重要な項目であるため、必ず利用する指標値となります。*Response Time*をクリックすると、レスポンスタイムを監視しているURLの設定を行うことができます。
108
+
109
+ アプリケーションの中で平均的なレスポンスタイムを返却するURLを指定する事をお勧めします。
110
+
111
+ ### (d)オプショナル指標値
112
+ セレクトボックスで2つ目のオプショナル指標値を選択します。オプショナル指標値には以下のものがあります。
113
+
114
+ * Busyness[%]
115
+
116
+ 一定時間あたりのDynoが処理するリクエスト処理時間、待ち時間を計測し、その比率を0%から100%で表す指標値です。
117
+
118
+ 例えば、10秒間に6秒間リクエスト処理を行い、4秒間リクエスト待ちのとき、出力は60[%]となります。
119
+
120
+ * CPU[ms]
121
+
122
+ CPUの使用時間を表す指標値です。
123
+
124
+ * Memory[MB]
125
+
126
+ メモリの使用量を表す指標値です。
127
+
128
+ * Throughput[response/min]
129
+
130
+ 1分間あたりに返すレスポンス数を表す指標値です。
131
+
132
+ ### (e)(f)グラフ
133
+ _グラフ_では、スケールアウトする閾値を選択することができます。固定の指標値であるResponseTimeの閾値は左のつまみで設定することができます。
134
+ また、オプショナルの指標値であるCPUの閾値は右のつまみで設定することができます。2つの指標値の設定した閾値の両方が超えるとスケールアウトしてアプリケーションへの負荷を低減させます。
135
+
136
+ ### (g)Interval
137
+ _Interval_では、データを取得するスパンを設定することができます。短いほど急激にDynoの数が増減します。
138
+
139
+ ### (h)ScaleIn
140
+ Bounscaleのスケールインはレスポンスタイム単体が一定の閾値を下回った場合に実行されます。_ScaleIn_で、スケールインするレスポンスタイムを設定することができます。この値はできるだけ小さく指定する事をお勧めします。アプリケーションへの負荷が十分に収まっていない状態でスケールインする事を防ぐためです。
141
+
142
+ ### (i)Saveボタン
143
+ 設定完了後Saveボタンを押します。
144
+
145
+ ## 運用開始後
146
+
147
+ 実際の運用を始めた後は _Dyno History_ 画面を参照し、定常的に下記のガイドラインを参考にしてオートスケールの設定を最適化していってください。
148
+
149
+ ![sample04](https://s3.amazonaws.com/bounscale/sample07.png)
150
+
151
+ * 十分なレスポンスタイムが維持されているか確認します。
152
+ * レスポンスタイムが不十分な場合、そのタイミングでDynoの数が増加しているか確認します。
153
+ * 増加していない場合は閾値及びオプショナル指標値を適切に調整します。
154
+ * Dynoが増えているにも関わらずレスポンスタイムが改善しない場合は、Bounscaleでは対応できません。
155
+ * アプリケーション以外(DBサーバなど)がボトルネックになっている可能性を調査します。
156
+ * 負荷が高くない状況でオートスケールが実行されている場合も、閾値及びオプショナル指標値を適切に調整してください。
157
+
158
+ ## サポート
159
+
160
+ 不明点、動作不良などを発見された場合、issuesに登録をお願い致します。
161
+
162
+ それではあなたのアプリケーションがストレスから開放されることを。
163
+
164
+ DTS Corporation.
data/README.md CHANGED
@@ -1,20 +1,20 @@
1
1
  # Bounscale
2
- Bounscaleは、HerokuへデプロイされたRailsアプリケーションをオートスケールする環境を提供するアドオンです。
2
+ Bounscale is an add-on that provides an environment to auto-scale the application Rails that is deployed to Heroku.
3
3
 
4
- Bounscaleを追加することによって次のような利点を得ることができます。
4
+ You can gain the following advantages by adding Bounscale:
5
5
 
6
- 1. レスポンスの低下を抑えます。
6
+ 1. You can prevent responses from decreasing.
7
7
 
8
- 2. アプリケーションへの負荷に合わせて最適なDyno数の調整を行うことによりコストを抑えることができます。
8
+ 2. You can reduce costs by adjusting the optimal number of Dynos according to the load on the application.
9
9
 
10
- Bounscalegembounscaleにより、RackMiddlewareからアプリケーションの状態を取得してオートスケールを実現しています。
10
+ Bounscale realizes auto-scaling by obtaining the status of the application from RackMiddleware using gem’s bounscale.
11
11
 
12
- ## サポート環境
12
+ ## Supported Environments
13
13
  __Application__
14
14
 
15
- * 動作確認済
15
+ * Compatibility confirmed.
16
16
  * Rails 2.3 or 3.0 or 3.2
17
- * 仕組み上はRackに対応していれば利用可能です
17
+ * Supposed to be supported if compatible with the rack, according to the configurations.
18
18
 
19
19
  __Heroku Stack__
20
20
 
@@ -22,141 +22,140 @@ __Heroku Stack__
22
22
 
23
23
  Ruby 1.9.2 or 1.9.3
24
24
 
25
- ## はじめに
25
+ ## Getting Started
26
26
 
27
- プロジェクトのGemfileに以下を追加します。
27
+ Add the following to your project’s Gemfile:
28
28
 
29
29
  ```Gemfile
30
30
  gem 'bounscale'
31
31
  ```
32
32
 
33
- Rails2の場合はconfig/environment.rbに以下を追加します。
34
- (Rails3の場合は不要)
33
+ On Rails2 (not Rails3), add the following to your config/environment.rb:
35
34
 
36
35
  ```config/environment.rb
37
- config.gem 'bounscale'
36
+ config.after_initialize do
37
+ require 'bounscale'
38
+ end
38
39
  ```
39
40
 
40
- ## アドオンのインストール
41
+ ## Installation of the Add-on
41
42
 
42
- アドオンを追加するために以下のコマンドを入力します。
43
+ Type the following command to add the add-on:
43
44
 
44
45
  ```
45
46
  $ heroku addons:add bounscale
46
47
  ```
47
48
 
48
- ## Bounscale初期設定
49
+ ## Bounscale Default Settings
49
50
 
50
- Herokuのアプリケーション画面へ移動し、AddonsにBounscaleが追加されていることを確認します。
51
+ Go to Heroku’s Application screen and check that Bounscale has been added to Addons.
51
52
 
52
- 確認を行った後に、Bounscaleアドオンをクリックします。
53
+ Click the Bounscale add-on after confirming that Bounscale is added to Addons.
53
54
 
54
55
  ![sample01](https://s3.amazonaws.com/bounscale/sample01.png)
55
56
 
56
- Bounscaleボタンをクリック後、以下のような画面が表示されます。
57
- 次に、3つの入力を行なってください。
57
+ The following screen will appear after you click the Bounscale button. Then, enter the following three:
58
58
 
59
59
  1. API Key
60
60
 
61
- HerokuアカウントのAPIキーを入力してください。
61
+ Enter your Heroku account’s API key.
62
62
 
63
- APIキーの取得については、heroku dashboard画面で
64
- `Account > API Key > Show API Keyボタン`
65
- を押すことで入手できます。
63
+ You can obtain an API key by going to
64
+ `Heroku’s Dashboard > Account > API Key`
65
+ and clicking the Show API Key button.
66
66
 
67
67
  2. Web URL
68
68
 
69
- アプリケーションの監視するURLを入力してください。
69
+ Enter a URL you wish the application to monitor.
70
70
 
71
71
  3. Time Zone
72
72
 
73
- 現在地のタイムゾーンを選択してください。
73
+ Select the time zone of your location.
74
74
 
75
- 入力後、Saveボタンを押してください。
75
+ Click the Save button after selecting the time zone.
76
76
 
77
77
  ![sample02](https://s3.amazonaws.com/bounscale/sample02.png)
78
78
 
79
- BounscaleのTop画面が表示されれば完了となります。
79
+ If Bounscale’s homepage is displayed, the setting is complete.
80
80
 
81
- 設定完了後の初期状態はデータがないため、グラフが表示されません。
82
- 5~10分程度待つとアプリケーションのデータを取得してグラフが表示され始めます。
81
+ No charts are displayed immediately after the setting is complete as there is no data by default. Bounscale will obtain application data and start displaying charts after around 5-10 minutes.
83
82
 
84
83
  ![sample03](https://s3.amazonaws.com/bounscale/sample03.png)
85
84
 
86
- ## オートスケール設定
85
+ ## Auto Scale Settings
87
86
 
88
- オートスケール設定画面は、オートスケールに関する各種設定値を指定することで、適切にオートスケールが行われるように制御する画面です。
87
+ The Auto Scale Settings screen is a screen that controls so that auto-scaling is performed appropriately according to the auto scaling-related settings you made.
89
88
 
90
89
  ![sample04](https://s3.amazonaws.com/bounscale/sample04.png)
91
90
 
92
91
  ### (a)Auto Scale
93
- _Auto Scale_ではオートスケールのオンオフを設定することができます。有効(enable)の場合、グラフのデータを取得し、高負荷の条件を満たすとオートスケールが実施されます。無効(disable)の場合、グラフのデータを取得しますが、オートスケールは一切実施されません。
92
+ You can turn on/off auto-scaling at Auto Scale. When enabled, Auto Scale obtains chart data and performs auto-scaling when the heavy load conditions are met. When disabled, Auto Scale obtains chart data but does not perform auto-scaling at all.
94
93
 
95
- 使い始めはひとまず無効を指定し、収集されたグラフに基づき、適切な閾値を指定できた後で、有効に設定する事をお勧めします。
94
+ It is recommended to set Auto Scale to “Disabled” once when you first use it, and set it to “Enabled” after setting the appropriate threshold based on the chart data gathered.
96
95
 
97
96
  ### (b)Dyno Limit
98
- _Dyno limit_ではオートスケールにより変更されるDyno数の範囲を設定することができます。Dynoの最小値は、どれだけ負荷が少なくても、指定値よりもDynoが少なくなることはありません。Dynoの最大値は、どれだけ負荷が小さくても、指定値よりもDynoが大きくなる事はありません。
97
+ You can set the range of the number of Dynos that is modified by auto-scaling at Dyno Limit. The minimum number of Dynos cannot be less than the designated value, however little the load is. The maximum number of Dynos cannot be more than the designated value, however little the load is.
99
98
 
100
- 最小値は最低限の性能を確保するための数値を指定してください。また、最大値はコストに合わせて数値を指定してください。また、current dynoは今現在のDyno数を表しています。
99
+ Set the minimum number of Dynos to a numeric value that secures the minimum performance. Also, set the maximum number of Dynos to a numeric value according to costs. In addition, “Current Dyno” shows the current number of Dynos.
101
100
 
102
101
  ### (c)Response Time
103
- Bounscaleのスケールアウトは2つの指標値が両方高負荷状態になった場合に実行されます。
102
+ Bounscale’s scale-out is performed when the status of both of the two indicators has become “high load”.
104
103
 
105
- 指標値"ResponseTime"はBounscaleから該当のURLに実際にHTTPリクエストを発行したレスポンスタイムです。この指標値はアプリケーションの負荷を測定するために最重要な項目であるため、必ず利用する指標値となります。*Response Time*をクリックすると、レスポンスタイムを監視しているURLの設定を行うことができます。
104
+ The indicator “ResponseTime” is a response time in which an HTTP request was actually issued from Bounscale to the applicable URL.
106
105
 
107
- アプリケーションの中で平均的なレスポンスタイムを返却するURLを指定する事をお勧めします。
106
+ This indicator is the most important item to measure the load on the application and you will always use it. You can set the URL monitoring the response time by clicking “Response Time”.
108
107
 
109
- ### (d)オプショナル指標値
110
- セレクトボックスで2つ目のオプショナル指標値を選択します。オプショナル指標値には以下のものがあります。
108
+ It is recommended to set a URL that returns the average application response time.
111
109
 
112
- * Busyness[%]
110
+ ### (d)Optional indicators
111
+ Select the second optional indicator from the drop-down box. Optional indicators are as follows:
113
112
 
114
- 一定時間あたりのDynoが処理するリクエスト処理時間、待ち時間を計測し、その比率を0%から100%で表す指標値です。
113
+ * Busyness[%]
114
+ Busyness [%] is an indicator that measures the duration during which Dynos are processing requests in a certain amount of time and the wait time and shows its ratio between 0% and 100%.
115
115
 
116
- 例えば、10秒間に6秒間リクエスト処理を行い、4秒間リクエスト待ちのとき、出力は60[%]となります。
116
+ For instance, the output is 60[%] if a request is processed for 6 seconds and Dyno waits 4 seconds for a request in a period of 10 seconds.
117
117
 
118
118
  * CPU[ms]
119
-
120
- CPUの使用時間を表す指標値です。
119
+ CPU [ms] is an indicator that shows the duration of the use of the CPU.
121
120
 
122
121
  * Memory[MB]
123
122
 
124
- メモリの使用量を表す指標値です。
123
+ Memory [MB] is an indicator that shows the amount of memory in use.
125
124
 
126
125
  * Throughput[response/min]
127
126
 
128
- 1分間あたりに返すレスポンス数を表す指標値です。
127
+ Throughput [response/min] is an indicator that shows the number of responses returned per minute.
129
128
 
130
- ### (e)(f)グラフ
131
- _グラフ_では、スケールアウトする閾値を選択することができます。固定の指標値であるResponseTimeの閾値は左のつまみで設定することができます。
132
- また、オプショナルの指標値であるCPUの閾値は右のつまみで設定することができます。2つの指標値の設定した閾値の両方が超えるとスケールアウトしてアプリケーションへの負荷を低減させます。
129
+ ### (e)(f)Charts
130
+ You can select thresholds to scale out at Charts. You can set the ResponseTime threshold, which is a fixed indicator, with the knob on the left. Also, you can set the CPU threshold, which is an optional indicator, with the knob on the right. If both of the thresholds set for the two indicators are exceeded, Bounscale will scale out to reduce the load on the application.
133
131
 
134
132
  ### (g)Interval
135
- _Interval_では、データを取得するスパンを設定することができます。短いほど急激にDynoの数が増減します。
133
+ You can set the interval at which data is obtained at Interval. The shorter the interval, the more suddenly the number of Dynos increases/decreases.
136
134
 
137
135
  ### (h)ScaleIn
138
- Bounscaleのスケールインはレスポンスタイム単体が一定の閾値を下回った場合に実行されます。_ScaleIn_で、スケールインするレスポンスタイムを設定することができます。この値はできるだけ小さく指定する事をお勧めします。アプリケーションへの負荷が十分に収まっていない状態でスケールインする事を防ぐためです。
136
+ Bounscale’s scale-in is performed when the response time alone becomes lower than a certain threshold. You can set the response time to scale in with _ScaleIn_. It is recommended to set this value as low as possible. This is to prevent Bounscale from scaling in when the load on the application is not fully settled.
139
137
 
140
- ### (i)Saveボタン
141
- 設定完了後Saveボタンを押します。
138
+ ### (i)Save Button
139
+ Click the Save button after the setting is complete.
142
140
 
143
- ## 運用開始後
141
+ ## Once Bounscale Is in Operation
144
142
 
145
- 実際の運用を始めた後は _Dyno History_ 画面を参照し、定常的に下記のガイドラインを参考にしてオートスケールの設定を最適化していってください。
143
+ Once Bounscale is in actual operation, refer to the Dyno History screen to optimize the auto-scale settings on a regular basis with reference to the following guidelines:
146
144
 
147
145
  ![sample04](https://s3.amazonaws.com/bounscale/sample07.png)
148
146
 
149
- * 十分なレスポンスタイムが維持されているか確認します。
150
- * レスポンスタイムが不十分な場合、そのタイミングでDynoの数が増加しているか確認します。
151
- * 増加していない場合は閾値及びオプショナル指標値を適切に調整します。
152
- * Dynoが増えているにも関わらずレスポンスタイムが改善しない場合は、Bounscaleでは対応できません。
153
- * アプリケーション以外(DBサーバなど)がボトルネックになっている可能性を調査します。
154
- * 負荷が高くない状況でオートスケールが実行されている場合も、閾値及びオプショナル指標値を適切に調整してください。
147
+ * Check if enough response time is maintained.
148
+ * If the response time is not enough, check if the number of Dynos has increased in conjunction with the insufficient response time.
149
+ * If the number of Dynos has not increased, adjust the thresholds and optional indicators appropriately.
150
+ * If the response time does not improve despite an increase in the number of Dynos, it cannot be dealt with by Bounscale.
151
+ * Investigate the possibility of something other than the application, such as a DB server, being the bottleneck.
152
+ * If auto-scaling is performed where the load is not high, adjust the thresholds and optional indicators appropriately likewise.
153
+
154
+ ## Technical Support
155
+
156
+ If you are not certain about something or find a malfunction, etc., please register it at Issues.
155
157
 
156
- ## サポート
158
+ We hope your application will be free from stress.
157
159
 
158
- 不明点、動作不良などを発見された場合、issuesに登録をお願い致します。
159
-
160
- それではあなたのアプリケーションがストレスから開放されることを。
161
160
 
162
161
  DTS Corporation.
@@ -1,4 +1,4 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Bounscale
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bounscale
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - DTS Corporation
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-07-05 00:00:00 Z
18
+ date: 2013-07-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json
@@ -58,6 +58,7 @@ files:
58
58
  - .gitignore
59
59
  - Gemfile
60
60
  - LICENSE.txt
61
+ - README.ja.md
61
62
  - README.md
62
63
  - Rakefile
63
64
  - bounscale.gemspec