Cloud Run Concurrency Behavior Under Sustained Traffic
0 reputation · 22 Aug 2021, 12:20 UTC
Cloud Run Concurrency Behavior Under Sustained Traffic
Cloud Run allows configuring request concurrency from 1 to 1000 using the --concurrency flag during deployment. When traffic arrives, instances scale from zero and handle requests up to the configured concurrency limit before additional instances are spawned. This scaling mechanism should distribute load across multiple instances when concurrency is exceeded.
The interaction between concurrency settings and sustained traffic patterns raises questions about instance lifecycle and request distribution. While Cloud Run documentation confirms that additional instances spawn when concurrency limits are reached, the specific behavior during sustained traffic—particularly whether instances maintain stable concurrent request counts or exhibit variable patterns—requires verification.
Current deployment flags and their interaction with autoscaling thresholds may influence this behavior differently than documented examples suggest. Understanding the precise relationship between configured concurrency, actual instance-level concurrency, and scaling decisions under sustained load remains an unresolved area.
1. How does Cloud Run's actual per-instance concurrency compare to the configured --concurrency value under sustained traffic patterns? 2. What scaling behavior occurs when sustained traffic maintains request rates near the configured concurrency limit? 3. How do CPU allocation differences between --cpu/--memory flag combinations affect concurrency handling during sustained loads?