Refine `Runtime` model to account for different work loads
The following discussion from !29725 (merged) should be addressed:
-
@engwan started a discussion: (+4 comments) I also didn't add it to this runtime list because
identify
would say it's ambiguous because it's also Puma.Do you think it's needed here?
With the work on real-time and introducing dedicated ActionCable
servers that run on either Puma or Unicorn, we're facing the problem that the definitions of Runtime
s don't quite fit anymore. So far we had:
runtime | implies |
---|---|
puma | web_server |
unicorn | web_server |
sidekiq | !web_server |
i.e. we had two implicit work loads, web servers and background jobs but that is encoded in a binary fashion via web_server? => true|false
.
Another example of this has been the addition of a specific geo
related runtime, which is probably not a separate runtime but rather a flavor of either puma or unicorn that we run.
(There are more runtimes to detect test
, rake
and other non-prod use cases but they do not matter in this discussion.)
Now with websockets and ActionCable, we happen to run a web server (puma or unicorn) that need special setup because the work loads they serve are quite different from ordinary web requests. This doesn't fit the model anymore because ActionCable
isn't really its own runtime, as it runs puma or unicorn and we cannot have more than 1 runtime active at any time.
We should extend the model to account for particular work loads or "variants" in which a runtime can execute, i.e.:
runtime | work load | encoding |
---|---|---|
puma | web | puma_web? |
puma | cable | puma_cable? |
unicorn | web | unicorn_web? |
unicorn | cable | unicorn_cable? |
sidekiq | jobs | sidekiq?* |
*until we have more than one job system, this is probably still enough.
In this model, all existing puma?
checks should be changed to puma_web?
as the "web" bit is currently implied. It is also unclear whether web_server?
should include cable
workloads or not. Judging by how it is currently used, probably yes, but we should consider renaming it or it will get really confusing.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.