Designing and running HTTP APIs well: HTTP semantics, REST principles, API design (versioning, pagination, errors and contracts) and reliability features such as rate limiting, idempotency keys, caching and gateways, in ASP.NET Core 10.
-
Show how you would configure ASP.NET Core's rate limiting middleware for a .NET 10 API: AddRateLimiter, a policy partitioned by API key or user, different limits per endpoint, a 429 response with Retry-After, and what changes when the API runs on several instances.
Configuring Microsoft.AspNetCore.RateLimiting in .NET 10: AddRateLimiter, partitioned limiters by API key or user, per-endpoint policies, OnRejected with 429 and Retry-After, middleware order, and the per-instance limitation.
Mid-Level
Coding
API Reliability
Β· π 3 follow-ups Β· π 1 real-world
-
How do you design timeouts end to end for an ASP.NET Core API that calls other services and SQL Server? Explain HttpClient's timeout vs a per-attempt timeout, the request timeouts middleware, database command timeouts, how the layers should relate to each other, and how cancellation and deadlines propagate through the call chain.
End-to-end timeout budgets in .NET 10: HttpClient.Timeout vs per-attempt and total timeouts in the standard resilience handler, the request timeouts middleware, SQL command timeouts, infrastructure timeouts, and propagating cancellation and deadlines.
Mid-Level
Theory
API Reliability
Β· π 3 follow-ups Β· π 1 real-world
-
From the API designer's side, how do you make retries safe and predictable for clients? Which requests and status codes should clients retry, how do you use Retry-After, why do clients need backoff with jitter, and how does retry amplification across layers turn a small outage into a big one?
The retry contract of an HTTP API: retryable methods and status codes, Retry-After, exponential backoff with jitter, retry amplification across layers, retry budgets, and documenting retry guidance.
Mid-Level
Theory
API Reliability
Β· π 3 follow-ups Β· π 1 real-world
-
Implement idempotency keys for a payments POST endpoint in ASP.NET Core. How does the Idempotency-Key header work, what do you store and for how long, how do you handle two requests with the same key arriving at the same time, a reused key with a different body, and a failure halfway through?
Implementing the Idempotency-Key pattern in ASP.NET Core 10 with SQL Server: key scope, request fingerprint, stored responses, concurrent duplicates, mismatched payloads, partial failures, expiry and the IETF draft's status codes.
Senior
Coding
API Reliability
Β· π 3 follow-ups Β· π 1 real-world
-
How do ETags and conditional requests work in an HTTP API? Explain strong vs weak ETags, If-None-Match with 304 Not Modified for caching, and If-Match with 412 Precondition Failed for optimistic concurrency, and show how you would back an ETag with a SQL Server rowversion in ASP.NET Core.
ETags and conditional requests: strong vs weak validators, If-None-Match and 304 for bandwidth, If-Match, 412 and 428 for optimistic concurrency, and mapping a SQL Server rowversion through EF Core to ETag headers.
Mid-Level
Theory
API Reliability
Β· π 3 follow-ups Β· π 1 real-world
-
How do HTTP caching headers work for an API? Explain the main Cache-Control directives (max-age, s-maxage, no-cache, no-store, private, public), what Vary does, how browsers, CDNs and proxies use them, and the difference between response caching and output caching in ASP.NET Core.
HTTP caching for APIs: Cache-Control directives, Vary, private vs shared caches and CDNs, and ASP.NET Core's response caching middleware vs output caching in .NET 10.
Intermediate
Theory
API Reliability
Β· π 2 follow-ups
-
What does an API gateway do, and how do you decide what belongs in it? Compare Azure API Management and YARP, explain the cross-cutting concerns a gateway should own, where a backend-for-frontend (BFF) fits, and the signs that too much logic has moved into the gateway.
API gateways in .NET and Azure: Azure API Management vs YARP, the cross-cutting concerns a gateway should own, the BFF pattern, and the anti-pattern of business logic in the gateway.
Mid-Level
Theory
API Reliability
Β· π 3 follow-ups Β· π 1 real-world
-
A partner's integration starts retrying aggressively against your payments API: some customers are charged twice and the API slows down for every other partner. Walk me through how you would handle the incident, fix it with idempotency keys and rate limits, and work with the partner so it doesn't happen again.
Handling a partner retry storm on a payments API: incident triage, refunds, rate limits per partner, idempotency keys, Retry-After and error contracts, partner communication and long-term API governance.
Senior
RealWorldScenario
API Reliability
Β· π 3 follow-ups Β· π 1 real-world
-
After you turned on output caching, a customer reports seeing another customer's account details, and other users complain that changes they save don't show up for several minutes. How do you diagnose and fix both problems in an ASP.NET Core API, and how do you make sure caching can't leak data again?
Debugging ASP.NET Core output caching: cross-user data leaks from custom policies, missing vary keys and public Cache-Control, stale data from in-memory stores on multiple instances and missing tag eviction, and the controls that prevent it.
Senior
Debugging
API Reliability
Β· π 3 follow-ups Β· π 1 real-world