Comparative Evaluation of Flask and web2py for AI Microservices: An Empirical Benchmark on Model-Inference Workloads

Read full text
Authors: Oyetola Florence Idowu, Abolade David Omiyale
Cited by: 1
References: 32

Abstract

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.

Fields of Study & Subjects

Software System Performance and Reliability Cloud Computing and Resource Management Scientific Computing and Data Management

Publication details

Journal / source
ABUAD Journal of Engineering Research and Development (AJERD)
Publisher
Afe Babalola University Ado-Ekiti
Volume
9
Issue
1
Pages
12–27
Publication date
31 January 2026
Language
EN