Global vs. Per‑Route Serialization in Fastify: Which Approach Yields Better Performance for High‑Throughput APIs?
Goal We want to deliver a high‑throughput, read‑only API where the JSON response shape is stable across many requests. Constraints Minimize per‑request CPU spent on serialization. Keep startup time acceptable for rapid deployment cycles. Maintain flexibility to change response schemas without a full rebuild. Ensure that error responses and non‑JSON payloads