Sarvesvara Ramar — Occupation: Python Developer
You're designing a high-performance data processing pipeline in Python that needs to handle 100,000 requests per second. The pipeline involves I/O operations (database queries, API calls) and CPU-intensive transformations. Explain your architectural approach, specifically addressing: (1) how you would handle concurrency and parallelism, (2) the trade-offs between different Python concurrency models (threading, multiprocessing, asyncio), (3) potential GIL-related bottlenecks and mitigation strategies, and (4) how you would profile and optimize the system. Include specific Python libraries, design patterns, and real-world considerations in your answer.