Course booking: deployment
The deployment template: a logical model of the images, the managed queue, database and object storage, and a view of production — a cloud region holding a container cluster with two nodes, one API instance on each, and a node pool for the worker. defaultView makes the production view the one that renders; --view logical shows the model. Illustrative values.
Course booking: deployment
examples/booking-deployment.json{
"schemaVersion": 1,
"type": "architecture",
"title": "Course booking: deployment",
"height": 1000,
"architecture": {
"components": [
{
"id": "learner",
"label": "Learner",
"kind": "person"
},
{
"id": "ingress",
"label": "Ingress",
"sublabel": "load balancer"
},
{
"id": "api",
"label": "Booking API",
"sublabel": "image: web app and API",
"kind": "artifact"
},
{
"id": "worker",
"label": "Worker",
"sublabel": "image: background jobs",
"kind": "artifact"
},
{
"id": "jobs",
"label": "Job queue",
"sublabel": "managed queue",
"kind": "queue"
},
{
"id": "db",
"label": "Bookings",
"sublabel": "managed database",
"kind": "database"
},
{
"id": "files",
"label": "Certificates",
"sublabel": "object storage",
"kind": "storage"
}
],
"connections": [
{
"id": "open",
"from": "learner",
"to": "ingress",
"label": "opens",
"technology": "HTTPS"
},
{
"id": "route",
"from": "ingress",
"to": "api",
"label": "routes",
"technology": "HTTP"
},
{
"id": "query",
"from": "api",
"to": "db",
"label": "reads, writes",
"technology": "SQL/TLS"
},
{
"id": "enqueue",
"from": "api",
"to": "jobs",
"label": "queues jobs"
},
{
"id": "deliver",
"from": "jobs",
"to": "worker",
"label": "delivers"
},
{
"id": "store",
"from": "worker",
"to": "files",
"label": "stores certificates"
},
{
"id": "update",
"from": "worker",
"to": "db",
"label": "updates",
"technology": "SQL/TLS"
}
],
"mainPath": [
"learner",
"ingress",
"api",
"jobs",
"worker",
"files"
],
"sameRank": [
[
"db",
"files"
]
],
"defaultView": "production",
"views": [
{
"key": "logical",
"title": "Course booking: deployable parts",
"components": [
"learner",
"ingress",
"api",
"worker",
"jobs",
"db",
"files"
]
},
{
"key": "production",
"title": "Course booking in production",
"environment": "Production",
"hosts": [
{
"id": "region",
"label": "Cloud region"
},
{
"id": "cluster",
"label": "Container cluster",
"in": "region"
},
{
"id": "nodeA",
"label": "Node A",
"in": "cluster"
},
{
"id": "nodeB",
"label": "Node B",
"in": "cluster"
},
{
"id": "workerPool",
"label": "Node pool: workers",
"in": "cluster"
}
],
"instances": [
{
"id": "ingress-prod",
"of": "ingress",
"in": "cluster"
},
{
"id": "api-1",
"of": "api",
"in": "nodeA"
},
{
"id": "api-2",
"of": "api",
"in": "nodeB"
},
{
"id": "worker-1",
"of": "worker",
"in": "workerPool"
},
{
"id": "jobs-prod",
"of": "jobs",
"in": "region"
},
{
"id": "db-prod",
"of": "db",
"in": "region"
},
{
"id": "files-prod",
"of": "files",
"in": "region"
}
],
"instanceConnections": [
{
"id": "route",
"from": "ingress-prod",
"to": "api-1"
},
{
"id": "route",
"from": "ingress-prod",
"to": "api-2"
},
{
"id": "query",
"from": "api-1",
"to": "db-prod"
},
{
"id": "query",
"from": "api-2",
"to": "db-prod"
},
{
"id": "enqueue",
"from": "api-1",
"to": "jobs-prod"
},
{
"id": "enqueue",
"from": "api-2",
"to": "jobs-prod"
},
{
"id": "deliver",
"from": "jobs-prod",
"to": "worker-1"
},
{
"id": "store",
"from": "worker-1",
"to": "files-prod"
},
{
"id": "update",
"from": "worker-1",
"to": "db-prod"
}
]
}
]
}
}Focus
Show chart data
| Instance | Kind | Boundary | Connects to |
|---|---|---|---|
| Ingress (ingress-prod) | service | Cloud region › Container cluster | Booking API (api-1) (routes, via HTTP), Booking API (api-2) (routes, via HTTP) |
| Booking API (api-1) | artifact | Cloud region › Container cluster › Node A | Bookings (db-prod) (reads, writes, via SQL/TLS), Job queue (jobs-prod) (queues jobs) |
| Booking API (api-2) | artifact | Cloud region › Container cluster › Node B | Bookings (db-prod) (reads, writes, via SQL/TLS), Job queue (jobs-prod) (queues jobs) |
| Job queue (jobs-prod) | queue | Cloud region | Worker (worker-1) (delivers) |
| Worker (worker-1) | artifact | Cloud region › Container cluster › Node pool: workers | Certificates (files-prod) (stores certificates), Bookings (db-prod) (updates, via SQL/TLS) |
| Bookings (db-prod) | database | Cloud region | |
| Certificates (files-prod) | storage | Cloud region |