The interview problem

Practice prompt

Old and new clients exchange serialized messages during a rolling upgrade. Design field evolution without reinterpreting stored data.

Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.

1. Scope and worked approach

Assume a tagged binary format with documented unknown-field behavior. Assign stable field numbers, reserve deleted numbers and distinguish presence from default values. Add optional fields with compatible semantics, then deploy readers before writers depend on them. Keep schema and message-version fixtures for old clients and persisted messages. Structural parse success does not imply business compatibility.

2. Trace the design or derivation

Reserve stable tags
  → define presence
  → update readers
  → enable writers
  → retire old semantics

Test the actual intermediary path, including JSON conversion and database storage, rather than only direct serializer round trips. A proxy that drops unknown fields can break a later consumer even when both endpoint libraries preserve them. Keep golden byte fixtures immutable so accidental tag reuse is detected during review.

3. Calculate the example

If field number 7 once meant account balance and is later reused for loyalty points with the same wire type, an old message may parse successfully but be interpreted as points. Reserving 7 prevents that silent semantic collision.

4. Failure cases and trade-offs

Changing units or enum meaning can break clients without changing wire shape. Some conversion paths discard unknown fields. Broad backward compatibility reduces migration friction but can prolong legacy semantics; explicit version transitions may be safer for incompatible meaning changes.

5. Validation, follow-ups and self-review

Round-trip old bytes through new readers and intermediaries. Follow-up: how do unknown enum values behave? Self-review: separate wire compatibility, field presence and semantic compatibility.

Sources and related practice

Technical reference: protobuf.dev — Field-number evolution and reservation.

Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.

Continue with Design a schema registry for event producers; Integrate an AI workflow with an unreliable legacy API.

Continue your preparation

Choose a connected learning path or browse more System design questions. Read our editorial method and attribution policy.