Orders API
Four components of an orders API and three views of them: the components alone, a developer laptop, and production, shown here with --view production. A view with an environment nests hosts like boundaries — a region with two nodes and a managed database — and draws instances of components, labelled with their id, such as Orders API (api-1). Only the instanceConnections it lists are drawn, each with the label and technology of the model connection it names. The description names the environment, the table every instance. Illustrative values.
Orders API
examples/api-environments.json{
"schemaVersion": 1,
"type": "architecture",
"title": "Orders API",
"source": "Operations handbook, orders model",
"width": 1000,
"height": 520,
"architecture": {
"components": [
{
"id": "client",
"label": "Shop front end",
"kind": "frontend"
},
{
"id": "lb",
"label": "Load balancer",
"symbol": "load-balancer"
},
{
"id": "api",
"label": "Orders API",
"sublabel": "Node.js"
},
{
"id": "db",
"label": "Orders",
"sublabel": "Postgres",
"kind": "database"
}
],
"connections": [
{
"id": "call",
"from": "client",
"to": "lb",
"label": "places orders",
"technology": "HTTPS"
},
{
"id": "route",
"from": "lb",
"to": "api",
"label": "routes",
"technology": "HTTP"
},
{
"id": "query",
"from": "api",
"to": "db",
"label": "reads, writes",
"technology": "SQL"
}
],
"views": [
{
"key": "logical",
"title": "Orders API: components",
"components": [
"client",
"lb",
"api",
"db"
]
},
{
"key": "local",
"title": "Orders API on a developer machine",
"environment": "Local",
"hosts": [
{
"id": "laptop",
"label": "Developer laptop"
}
],
"instances": [
{
"id": "api-dev",
"of": "api",
"in": "laptop"
},
{
"id": "db-dev",
"of": "db",
"in": "laptop"
}
],
"instanceConnections": [
{
"id": "query",
"from": "api-dev",
"to": "db-dev"
}
]
},
{
"key": "production",
"title": "Orders API in production",
"environment": "Production",
"hosts": [
{
"id": "region",
"label": "Region eu-central-1"
},
{
"id": "node-a",
"label": "Node A",
"in": "region"
},
{
"id": "node-b",
"label": "Node B",
"in": "region"
},
{
"id": "data",
"label": "Managed database",
"in": "region"
}
],
"instances": [
{
"id": "lb-prod",
"of": "lb",
"in": "region"
},
{
"id": "api-1",
"of": "api",
"in": "node-a"
},
{
"id": "api-2",
"of": "api",
"in": "node-b"
},
{
"id": "db-prod",
"of": "db",
"in": "data"
}
],
"instanceConnections": [
{
"id": "route",
"from": "lb-prod",
"to": "api-1"
},
{
"id": "route",
"from": "lb-prod",
"to": "api-2"
},
{
"id": "query",
"from": "api-1",
"to": "db-prod"
},
{
"id": "query",
"from": "api-2",
"to": "db-prod"
}
]
}
]
}
}Focus
Source: Operations handbook, orders model
Show chart data
| Instance | Kind | Boundary | Connects to |
|---|---|---|---|
| Load balancer (lb-prod) | service, load balancer | Region eu-central-1 | Orders API (api-1) (routes, via HTTP), Orders API (api-2) (routes, via HTTP) |
| Orders API (api-1) | service | Region eu-central-1 › Node A | Orders (db-prod) (reads, writes, via SQL) |
| Orders API (api-2) | service | Region eu-central-1 › Node B | Orders (db-prod) (reads, writes, via SQL) |
| Orders (db-prod) | database | Region eu-central-1 › Managed database |