3 ms·
I always found it strange how state machines work so nicely in the small but tend to be difficult to scale up to large-scale, distributed systems. Orchestrator
by lenkite 4y ago
I always found it strange how state machines work so nicely in the small but tend to be difficult to scale up to large-scale, distributed systems.
Orchestrators like Kubernetes discourage designing state machines and transitions inside resource controllers. Instead a list of conditions associated with the object's status define a "phase" (state in k8s term). But there are no formal event-based transitions between states. Depending on the conditions and their tri-boolean values: True/False/Unknown, the object is effectively in a different phase.
Effectively, kubernetes recommends treating Resources like a game ECS - the controller is the system, the resource is the entity and the conditions are the state components.