Skip to main content

All-In strategy example

The All-In strategy instantly switches 100% of traffic to the new version in a single step, with no rollback enabled by default.

💡 TIP: se it in non-production environments (such as development or staging) where quick rollouts matter more than gradual traffic shifting.

Using the web interface​

From Platform Settings > Deployment Strategies > New deployment strategy:

  1. Target the configuration: Select the resource, dimensions, and scope types your strategy will apply to.

  2. Name and describe the strategy. For example:

    • Name: All-In
    • Description: Switches all traffic instantly with no rollback
  3. Configure rollback settings and traffic switch: Use this configuration example for a blue-green deployment with HTTP error rollback.

    deployment-strategy-all-in

Using the API​

Send a POST request to the Create deployment strategy endpoint with the example request below.

important

If you're using the request example below, remember to set your nrn and dimensions values before sending the request.

curl -L 'https://api.nullplatform.com/deployment_strategy' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"name": "All In",
"description": "Switches all traffic instantly with no rollback",
"nrn": "organization=1:account=2",
"dimensions": {
"environment": "staging"
},
"scope_type_ids": [],
"parameters": {
"type": "object",
"title": "Deployment strategy parameters",
"uiSchema": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/metrics/properties/enabled",
"label": "Enable metric-based rollback"
},
{
"type": "Control",
"scope": "#/properties/metrics/properties/rules",
"label": "",
"options": {
"style": {
"p": 2,
"bgcolor": "background.surface",
"borderRadius": ".5rem",
"& .MuiInputBase-input": {
"bgcolor": "background.paper",
"borderRadius": ".5rem"
},
"& .MuiOutlinedInput-root": {
"bgcolor": "background.paper",
"borderRadius": ".5rem"
}
}
},
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/metrics/properties/enabled",
"schema": {
"const": true
}
}
}
},
{
"type": "Control",
"scope": "#/properties/traffic/properties/enable_auto_switch",
"label": "Customize traffic switch"
},
{
"type": "Group",
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/traffic/properties/enable_auto_switch",
"schema": {
"const": true
}
}
},
"options": {
"style": {
"bgcolor": "background.surface",
"borderRadius": ".em",
"& .MuiInputBase-input": {
"bgcolor": "background.paper"
},
"& .MuiOutlinedInput-root": {
"bgcolor": "background.paper"
}
}
},
"elements": [
{
"type": "Control",
"scope": "#/properties/traffic/properties/step",
"label": "Step size",
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/traffic/properties/enable_auto_switch",
"schema": {
"const": true
}
}
}
},
{
"type": "Control",
"scope": "#/properties/traffic/properties/interval",
"label": "Interval in seconds",
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/traffic/properties/enable_auto_switch",
"schema": {
"const": true
}
}
}
}
]
}
]
},
"properties": {
"metrics": {
"type": "object",
"title": "Metrics configuration",
"description": "Configure metrics monitoring for deployment validation",
"default": {
"enabled": false,
"rules": []
},
"properties": {
"enabled": {
"type": "boolean",
"title": "Enable metric-based rollback",
"description": "Set a criteria for auto-rollback upon certain metric threshold is exceeded.",
"default": false
},
"rules": {
"type": "array",
"items": {
"type": "object",
"title": "Metric rule",
"properties": {
"name": {
"type": "string",
"title": "Metric name",
"description": "Name of the metric to monitor",
"examples": [
"error_rate",
"response_time",
"cpu_usage"
]
},
"operator": {
"type": "string",
"title": "Comparison operator",
"description": "How to compare the metric value against the threshold",
"oneOf": [
{ "const": "greater_than", "title": "Greater than or equal to" },
{ "const": "less_than", "title": "Less than or equal to" },
{ "const": "equals", "title": "Equals to" }
],
"default": "equals"
},
"threshold": {
"type": "number",
"title": "Threshold value",
"description": "Threshold value for the metric",
"placeholder": "eg., 10"
}
}
},
"default": []
}
},
"if": {
"properties": {
"enabled": {
"const": true
}
}
},
"then": {
"properties": {
"rules": {
"minItems": 1,
"items": {
"properties": {
"name": { "minLength": 2 },
"threshold": { "minimum": 0 }
},
"required": ["name", "threshold", "operator"]
}
}
}
}
},
"traffic": {
"type": "object",
"title": "Traffic management",
"description": "Configure traffic switching behavior",
"default": {
"enable_auto_switch": true,
"interval": 1,
"step": 1
},
"properties": {
"enable_auto_switch": {
"type": "boolean",
"title": "Customize traffic switch",
"description": "Set the pace at which the traffic switch phase will take place.",
"default": true
},
"interval": {
"type": "integer",
"title": "Interval in seconds",
"description": "Seconds between traffic increments",
"default": 1
},
"step": {
"title": "Step size",
"description": "Traffic increment step as percentage",
"oneOf": [
{ "const": 0.05, "title": "5%" },
{ "const": 0.1, "title": "10%" },
{ "const": 0.15, "title": "15%" },
{ "const": 0.2, "title": "20%" },
{ "const": 0.25, "title": "25%" },
{ "const": 0.3, "title": "30%" },
{ "const": 0.35, "title": "35%" },
{ "const": 0.4, "title": "40%" },
{ "const": 0.45, "title": "45%" },
{ "const": 0.5, "title": "50%" },
{ "const": 1, "title": "100%" }
],
"default": 1
}
},
"if": {
"properties": {
"enable_auto_switch": { "const": true }
}
},
"then": {
"required": ["interval", "step"],
"properties": {
"interval": { "minimum": 1, "maximum": 120 }
}
}
}
}
},
"type": "deployment"
}'