Microservice-based deployments are increasingly used to serve AI models, but systematic empirical guidance on framework selection is limited. This paper presents a comparative evaluation of two Python frameworks (Flask 2.3.2 and web2py 2.24.1) for AI microservices through the implementation of a common AI Microservice Agent and controlled benchmarking. Experiments were run on Ubuntu 22.04 LTS with Python 3.10 on an Intel i7-12700 (16 GB RAM). The benchmark workload uses a logistic-regression inference task on a 10,000-row CSV dataset. It includes measurements of average latency (ms), throughput (requests/sec), peak memory (MB), CPU utilisation (%), and per-request computational time (ms). With under 100 concurrent clients, Flask achieved an average latency of 1.8 ms and a throughput of 556 req/s (peak memory ≈ usage 120 MB), while web2py recorded a latency of 4.2 ms and a throughput of 238 req/s (peak memory ≈ usage 280 MB). Results were stable across n = 10 repeated trials (95% CI reported in Section 4), and paired statistical tests confirm the observed performance differences (p < 0.01). We discuss trade-offs between rapid prototyping and production scalability, document reproducible setup details, and propose directions for expanding the benchmark to FastAPI, GPU workloads, and cloud-native orchestration.
Idowu et al. (Sat,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: