Capstone architecture and requirements
Start with an explicit service contract
Northstar Docs is a fictional documentation service. Your goal is to deliver public versioned files and an authenticated profile API through a single HTTPS entry point. The learner has already studied TLS, reverse proxying, routing, rate limiting, progressive delivery and operations. Begin with observable outcomes, not a large configuration. Public assets may be cached for five minutes; the profile must never be stored in a shared cache. An unexpected host or unknown route must fail explicitly. A candidate backend must be independently reversible. The local fixture uses a demo credential, not production authentication.
GET /assets/guide-v1.txt -> 200, public max-age=300GET /api/profile without credential -> 401GET /api/profile with demo credential -> 200, no-storeUnknown route -> 404; unexpected host -> 421Draw trust boundaries and failure domains
A trust boundary is where data crosses between components with different privileges. In the lab, the client validates a generated localhost certificate and connects to the edge. Two Python HTTP servers listen only on loopback. The edge replaces forwarded identity headers because it receives direct connections. In production, a load balancer would change this boundary: accept identity only from explicitly trusted peers and prevent direct access to origins. Separate the metrics listener from the public listener. The lab shares a host and cannot survive host failure; real redundancy needs independent domains.
Client -- verified HTTPS --> Nginx edge |-- static files |-- private backend v1 (stable) |-- private backend v2 (candidate)Authorized monitor --> separate loopback status listenerChoose the cache and authentication boundary
An asset whose bytes change should receive a new versioned name. A short public lifetime then makes repeated reads cheaper for clients without accidentally reusing a personalized response. The example is a configuration fragment from the full local fixture. API caching is explicitly disabled, upstream Cache-Control replaced with no-store, and authorization enforced at the synthetic backend. The edge cannot make an application authorization decision simply by disabling caching. For a real service use an identity provider and resource-specific authorization. Do not send sensitive values in URLs.
location = /assets/guide-v1.txt { root html; default_type text/plain; add_header Cache-Control "public, max-age=300";}# API location: proxy_cache off; add_header Cache-Control "no-store" always;Decide what health and security mean
An edge health endpoint establishes that the Nginx process can answer. A successful authenticated request through the proxy is a separate check of the application. Neither establishes that every dependency is healthy. Specify rate policy, body size, timeouts, supported TLS and logs. The lab has a deliberately low rate on a separate synthetic route to demonstrate 429 without generating significant traffic. TLS terminates at the direct edge; loopback origins do not use mTLS here. Reassess origin encryption and certificate identity when components leave the host. This fragment is not a full server configuration.
ssl_protocols TLSv1.2 TLSv1.3;client_max_body_size 16k;location = /healthz { return 200 "edge alive"; }location / { return 404; }Apply what you learned
Practice: Add a public search endpoint and a private saved-pages endpoint to the fictional documentation service. Draw the trust boundaries, specify cache and auth policies, status codes, readiness checks and a failure-domain limitation. Do not deploy anything. The manual exercise and quiz are staged separately. Related references and the next lesson are listed in the chapter authored map.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Capstone architecture and requirements
Assess the professional delivery capstone.
Which response may be shared-cache eligible?
What must a profile API require?
Where is client identity established in this lab?
What does a 200 edge health response prove?
What is the lab host failure domain?