All Questions
Api Design hard

Service A depends on Service B's API. B team wants to change a field. How do you prevent B from accidentally breaking A?

  1. A Implement Consumer-Driven Contract Testing (e.g., Pact), where the consumer defines its expectations as a suite of tests that the provider must satisfy during its own CI/CD pipeline.
  2. B Utilize a centralized version-control repository where every API schema change must be manually reviewed and approved by the lead architects of every dependent microservice.
  3. C Enforce a 'Non-Destructive' schema evolution policy that strictly forbids any modification to existing fields, requiring all updates to be implemented as entirely new endpoints.
  4. D Rely on an automated regression suite that performs end-to-end integration tests between the two services in a shared staging environment before every production release.

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

Get the app

Related questions