rust-lang / rust-playground

The Rust Playground
https://play.rust-lang.org/
Apache License 2.0
1.24k stars 207 forks source link

Limit concurrency of active backends, not Coordinators #1065

Closed shepmaster closed 4 months ago

shepmaster commented 4 months ago

Each Coordinator can have 0-3 backends running as it abstracts over {stable,beta,nightly} and each backend is lazily created and idled.

The "good" failure case was that we could be off by a factor of 3 in the upper bound. The catastrophic failure case was for the WebSocket connections where there are thousands of Coordinators idling with very few of them actively compiling at a time. Setting a low limit would prevent connections, setting a high limit was basically pointless.