Skip to main content

Deployment, Diagnostics, Load Balancing & Capstone

This example is the capstone's release package. A HealthCheck.json manifest the load balancer can probe, a role-protected diagnostics page (server, port, runtime mode, product version, sessions, WebSocket state, uptime, live health checks — and no secrets), the sticky-sessions story for scaling out, and the written package: deployment checklist, release notes with a rollback plan, and the demo script that ties the twelve modules together.

Run it

cd "LearnWisej-Samples/Production Architecture Deep Dive\Module 12\TicketOps"
dotnet run -f net10.0 --urls http://localhost:5112

Then open http://localhost:5112 (or open TicketOps.slnx in Visual Studio and press F5). The probe's view of the node is http://localhost:5112/HealthCheck.json.

The screen

TicketOps — Diagnostics (Diagnostics/DiagnosticsPage inside Views/ReleaseConsole): the role header, ↻ Refresh, the runtime card, the health-check card with the overall status and HTTP code, and the health JSON. The first refresh runs one client round-trip after load, because Application.IsWebSocket is still false during Load. The session signs in as m.weber (Supervisor); any other role gets Access denied and no data. Open a second tab and refresh: Sessions reads 2 live on this node.

Where things live

TicketOps/
├─ HealthCheck.json the manifest: app, version, build, environment, checks (database, storage, websocket)
├─ Startup.cs Kestrel host; the file server refuses .json except /HealthCheck.json
├─ Views/ReleaseConsole the window hosting the diagnostics page
├─ Diagnostics/ DiagnosticsPage (display only)
├─ Services/ HealthCheckService, DiagnosticsService, IRuntimeInfo, IUserContext, IHealthCheckSource
├─ Domain/ HealthReport (200/503 rule), DiagnosticsSnapshot, OperatorRole, Ticket, OperationResult
├─ Data/ ITicketRepository + in-memory implementation (the database probe's target)
├─ Infrastructure/ WisejRuntimeInfo, FileHealthCheckSource, HealthCheckJson, SessionUserContext, ILog/ActivityLog, AppComposition
└─ docs/ DeploymentChecklist, ReleaseNotes, LoadBalancingNotes (+ SVG), DemoScript, ProductionReadinessNote