liveBook · Manning

Deployment model

As explained in Designing AI Systems

Deployment configuration is the set of settings that specifies how a workflow is exposed, scaled, and run on a platform.

Deployment configuration marks a workflow with its name, API path, replica bounds, CPU scaling threshold, and response mode. A decorator stores these settings as metadata on a wrapper that preserves the function’s normal behavior, allowing a deployment tool to discover the settings after importing the Python file. section 2.5.3

    wrapper._workflow_metadata = {
            "name": name,
            "api_path": api_path,
            "scaling": {
                "min_replicas": min_replicas,
                "max_replicas": max_replicas,
                "target_cpu_percent": target_cpu_percent
            },
            "response_mode": response_mode
        }
        
        return wrapper
    return decorator

The metadata dictionary groups identity, scaling, and response-mode settings for deployment discovery. section 2.5.3

How Designing AI Systems covers it

How deep it goes
Implements decorator-based metadata storage and discovery, while leaving the deployment tool’s later build steps unspecified.
Examples
Uses a patient-intake workflow and settings for its API path, replica range, CPU threshold, and response mode.
What you can do after
Configure a workflow with deployment metadata while preserving its normal function behavior.
How it connects
Connects decorators with API paths, autoscaling, response modes, and command-line deployment.

Also explained in

Compare how 2 books explain deployment model →

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.