FastAPI and orjson: Interoperability Boundaries When Overriding json_loads for Concurrent Body Parsing
FastAPI parses incoming request bodies synchronously through Pydantic’s BaseModel and Python’s standard json module. Under high concurrency, this synchronous step can block the event loop and inflate response latency for large payloads. One documented integration point is FastAPI’s json_loads hook, which allows substituting an alternative parser such as orjs