Research on performance optimization of online evaluation based on Golang and Docker container pool

Published in Chinese Journal of Conputer Application, 2025

An online evaluation system based on technology stacks including Golang, Vue, Redis, Docker is designed and implemented, which isolates and executes user submitted code through Docker containers. Traditional online evaluation systems typically adopt a cold-start mode (i. e. creating a new container every time a task is submitted) when processing multiple concurrent tasks. This approach not only results in high container startup latency, but also causes serious waste of system resources, thereby limiting overall throughput. To solve the above problems, a container pooling optimization scheme is proposed: a certain number of “hot containers” are created in advance when the system backend is started, and the task queue is replaced from Redis to RabbitMQ, so that existing containers can be directly called for problem solving after task submission. After task completion, the container is restored through the “environment reset” mechanism without restarting, greatly reducing the time cost during the problem solving process. The experimental results show that after adopting the container pooling mechanism, the system has significantly improved task processing speed and resource utilization. At the same time, key technical points in the implementation process were analyzed, and future development directions were discussed, providing effective optimization ideas for the application of online evaluation systems in large-scale and high concurrency scenarios.

Recommended citation: Linxing Huang. "Research on performance optimization of online evaluation based on Golang and Docker container pool." Chinese Journal of Conputer Application, 2025(18).
Download Paper