Spike: feature gates that switch on runtime, node or process
We often have the problem that we need to enable/disable feature toggles for a single node or even single worker i.e. process.
This is currently not possible because we only support domain entities as features gates (user, project, etc.)
We should explore having feature gates that toggle FFs based on smaller granularities such as:
- The current runtime (
sidekiq
,puma
) - The current node (
Socket.gethostname
) - The current worker or process (
Process.pid
orPrometheus::PidProvider.worker_id
)
As we go down the hierarchy of these, we need to construct unique identifiers since PIDs and worker IDs are unique only per container, not globally.
This came up in this discussion: gitlab-com/gl-infra/k8s-workloads/gitlab-com!2350 (comment 1181530160)