Open Access

Study and Optimization of Server Load Capacity in High Concurrency Scenarios

, , ,  and   
Jun 13, 2025

Cite
Download Cover

Figure 1.

Reactor model based web server
Reactor model based web server

Figure 2.

Reactor model based web server
Reactor model based web server

Figure 3.

Reactor Modules
Reactor Modules

Figure 4.

Reactor Modules
Reactor Modules

Figure 5.

Event Driven Modules
Event Driven Modules

Figure 6.

Event-Driven Class
Event-Driven Class

Figure 7.

Epoll Class
Epoll Class

Figure 8.

Event Class
Event Class

Figure 9.

Server Module
Server Module

Figure 10.

Server Class
Server Class

Figure 11.

Flowchart of The New-Connection Function
Flowchart of The New-Connection Function

Figure 12.

Epoll Class
Epoll Class

Figure 13.

Socket Class
Socket Class

Figure 14.

Acceptor Class
Acceptor Class

Figure 15.

Connection Class
Connection Class

Figure 16.

Flowchart of the handle-ReadEvent
Flowchart of the handle-ReadEvent

Figure 17.

ThreadPool Class
ThreadPool Class

Figure 18.

Using of Webbench
Using of Webbench

Figure 19.

Webbench Test Result Chart
Webbench Test Result Chart

Figure 20.

Single Reactor Single Thread Web Server Test Results
Single Reactor Single Thread Web Server Test Results

Figure 21.

Test Results of Single Reactor Multi thread Web Server
Test Results of Single Reactor Multi thread Web Server

Figure 22.

Test Results of Single Reactor Multi thread Web Server
Test Results of Single Reactor Multi thread Web Server

Figure 23.

Cross-section at 200us
Cross-section at 200us

Figure 24.

Comparison Chart of QPS for Different Time periods
Comparison Chart of QPS for Different Time periods

Figure 25.

Final Test Results
Final Test Results

Table type styles

Variable Test range
Number of Sub-Reactors 1-50
Number of threads 1-50

Explanation of Webbench Usage Options

Webbench Usage Parameters Parameter explanation
./webbench Starts the Webbench testing tool.
-c Specify the number of concurrent clients
-t Specify the duration of HTTP requests
http://127.0.0.1:2000/ accesses the specified web server

Scope of Testing for Single Reactor Multithreading Web Server

Variable Test Range
Number of threads 1-30
Transaction processing time (us) 0-1000

Scope of Testing for Single Reactor Multi

Model Advantages Disadvantages
Single-Reactor Single Threading Simple to implement, easy to program and debug; suitable for low concurrency and lightweight business processing scenarios Poor performance in high concurrency and long time business processing, easy to single thread blocking caused by other requests are delayed processing
Single-Reactor Multi-Threading The introduction of a thread pooling mechanism serves to enhance the concurrent processing capacity, circumventing the issue of single-thread blocking. This approach is particularly effective in scenarios involving medium concurrency and medium business processing times, offering optimal performance. The use of multiple threads in a single program can lead to data contention and synchronization problems, necessitating the implementation of locking mechanisms. This, in turn, can result in increased programming complexity and resource overhead. Furthermore, the overhead associated with thread switching may contribute to performance bottlenecks in highly concurrent environments.
Multi-Reactor Multi-Threading The concurrent processing capability is significantly enhanced by dividing the work among multiple reactors. Each reactor operates independently, reducing competition for resources and improving overall performance. It demonstrates robust performance in high concurrency and longterm business processing. The complexity of the programming and maintenance processes, coupled with the necessity of dealing with multiple reactor and thread synchronization, gives rise to a considerable challenge in terms of resource management. In order to circumvent performance bottlenecks, it is essential to configure the reactor and thread pool in a reasonable manner.

Multi-Reactor Multi-threading Test Scope under 200us

Variable Test range
Operational processing time (us) 0-1000
Language:
English
Publication timeframe:
4 times per year
Journal Subjects:
Computer Sciences, Computer Sciences, other