Skip to content

Commit b9f846e

Browse files
ihabadhamclaude
andcommitted
Right-size rails workload: 1Gi + capacityAI
Previous commit bumped memory 512Mi → 2Gi matching the marketplace demo, but cherry-picked only the memory dimension: CPU stayed at 300m and capacityAI stayed false. Net result was a wasteful fixed 2Gi allocation with no autoscale — the pattern Justin flagged. Better right-size for this tutorial (smaller Rails surface than the marketplace RSC demo): - memory: 2Gi → 1Gi. Enough headroom for Rails + the Pro Node renderer in one container without reserving capacity that won't be used. - capacityAI: false → true. Adjusts CPU/memory within the single replica based on observed usage, so the 1Gi/300m baseline grows if actual workload warrants it. Matches the marketplace demo's capacityAI posture without copying its oversized static baseline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 584921b commit b9f846e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.controlplane/templates/rails.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ spec:
1515
# Inherit other ENV values from GVC
1616
inheritEnv: true
1717
image: {{APP_IMAGE_LINK}}
18-
# Bumped from 512Mi because the container now runs both Rails and the
19-
# Pro Node renderer. Matches the marketplace demo's rails.yml.
20-
memory: 2Gi
18+
# 1Gi (up from 512Mi) gives the single container enough headroom for
19+
# Rails + the Pro Node renderer. Below the marketplace demo's 2Gi
20+
# because this tutorial's Rails surface is smaller; capacityAI below
21+
# adjusts upward if actual usage warrants it.
22+
memory: 1Gi
2123
ports:
2224
- number: 3000
2325
protocol: http
@@ -28,7 +30,9 @@ spec:
2830
autoscaling:
2931
# Max of 1 effectively disables autoscaling, so a like a Heroku dyno count of 1
3032
maxScale: 1
31-
capacityAI: false
33+
# CapacityAI adjusts CPU/memory within the single replica based on observed
34+
# usage, so the 1Gi/300m baseline can grow if Rails + renderer need more.
35+
capacityAI: true
3236
firewallConfig:
3337
external:
3438
# Default to allow public access to Rails server

0 commit comments

Comments
 (0)