Posts Tagged: benchmark
-
Scaling FastAPI WebSockets to 10,000 Concurrent Connections with Uvicorn
Configure Uvicorn to handle up to 10,000 concurrent WebSocket connections in FastAPI applications. Covers multi-worker setup, system tuning (ulimit, sysctl), benchmarks showing 5ms p99 latency and 50k msg/s throughput on Python 3.13, verified with websocket-bench. Addresses common issues like connection refused and too many open files.
-
Flask vs FastAPI for Real-Time WebSocket Applications: Latency Benchmarks
Flask vs FastAPI WebSocket benchmarks on Python 3.13 M2 Mac: compare latency and throughput for realtime apps. Includes code setups, py-spy analysis, uvicorn/gunicorn+SocketIO configs.
-
How to Reduce FastAPI JSON Response Time by 40% Using orjson Instead of stdlib json
FastAPI orjson integration: 40% faster JSON responses (28ms → 17ms p99 avg). Custom ORJSONResponse class, benchmarks uvicorn Python 3.13, 10k req/s load. Pydantic v2 auto-detects orjson. Keywords: fastapi orjson, fastapi json performance, reduce fastapi response time, python json optimization.
-
Python 3.13 Performance Gains: Benchmarking FastAPI Endpoints Before and After Upgrade
We benchmark a minimal FastAPI application on Python 3.12 and 3.13 to measure real-world performance differences in RPS and latency for JSON GET and POST endpoints using Locust and uvicorn workers.
-
Python Performance Optimization: Profile, Optimize, and Benchmark Code Speedups
Python performance optimization guide: Profile with cProfile/py-spy, fix memory leaks with memory_profiler, speed up with Numba JIT and multiprocessing. Examples demonstrate up to 5-10x speedups and memory savings in loops, pandas, and APIs. Tested with Python 3.13 tools. Keywords: python performance optimization, optimize python code, python profiling cProfile py-spy, reduce python memory usage, python numba speedup, python multiprocessing performance.