Contracts must tolerate independently deployed producers and consumers. Additive fields are often safer than renaming or changing existing meanings.
Before you start
You should understand HTTP, database transactions and the difference between one process and independently failing services. Draw the participants and message direction before choosing a pattern. Include timeout, duplicate delivery and recovery in the model instead of considering only successful requests.
The practical goal is to reason through this situation: A new optional response field can coexist with older clients. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.
Step-by-step walkthrough
Step 1: Inventory deployed consumers
Independent releases mean old and new clients coexist.
Step 2: Introduce compatibility
Support old and new forms during a planned migration window.
Step 3: Retire based on evidence
Measure usage and migrate consumers before removing the old contract.
Worked scenario
A new optional response field can coexist with older clients.
A renamed invoice field is added while the old field remains supported. Consumers adopt the new form at different times. Removing the old field immediately after updating one application breaks other deployed versions; additive syntax is useful only if meaning and validation remain compatible too.
Common mistake
Removing a field after updating only the server breaks consumers still deployed.
Verify the behavior
Run old and new consumer fixtures against each rollout stage.
Interview exercise
Migrate a required field.
Answer and reasoning
Introduce and support both forms, measure usage, migrate consumers and retire the old form through a planned compatibility window.
Continue learning
Compare the scenario with the Microservices interview questions and test your understanding with the Microservices MCQs. For terminology and implementation details, consult the reference material.