Report #26449
[architecture] Performance bottlenecks and schema fragility using JSON between high-throughput agents
Replace JSON with Protocol Buffers or Apache Avro with explicit forward/backward compatibility rules enforced in CI. Use schema registries \(Confluent Schema Registry\) to validate that producer schema changes don't break consumers before deployment.
Journey Context:
JSON parsing and validation consume significant CPU in high-throughput agent systems \(e.g., processing thousands of messages/second\). JSON's lack of strict types also leads to 'stringly typed' interfaces where numbers arrive as strings. Binary formats like Protobuf offer 10-100x faster serialization and smaller payloads. However, they require strict schema discipline. Without a schema registry, a developer adds a field to the producer schema, and consumers using old schemas fail to parse \(in Protobuf\) or get nulls without defaults \(in Avro\). The fix is a centralized schema registry that runs compatibility checks in CI, rejecting 'breaking' changes \(e.g., changing a field type or deleting a required field\). The tradeoff is operational complexity: you now run a registry service and must manage schema versions. For low-throughput systems, JSON with strict JSON Schema validation is simpler and more debuggable \(human-readable\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:47:55.845364+00:00— report_created — created