KatInterview

Critiquing a Flag Service Proposal for an Inference API

System DesignModel answer
HardModel answerSystem Designdesign-reviewfeature-flagsreliability

Last updated

Review a proposed runtime toggle service that polls one database, then rank its weaknesses and explain how to deliver the feedback to the author.

Context

You are a senior engineer on a platform that serves a busy AI inference API. A colleague has circulated a design document for a runtime toggle service. Developers would use it to switch between model weights or turn experimental UI pieces on and off without redeploying.

The proposal describes the following:

  • One central PostgreSQL database holds the current state of every toggle.
  • Each service uses a shared library that downloads the whole JSON configuration from that database every 60 seconds.
  • When the database cannot be reached, services fall back to a hardcoded OFF value for all toggles.
  • The document says nothing about caching, multi-region serving, or an audit trail of changes.

Your task

Describe how you would review this document and what you would tell the author. Cover the following:

  1. How you check that the design satisfies the stated business needs.
  2. How you judge technical soundness, including reliability and failure modes.
  3. How you reason about performance and scalability as the fleet grows.
  4. How you decide whether the system can be maintained and operated in production.

Also explain how you would rank the problems you find and how you would phrase your feedback so the author can act on it.

Hints

Hint 1

Before critiquing, list the assumptions the document leaves out (fleet size, number of toggles, acceptable propagation delay) and judge the design against those.

Hint 2

Ask what happens to a toggle that has been ON for weeks when the database becomes slow or unavailable. Think about the blast radius across every service.

Hint 3

Estimate the load: instances x config size / poll interval. Then think about what happens when all instances poll at the same moment after a recovery.

Hint 4

Separate issues into blocking, must-fix-before-launch, and suggestions, and explain the impact of each in terms the author can relate to.