Is rollback safe after a protobuf schema addition in a gRPC service?
0 reputation · 17 Feb 2023, 19:20 UTC
An application deploys a new gRPC service version that adds optional fields to existing protobuf messages.
The older binary, still running in production, must continue to parse messages produced under the newer schema.
If the service is rolled back to the previous binary, does the older version reliably interpret the additional fields without data loss or misparsing?
The answer depends on whether the runtime preserves unknown fields and on the specific protobuf compatibility rules documented for message type updates.
The team must decide whether to rely on schema‑compatible additions or to version the API explicitly.
Can an older gRPC binary safely parse messages containing newly added fields after a rollback? Which protobuf compatibility rule governs unknown‑field preservation in the runtime in use? Is explicit API versioning required to guarantee rollback safety?