liveBook · Manning

State

As explained in Designing AI Systems

Actual state is the observed condition of a deployed workload and its running instances.

State records the observed condition of a deployed workload and its running instances. A deployment separates desired state, such as desired_replicas, from actual state, such as current_replicas and healthy_endpoints. section 9.5.2

A deployment's actual state includes:

  • The number of containers currently running. section 9.5.2
  • Container addresses currently healthy enough for API Gateway routing. section 9.5.2
  • A lifecycle status: deploying, healthy, or failed. section 9.5.2

Deployment status

After DeployWorkflow starts containers, status remains deploying until enough replicas pass readiness probes. It becomes healthy when the deployment meets that condition, or failed when containers cannot start. section 9.5.2

Listing 9.23 Deployment message types
message DeployWorkflowRequest {
    string workflow_id = 1;
    int32 version = 2;    #A
}
 
message DeployWorkflowResponse {
    string deployment_id = 1;
    string status = 2;    #B
}
 
message WorkflowDeployment {    #C
    string workflow_id = 1;
    string deployment_id = 2;
    int32 version = 3;
    string status = 4;
    int32 current_replicas = 5;
    int32 desired_replicas = 6;
    repeated string healthy_endpoints = 7;
}
 
message GetDeploymentStatusRequest {
    string workflow_id = 1;
}
 
message GetDeploymentStatusResponse {
    WorkflowDeployment deployment = 1;
}
 
message RollbackWorkflowRequest {
    string workflow_id = 1;
    int32 target_version = 2;    #D
}
 
message RollbackWorkflowResponse {
    WorkflowDeployment deployment = 1;
}

Inspect the WorkflowDeployment message, which places desired replicas, current replicas, healthy endpoints, version, and status in one deployment record. section 9.5.2

How Designing AI Systems covers it

How deep it goes
Distinguishes desired and actual replicas, healthy endpoints, and lifecycle status, but does not detail container internals.
Examples
Uses current_replicas, desired_replicas, healthy_endpoints, and deploying, healthy, or failed statuses.
What it assumes
Assumes familiarity with deployed workflows, containers, replicas, API Gateway routing, and readiness probes.
What you can do after
Operate/configure deployments by checking status, replica counts, readiness, and routable endpoints.
How it connects
Connects desired state with deployments, replicas, readiness probes, API Gateway routing, and rollback.

Also explained in

Compare how 52 books explain state →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Systems. The section links point to the parts of the book it draws on.