RFC 6585 Quiz

Additional HTTP Status Codes

0 / 0

References (URLs)

Goal: choose more precise status codes for rate limiting, conditional updates, oversized headers, and captive portals, while keeping retry and cache behavior understandable.

Q1: What is the best high-level reason RFC 6585 exists

Multiple Choice
**Explanation:** **Context (why chosen):** The point of RFC 6585 is not “more status codes for trivia.” It is to improve interoperability when generic responses such as 400, 403, or 503 hide the next action clients should take. **Terms:** **status codes** are part of the protocol contract between server and client. A **more precise** status code narrows the meaning of the failure and suggests a better retry or recovery strategy. **Real-world usage:** In practice this helps API gateways, SDKs, browsers, and operators distinguish rate limiting, precondition failures, header-size problems, and captive-portal interception. **Options:** - A (incorrect): RFC 6585 adds a few targeted codes. It does not replace the whole status-code space. - B (correct): This is the core motivation of the RFC. - C (incorrect): The RFC is not defining a new auth scheme. **Related:** A good review question is not “do we have a special code available,” but “would a more precise response change client behavior in a useful way.”

Q2: Which situation is the strongest fit for 428 Precondition Required

Multiple Choice
**Explanation:** **Context (why chosen):** `428 Precondition Required` is easy to confuse with generic conflict handling, but the RFC frames it around making clients use conditional requests to avoid the lost-update problem. **Terms:** A **precondition** is something like `If-Match` that must evaluate successfully before the method is applied. A **lost update** happens when one client overwrites another client's newer change without realizing it. **Real-world usage:** This shows up in document editing APIs, config stores, and admin panels where multiple actors may update the same resource. **Options:** - A (correct): This is the textbook 428 use case. - B (incorrect): Per-minute quota exceedance is the domain of `429 Too Many Requests`. - C (incorrect): Network login interception is what `511 Network Authentication Required` is for. **Related:** The important design move is not merely returning an error, but forcing the client to prove which version it intended to update.

Q3: A client receives 428 after trying to update a resource. What retry strategy best matches the RFC's intent

Multiple Choice
**Explanation:** **Context (why chosen):** The value of `428 Precondition Required` lies in the recovery path. It should steer the client toward a conditional request, not a blind retry loop. **Terms:** A **validator** is metadata such as an `ETag` that helps identify a specific version of a representation. `If-Match` is a conditional header commonly used to say “apply this update only if the resource still matches this validator.” **Real-world usage:** This is the difference between safe collaborative editing and accidental data loss in dashboards, CMS tools, and admin APIs. **Options:** - A (incorrect): Retrying without a precondition leaves the lost-update risk unchanged. - B (correct): This follows the RFC's intended fix. - C (incorrect): `503 Service Unavailable` is not a substitute for missing preconditions. **Related:** A server that emits 428 should usually help the client understand which conditional mechanism it expects, rather than making the client guess.

Q4: Your API service is healthy overall, but one authenticated key exceeded its request quota. Which response is usually the best fit

Multiple Choice
Per-client quota exhaustion and whole-service overload look similar from far away, but they lead to different status codes and retry expectations.
One API key over quota per-client limit 429 Too Many Requests Whole service overloaded service availability 503 Service Unavailable
**Explanation:** **Context (why chosen):** Teams often blur per-client throttling with whole-service overload. RFC 6585 gives `429 Too Many Requests` so that clients can distinguish “you are over the limit” from “the service is down.” **Terms:** **429 Too Many Requests** is about request-rate or quota policy for the client. **503 Service Unavailable** is about broader service availability. **511 Network Authentication Required** is about local network access mediation, not ordinary API auth. **Real-world usage:** This affects SDK retry logic, dashboards, rate-limit observability, and whether on-call engineers page the whole service team or just adjust one tenant's traffic profile. **Options:** - A (correct): This is the best fit when the service is healthy but the client exceeded a limit. - B (incorrect): 503 implies a service-level availability problem rather than a client-specific quota issue. - C (incorrect): 511 is for captive portals or intercepting proxies. **Related:** If clients cannot tell quota exhaustion from server unavailability, they either retry too aggressively or route the incident to the wrong team.

Q5: Which statements about Retry-After are generally correct (select all)

Multi-Select
**Explanation:** **Context (why chosen):** `Retry-After` matters because a status code alone often says only “not now.” Well-designed clients also need timing guidance. **Terms:** **Retry-After** is a response header that indicates when the client may retry. It can be expressed as **delay-seconds** or as an **HTTP date**, depending on the response semantics. **Real-world usage:** This shapes SDK backoff policy, browser behavior, and API client fairness during rate limiting or temporary outages. **Options:** - A (correct): This is one of the most useful roles of `Retry-After`. - B (incorrect): `Retry-After` is not limited to integer seconds. An HTTP date is also valid. - C (correct): This is exactly why the header improves client behavior. - D (incorrect): It is helpful, but not universally mandatory on every 429 or 503. **Related:** A precise backoff hint is often the difference between graceful recovery and a retry storm.

