All Questions
Api Design hard

Your API has 3 live versions (v1, v2, v3) with overlapping code paths. Maintenance is expensive. What's a sustainable approach?

  1. A Deploy three independent containerized microservices, each running a frozen version of the codebase that corresponds to a specific API version's business requirements.
  2. B Maintain a single 'head' codebase with version-aware transformation proxies that explicitly translate internal business objects into the specific schema shapes required by legacy versions.
  3. C Enforce a strict 'Latest Version Only' policy that automatically rejects requests to deprecated endpoints, forcing all mobile and third-party clients to upgrade within a zero-day window.
  4. D Use a shared database schema with version-specific SQL views that hide or reveal new columns based on the 'X-API-Version' header provided by the client application.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions