FastAPI is built on Starlette and Pydantic, and understanding where each layer begins and ends clarifies when to use each. Starlette provides the ASGI foundation: routing, middleware, WebSockets, request/response objects, and async support. Pydantic handles data validation and JSON Schema generation. FastAPI's contribution is wiring your function type hints to both — automatically parsing and validating request data, serializing responses, generating OpenAPI docs (Swagger UI and ReDoc), and providing dependency injection. Middleware, WebSocket primitives, and async behavior are identical in both frameworks since FastAPI re-exports Starlette's implementations. Starlette is the better choice for webhook receivers, WebSocket-heavy services, custom request parsing, or when minimizing dependencies matters. For typical CRUD APIs and internal services where automatic validation and docs add value, FastAPI's layer is worth the trade. A key performance gotcha: sync `def` handlers run in a threadpool capped at 40 workers by default, which can cause queuing under load.