Volume 7 · Chapter 11 — Advanced .NET Engineering, Performance & Production Excellence
Volume 7 Summary and Interview Rapid-Fire
What This Volume Covered
- .NET runtime internals - CLR, IL, JIT, tiered compilation, AOT
- Garbage collection and memory management
- Async programming and the thread pool
- Performance optimization, measured first
- High-performance ASP.NET Core APIs
- Observability with metrics, traces, and logs
- Structured, correlated, secure logging
- Resilience engineering patterns
- Production troubleshooting method
- The principal engineer production playbook
How the Pieces Fit Together
This volume is the arc from “how the runtime works” to “how to run systems well at scale.” Runtime and GC knowledge explains where performance and memory problems come from; async and API design determine how much load a service sustains; observability lets you see what is happening; resilience patterns keep the system up when parts fail; troubleshooting turns telemetry into fixes; and the production playbook makes all of it a repeatable organizational capability through SLOs, progressive delivery, and disciplined incident response. The through-line ismeasure, design for failure, and automate.
Does async make code parallel?
No - async is non-blocking waiting for scalability; parallelism is simultaneous execution for speed. You can combine them withTask.WhenAll.
Why does .Result cause deadlocks?
It blocks the thread the awaited continuation needs to resume on (with a sync context), so each waits for the other - and it starves the thread pool under load.
What is a .NET memory leak?
Unintended retention - an object still reachable when you no longer want it, so the GC correctly will not collect it. Fix the reference, not the memory.
N+1 query in one line?
One query for a list plus one per item for related data - fix with a single projected query or Include/JOIN.
Circuit breaker half-open state - why?
To test recovery with a trial call without flooding a just-recovered dependency; success closes the circuit, failure re-opens it.
Liveness vs readiness probe?
Liveness = restart if the process is wedged (check only itself); readiness = route traffic only when able (may check dependencies).
Metrics vs traces vs logs?
Metrics say something is wrong, traces say where, logs say why - correlated by a shared trace id.
RTO vs RPO?
RTO = how fast you must recover service; RPO = how much data (in time) you can afford to lose.
What is an error budget?
The allowed shortfall from an SLO; while it remains you ship fast, when it is spent you prioritize reliability.
First thing to do in an outage?
Stabilize customer impact (rollback/failover/scale/flag), then diagnose root cause with evidence.