Q6: Which statements about 431 Request Header Fields Too Large are generally true (select all)

Multi-Select
**Explanation:** **Context (why chosen):** `431 Request Header Fields Too Large` is not only about one bad header line. The RFC allows it for either a single oversized header field or an oversized set of headers. **Terms:** A **header field** is one named header entry. The **request header section** is the total set of request headers sent with the message. **Real-world usage:** This is common with cookie bloat, oversized auth tokens, forwarding chains, and proxy limits that are lower than application developers expect. **Options:** - A (correct): The code can cover the total header set being too large. - B (incorrect): Syntax errors are not the defining point here, and the issue is not limited to one field. - C (correct): The RFC encourages the response to identify the offending field when that is possible. - D (incorrect): Oversized bodies are a different problem from oversized headers. **Related:** Good 431 handling helps teams debug whether the problem lives in cookies, auth middleware, proxy forwarding, or client header construction.

Q7: A shared cache in front of your API sees a 429 for one tenant's token. Which handling best matches RFC 6585

Multiple Choice
**Explanation:** **Context (why chosen):** One subtle but important part of RFC 6585 is cache behavior. These responses are not meant to become shared reusable facts about unrelated requests. **Terms:** A **shared cache** can reuse a stored response across multiple users or clients. **request-specific conditions** include missing preconditions, quota state, header-size mistakes, or captive-portal network state. **Real-world usage:** This matters in CDNs, reverse proxies, and API gateways where accidental reuse of a 429 or 428 can create tenant bleed, misleading failures, or very confusing support tickets. **Options:** - A (incorrect): Replaying one tenant's 429 to other clients is exactly the kind of mistake the RFC tries to avoid. - B (correct): RFC 6585 says these specific responses must not be stored by caches. - C (incorrect): Rewriting protocol errors into 200 hides semantics and breaks client logic. **Related:** Status codes are not just UI messages. They also guide intermediaries, and that includes telling caches what not to reuse.

Q8: During a request flood or header-bomb attack, which operational choice is most consistent with RFC 6585

Multiple Choice
**Explanation:** **Context (why chosen):** RFC 6585 includes a pragmatic security note: sometimes the most accurate status code is not the most operationally sound thing to emit under attack. **Terms:** A **request flood** or **header-bomb** attack tries to consume server resources. A **defensive action** can include dropping the connection or otherwise refusing to spend more CPU on a detailed response. **Real-world usage:** This matters in DDoS mitigation, bot control, and edge-proxy defense where response generation itself may be expensive enough to worsen the incident. **Options:** - A (incorrect): The RFC explicitly leaves room for cheaper defensive behavior. - B (incorrect): 503 is not a universal replacement for all attack-related failures. - C (correct): This is the RFC-consistent operational mindset. **Related:** Precise semantics are valuable, but survivability comes first when the response itself becomes part of the attack cost.

Q9: Which deployment is the strongest fit for 511 Network Authentication Required

Multiple Choice
**Explanation:** **Context (why chosen):** `511 Network Authentication Required` is one of the easiest RFC 6585 codes to misuse. It is not a generic “authentication failed” response for ordinary origin applications. **Terms:** An **intercepting proxy** or **captive portal** sits on the network path and blocks broader access until the user satisfies some local network-login requirement. An **origin API** is the actual target application server. **Real-world usage:** This distinction matters in Wi-Fi onboarding, hotel portals, enterprise guest networks, and browsers or operating systems trying to detect network mediation cleanly. **Options:** - A (incorrect): Origin application session problems are not what 511 is for. - B (correct): This is the intended deployment model. - C (incorrect): Cache staleness is unrelated to 511. **Related:** If an app uses 511 for normal login failures, clients will misunderstand both the layer and the recovery path.

Q10: Which review comment shows the strongest RFC 6585 understanding

Multiple Choice
**Explanation:** **Context (why chosen):** The real value of RFC 6585 is not memorizing four numbers. It is being able to map each code to the right failure layer, recovery path, and intermediary behavior. **Terms:** **quota exhaustion**, **service outage**, **conditional writes**, **caching**, and **network mediation** are the recurring design dimensions that make these codes useful rather than decorative. **Real-world usage:** This kind of review comment improves API contracts, client backoff logic, cache safety, and captive-portal handling across browsers, apps, and gateways. **Options:** - A (correct): This captures the design intent of the RFC at an operational level. - B (incorrect): Clients still need robust fallback handling because not every server uses the newer codes. - C (incorrect): 511 is intentionally narrower than generic login or application authentication failure. **Related:** Strong RFC 6585 understanding means you can explain not only what each code means, but why each one changes retries, caching, and ownership boundaries.