You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/applications/managing-app-processes.md
+68-28Lines changed: 68 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,9 +85,9 @@ Scaling processes... but first, coffee!
85
85
done in 0s
86
86
=== steely-mainsail Processes
87
87
--- cmd:
88
-
steely-mainsail-v3-cmd-nyrim up (v3)
88
+
steely-mainsail-cmd-3291896318-nyrim up (v3)
89
89
--- sleeper:
90
-
steely-mainsail-v3-sleeper-oq1jr up (v3)
90
+
steely-mainsail-sleeper-3291896318-oq1jr up (v3)
91
91
```
92
92
93
93
!!! note
@@ -102,25 +102,25 @@ Scaling processes... but first, coffee!
102
102
done in 3s
103
103
=== steely-mainsail Processes
104
104
--- cmd:
105
-
steely-mainsail-v3-cmd-nyrim up (v3)
105
+
steely-mainsail-cmd-3291896318-nyrim up (v3)
106
106
```
107
107
108
108
## Scaling Processes
109
109
110
-
Applications deployed on Deis Workflow [scale out via the process model][]. Use `deis scale` to control the number of
111
-
[Containers][container] that power your app.
110
+
Applications deployed on Deis Workflow scale out via the [process model][]. Use `deis scale` to control the number of
111
+
[containers][container] that power your app.
112
112
113
113
```
114
114
$ deis scale cmd=5 -a iciest-waggoner
115
115
Scaling processes... but first, coffee!
116
116
done in 3s
117
117
=== iciest-waggoner Processes
118
118
--- cmd:
119
-
iciest-waggoner-v2-cmd-09j0o up (v2)
120
-
iciest-waggoner-v2-cmd-3r7kp up (v2)
121
-
iciest-waggoner-v2-cmd-gc4xv up (v2)
122
-
iciest-waggoner-v2-cmd-lviwo up (v2)
123
-
iciest-waggoner-v2-cmd-kt7vu up (v2)
119
+
iciest-waggoner-web-3291896318-09j0o up (v2)
120
+
iciest-waggoner-web-3291896318-3r7kp up (v2)
121
+
iciest-waggoner-web-3291896318-gc4xv up (v2)
122
+
iciest-waggoner-web-3291896318-lviwo up (v2)
123
+
iciest-waggoner-web-3291896318-kt7vu up (v2)
124
124
```
125
125
126
126
If you have multiple process types for your application you may scale the process count for each type separately. For
@@ -135,13 +135,13 @@ Scaling processes... but first, coffee!
135
135
done in 4s
136
136
=== scenic-icehouse Processes
137
137
--- web:
138
-
scenic-icehouse-v2-web-7lord up (v2)
139
-
scenic-icehouse-v2-web-jn957 up (v2)
140
-
scenic-icehouse-v2-web-rsekj up (v2)
141
-
scenic-icehouse-v2-web-vwhnh up (v2)
142
-
scenic-icehouse-v2-web-vokg7 up (v2)
138
+
scenic-icehouse-web-3291896318-7lord up (v2)
139
+
scenic-icehouse-web-3291896318-jn957 up (v2)
140
+
scenic-icehouse-web-3291896318-rsekj up (v2)
141
+
scenic-icehouse-web-3291896318-vwhnh up (v2)
142
+
scenic-icehouse-web-3291896318-vokg7 up (v2)
143
143
--- background:
144
-
scenic-icehouse-v2-background-yf8kh up (v2)
144
+
scenic-icehouse-web-3291896318-background-yf8kh up (v2)
145
145
```
146
146
147
147
!!! note
@@ -159,13 +159,51 @@ Scaling processes... but first, coffee!
159
159
done in 1s
160
160
=== scenic-icehouse Processes
161
161
--- background:
162
-
scenic-icehouse-v2-background-yf8kh up (v2)
162
+
scenic-icehouse-web-3291896318-background-yf8kh up (v2)
163
163
--- web:
164
-
scenic-icehouse-v2-web-7lord up (v2)
165
-
scenic-icehouse-v2-web-rsekj up (v2)
166
-
scenic-icehouse-v2-web-vokg7 up (v2)
164
+
scenic-icehouse-web-3291896318-7lord up (v2)
165
+
scenic-icehouse-web-3291896318-rsekj up (v2)
166
+
scenic-icehouse-web-3291896318-vokg7 up (v2)
167
167
```
168
168
169
+
## Autoscale
170
+
171
+
Autoscale allows adding a minimum and maximum number of pods on a per process type basis. This is accomplished by specifying a target CPU usage across all available pods.
172
+
173
+
This feature is built on top of [Horizontal Pod Autoscaling][HPA] in Kubernetes or [HPA][] for short.
174
+
175
+
!!! note
176
+
This is an alpha feature. It is recommended to be on the latest Kubernetes when using this feature.
177
+
178
+
```
179
+
$ deis autoscale:set web --min=3 --max=8 --cpu-percent=75
180
+
Applying autoscale settings for process type web on scenic-icehouse... done
181
+
182
+
```
183
+
And then review the scaling rule that was created for `web`
184
+
185
+
```
186
+
$ deis autoscale:list
187
+
=== scenic-icehouse Autoscale
188
+
189
+
--- web:
190
+
Min Replicas: 3
191
+
Max Replicas: 8
192
+
CPU: 75%
193
+
```
194
+
195
+
Remove scaling rule
196
+
197
+
```
198
+
$ deis autoscale:unset web
199
+
Removing autoscale for process type web on scenic-icehouse... done
200
+
```
201
+
202
+
For autoscaling to work CPU requests have to be specified on each application Pod (can be done via `deis limits --cpu`). This allows the autoscale policies to do the [appropriate calculations][autoscale-algo] and make decisions on when to scale up and down.
203
+
204
+
Scale up can only happen if there was no rescaling within the last 3 minutes. Scale down will wait for 5 minutes from the last rescaling. That information and more can be found at [HPA algorithm page][autoscale-algo].
205
+
206
+
169
207
## Web vs Cmd Process Types
170
208
171
209
When deploying to Deis Workflow using a Heroku Buildpack, Workflow boots the `web` process type to
@@ -189,25 +227,27 @@ Kubernetes to terminate the old process and launch a new one in its place.
189
227
$ deis ps
190
228
=== scenic-icehouse Processes
191
229
--- web:
192
-
scenic-icehouse-v2-web-7lord up (v2)
193
-
scenic-icehouse-v2-web-rsekj up (v2)
194
-
scenic-icehouse-v2-web-vokg7 up (v2)
230
+
scenic-icehouse-web-3291896318-7lord up (v2)
231
+
scenic-icehouse-web-3291896318-rsekj up (v2)
232
+
scenic-icehouse-web-3291896318-vokg7 up (v2)
195
233
--- background:
196
-
scenic-icehouse-v2-background-yf8kh up (v2)
197
-
$ deis ps:restart scenic-icehouse-v2-background-yf8kh
234
+
scenic-icehouse-background-3291896318-yf8kh up (v2)
235
+
$ deis ps:restart scenic-icehouse-background-3291896318-yf8kh
198
236
Restarting processes... but first, coffee!
199
237
done in 6s
200
238
=== scenic-icehouse Processes
201
239
--- background:
202
-
scenic-icehouse-v2-background-yd87g up (v2)
240
+
scenic-icehouse-background-3291896318-yd87g up (v2)
203
241
```
204
242
205
-
Notice that the process name has changed from `scenic-icehouse-v2-background-yf8kh` to
206
-
`scenic-icehouse-v2-background-yd87g`. In a multi-node Kubernetes cluster, this may also have the effect of scheduling
243
+
Notice that the process name has changed from `scenic-icehouse-background-3291896318-yf8kh` to
244
+
`scenic-icehouse-background-3291896318-yd87g`. In a multi-node Kubernetes cluster, this may also have the effect of scheduling
0 commit comments