[about efw] Build a High Loads Tomcat Environment

What is “simultaneous connection” in the WEB system?

The term “simultaneous connections” is often used in web system development, but it is often misused without a clear definition. This time, I will try to create a strict definition by including some related terms.

ItemExplanation
Maximum number of logged-in users After logging in, session information is created and takes up a certain amount of memory. Depending on the method of the system, if the session memory is large, you should be careful about the number of users who log in within the session timeout period.
Maximum number of simultaneous connections A TCP connection is considered to be "connected" from "Established" to "Closed". The number of connections that are open at any given time is the number of concurrent connections. Two connections occur with a single screen operation. ※JSP and various static contents. After the output is completed, the connection will be maintained for 15 seconds. If you exceed the maximum number of simultaneous connections, the server will not accept connection requests and you will receive a "This site cannot be accessed" error. ※This is not 404.
Maximum number of concurrent executions Number of requests that the server can handle simultaneously.
< In the case of a good start > ※Exhibitions, information sessions, seminars, etc.
Only one operation at a time Possible number of people who can operate without error = maximum number of simultaneous connections / 2
Continuously operate once per second ※Light processing within 1 second, Possible number of people who can operate without error = maximum number of simultaneous connections / 2/15
Continuously operate once per second ※Heavy processing、 Possible number of people who can operate without error = min (maximum number of concurrent executions, maximum number of concurrent connections/2/15)

System Conceptual Diagram

The system conceptual diagram below is an example of various setting information when supporting high load with efw application + tomcat. image.png

ItemDefaultExplanation
ListenBackLog Window32/64: 200
Solaris32/64,Linux32/64: 511
Maximum number of connection waiting queues for queuing requests with established TCP connections Specified range for the maximum number of connection queues. Window32/64: 1~200 Solaris32/64,Linux32/64: 1~2147483647
MaxClients256 Number of simultaneous requests that can be answered.
ServerLimit256 Set the maximum value that can be set for MaxClients while the Apache process is running, and there is a limit of 20000 or less.
maxConnections NIO: 10000
NIO2: 10000
APR/Native: 8192
Maximum number of connections that the server will accept and process at any given time. Setting the value to -1 disables the maxConnections feature and does not count connections.
acceptCount100 Maximum queue length for incoming connection requests when all possible request processing threads are used. Requests received when the queue is full are rejected.
maxthreads200 The maximum number of threads (maximum concurrency) that this connector will create for request processing. A Connector attribute that does not specify an Executor attribute constitutes a thread pool. The maximum number of threads that the thread pool will actually process requests from the waiting queue.

Setting Location

image.png

image.png

System Conceptual Diagram Explanation

If there are a large number of connections from clients,

There are two types of event queue maximum value reaching errors.

"The function in question is busy. Please wait for a while."

ListenBackLog queue over

image.png

If you perform a new operation when the server connection is full, the error message shown on the left will be displayed.

Event queue over (retry possible)

image.png

When heavy operations reach a limit, the countdown message shown on the left will be displayed (30 seconds total). Retry possible.

Event queue over (retry not possible)

image.png

When operations become restricted, the congestion message shown on the left will be displayed. Retry not possible.