Backward Compatibility

Summary: The ability of newer code to read and process data that was written by an older version of the same code or format.

Sources: chapter4

Last updated: 2026-04-18


Backward compatibility is essential for systems that store historical data or for applications that are upgraded using rolling rollouts.

Implementation

  • Fields: If you add a new field to your data format, the new version of the code should be able to read data that lacks that field (usually by providing a default value).
  • Versioning: Using version numbers in data files or database schemas (source: chapter4, p. 112).
  • Schema Evolution: Using binary formats like avro, thrift, or protocol-buffers that support adding or removing fields while maintaining compatibility (source: chapter4).

Contrast

Compare with forward-compatibility, which is the ability of older code to process data produced by newer versions.