Control device and program

The control device dynamically adjusts the maximum number of simultaneous connections based on real-time log data analysis, addressing static limitations in existing methods and ensuring consistent application performance.

WO2025177412A1PCT designated stage Publication Date: 2025-08-28NT T INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/006008
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-20
Publication Date
2025-08-28

AI Technical Summary

Technical Problem

Existing methods for setting the maximum number of simultaneous connections in flow limiting units are static and do not adapt to changes in application performance, leading to potential processing delays and hardware failures due to excessive load.

Method used

A control device and program that dynamically adjust the maximum number of simultaneous connections based on real-time log data analysis, using an analysis unit to calculate statistics and an instruction unit to modify the connection limit when performance thresholds are exceeded.

Benefits of technology

Enables dynamic and easy adjustment of connection limits, maintaining application response times within specifications and preventing overload, even with changing performance conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024006008_28082025_PF_FP_ABST
    Figure JP2024006008_28082025_PF_FP_ABST
Patent Text Reader

Abstract

This control device 1 comprises: a storage device that , stores log data 11 including a response time and a status code of each request received at a prescribed time by a flow limitation unit 21 that receives requests for an application 22, and when the number of connections to the application 22 exceeds a maximum number of connections, rejects requests for the application 22; an analysis unit 12 that calculates, from the log data 11, a statistical amount from the response time with which the status code indicating acceptance of the request is associated; and an instruction unit 13 that outputs an instruction to reduce the maximum number of connections when the statistical amount exceeds a threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Control device and program

[0001] The present disclosure relates to a control device and a program.

[0002] When a large number of requests are simultaneously received from user terminals to an application, the flow limiting unit may limit the maximum number of simultaneous connections. This limit prevents abnormalities such as processing stoppage due to excessive load on the application or failure of the hardware on which the application is deployed.

[0003] If the maximum number of simultaneous connections is set to a value that is too large for the application's performance, it may not be possible to sufficiently prevent the load on the application, which may result in processing delays even if the application does not stop processing or the hardware does not go down.

[0004] In light of this situation, application maintainers may conduct load tests on the application to determine the optimal maximum number of simultaneous connections based on the application's response time specifications.Maintainers set the maximum number of simultaneous connections as a fixed value, aiming to ensure as many simultaneous connections as possible, as long as the response time does not exceed the performance specification value.

[0005] In recent years, there have been methods for modeling application response times (Patent Document 1 and Patent Document 2). Patent Document 1 discloses a method for formulating an optimization problem for the settings of network devices to derive optimal settings. Patent Document 2 prevents congestion by adjusting the allocation of the total amount of control according to the number of calls. In Patent Document 2, load testing is required to determine the total amount of control.

[0006] JP 2019-004208 A JP 2013-162507 A

[0007] However, both methods require preparations such as load testing or modeling. Furthermore, application performance may change due to performance degradation of the platform on which the application is deployed, specification changes that affect the application's processing performance, etc. Such changes may cause the prepared models and settings to become obsolete, making it difficult to comply with performance specifications.

[0008] Therefore, a method is required to dynamically and easily adjust the maximum number of simultaneous connections of the flow control unit in response to changes in application performance, so that the application response time can be kept within the range of performance specifications and as many simultaneous connections as possible can be guaranteed.

[0009] The present disclosure has been made in consideration of the above circumstances, and an object of the present disclosure is to provide a technology that enables dynamic and easy adjustment of the maximum number of simultaneous connections in a flow limiting unit.

[0010] A control device according to one aspect of the present disclosure includes a flow restriction unit that accepts requests to an application and rejects the request to the application if the number of connections to the application exceeds a maximum number of connections, a storage device that stores log data including the response time and status code of each request accepted within a predetermined period of time, an analysis unit that calculates statistics from the log data based on the response time associated with a status code indicating acceptance of the request, and an instruction unit that outputs an instruction to reduce the maximum number of connections if the statistics exceed a threshold value.

[0011] A program according to one aspect of the present disclosure causes a computer to function as a flow restriction unit that accepts requests to an application and rejects requests to the application if the number of connections to the application exceeds the maximum number of connections, a storage device that stores log data including the response time and status code of each request accepted within a predetermined period of time, an analysis unit that calculates statistics from the log data based on the response time associated with a status code indicating acceptance of the request, and an instruction unit that outputs an instruction to reduce the maximum number of connections if the statistics exceed a threshold value.

[0012] According to the present disclosure, it is possible to provide a technique that enables the maximum number of simultaneous connections of a flow rate limiting unit to be dynamically and easily adjusted.

[0013] FIG. 1 illustrates a system configuration of a control system according to an embodiment of the present disclosure and functional blocks of a control device. FIG. 2 illustrates an example of log data, with FIG. 2(a) illustrating log data under normal conditions and FIG. 2(b) illustrating log data under high load. FIG. 3 illustrates graphs showing the relationship between response time and frequency, with FIG. 3(a) illustrating the relationship under normal conditions and FIG. 3(b) illustrating the relationship under high load. FIG. 4 illustrates graphs showing the relationship between the number of requests and the 90th percentile of response time, with FIG. 4(a) illustrating the relationship between the number of requests, including rejected and accepted requests, and response time, and FIG. 4(b) illustrating the relationship between the number of accepted requests, excluding rejected requests, and response time. FIG. 5 illustrates the relationship between statistics and the maximum number of connections over time, with FIG. 5(a) illustrating the statistics over time and FIG. 5(b) illustrating the maximum number of connections over time. FIG. 6 is a flowchart of a control method performed by the control device. FIG. 7 illustrates the hardware configuration of a computer used in the control device.

[0014] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the description of the drawings, the same parts are designated by the same reference numerals and the description thereof will be omitted.

[0015] (Control System) A control system 5 in which a control device 1 according to the present disclosure is used will be described with reference to Fig. 1. The control system 5 includes the control device 1, a cloud platform 2, and a wireless communication network 3.

[0016] The wireless communication network 3 transmits a request from a user terminal to the cloud platform 2 via a base station, a core network device, etc. The wireless communication network 3 returns a response from the cloud platform 2 to the user terminal. In this disclosure, a case will be described in which the destination of the service provided by the cloud platform 2 is a wireless terminal, but the destination may be another terminal such as a wired terminal.

[0017] The control device 1 acquires the status of acceptance or rejection of requests from the wireless communication network 3 to the cloud platform 2 and outputs an instruction to control the flow rate to the cloud platform 2 .

[0018] The cloud platform 2 includes a flow rate limiting unit 21 and an application 22. The flow rate limiting unit 21 controls the number of connections between the wireless communication network 3 and the cloud platform 2 in accordance with instructions from the control device 1.

[0019] The flow rate limiting unit 21 accepts or rejects requests from the wireless communication network 3 so that the number of connections between the wireless communication network 3 and the application 22 does not exceed the maximum number of connections. The flow rate limiting unit 21 accepts a request to the application 22, and if the number of connections to the application 22 does not exceed the maximum number of connections, it accepts the request to the application 22, and if the number of connections to the application 22 exceeds the maximum number of connections, it rejects the request to the application 22.

[0020] The flow rate limiting unit 21 stores, as log data, a response time and a status code for each connection between the wireless communication network 3 and the application 22. In the present disclosure, a case will be described in which the flow rate limiting unit 21 and the wireless communication network 3 are connected via HTTP (Hypertext Transfer Protocol), but other protocols may also be used for the connection.

[0021] The application 22 provides services and the like to each user terminal of the wireless communication network 3. The application 22 is deployed in hardware such as a computer.

[0022] When the flow rate limiting unit 21 accepts a request and the processing by the application 22 ends normally, the flow rate limiting unit 21 associates the status code "200" with the time required for the response and stores them in the log data. When the flow rate limiting unit 21 rejects a request, the flow rate limiting unit 21 associates the status code "503" with the response time of "0 seconds" and stores them in the log data. In the present disclosure, the status code "200" is expressed as "request accepted," and the status code "503" is expressed as "request rejected."

[0023] (Control Device) The control device 1 includes log data 11, an analysis unit 12, and an instruction unit 13. Each piece of data, such as the log data 11, is stored in a storage device, such as a memory 902 or a storage 903. Each function, such as the analysis unit 12 and the instruction unit 13, is implemented in a CPU 901.

[0024] The control device 1 determines whether or not to change the maximum number of connections for the flow rate limiting unit 21 and the new number based on the response time performance specification value predetermined for the application, and instructs the flow rate limiting unit 21. The response time performance specification value is determined based on multiple response time statistics and thresholds, such as the 90th percentile of the response time being within 0.6 seconds.

[0025] The log data 11 includes the response time and status code of each request received by the flow rate limiting unit 21 within a predetermined period of time. When a request is received, the log data 11 stores the status code "200" in association with the time required for the response. When a request is rejected, the flow rate limiting unit 21 stores the status code "503" in association with the response time "0 seconds."

[0026] The log data 11 has data with a predetermined time as a window size. When the control device 1 determines the maximum number of connections for the flow restriction unit 21 based on multiple response time statistics, such as a response time of 90 percentile of 0.6 seconds or less, it is preferable to determine the window size so that the log data 11 for the predetermined time has 30 to 40 or more data points.

[0027] The log data 11 is updated periodically or at a timing determined by a predetermined logic to the latest log for a predetermined time. In the present disclosure, the log data 11 is a block of data including logs for a predetermined time.

[0028] 2A is an example of log data 11a under normal conditions. Under normal conditions, the load is low. In the log data 11a, the status code of each request is "200," indicating acceptance. Each response time is not 0, but the time required for processing. The log data 11a shows that under normal conditions, the flow rate restriction unit 21 accepts each request, has the application 22 process it, and responds.

[0029] 2B is an example of log data 11b during a high load. The log data 11b associates the response time of each request with a status code. In the log data 11b, the status codes of each request are a mixture of "200," indicating acceptance, and "503," indicating rejection. For requests corresponding to the status code "200," the time required for processing is set as the response time, and for requests corresponding to the status code "503," 0 is set.

[0030] The analysis unit 12 calculates statistics from the response times associated with status codes indicating acceptance of requests in the log data 11. The analysis unit 12 calculates statistics from the response times of requests associated with the status code "200" indicating acceptance in the log data 11. These statistics correspond to performance parameter values ​​of the response times. When the performance parameter value is "90th percentile is within 0.6 seconds," the statistical value is the 90th percentile value. The 90th percentile is the response time that is 90% of the response times of requests associated with the status code "200" indicating acceptance, counting from the smallest.

[0031] The analysis unit 12 compares the statistics with a threshold value. As shown in FIG. 3A, the 90th percentile value is lower than the threshold value under normal conditions. As shown in FIG. 3B, the 90th percentile value is higher than the threshold value under high load conditions. Here, the threshold value is "0.6 seconds" determined by the performance specification value.

[0032] In addition, the analysis unit 12 excludes response times associated with status codes indicating request rejection from the log data 11, and calculates statistics from response times associated with status codes indicating request acceptance.

[0033] Figure 4(a) shows the relationship between the number of requests and the 90th percentile value of response time when statistics are calculated including the response times of rejected requests. Figure 4(a) shows that, above a certain number of requests, the 90th percentile value approaches 0 as the number of requests increases. In contrast, Figure 4(b) shows the relationship between the number of requests and the 90th percentile value of response time when statistics are calculated from the response times of accepted requests, excluding the response times of rejected requests. Figure 4(b) shows that the 90th percentile value increases as the number of requests increases.

[0034] The analysis unit 12 calculates statistics by excluding response times associated with status codes indicating request rejections. The analysis unit 12 can appropriately grasp the load status on the cloud platform 2 without being affected by request blocking.

[0035] The analysis unit 12 calculates statistical values ​​every time the log data 11 is updated. The analysis unit 12 inputs the statistical values ​​calculated for each log data 11 to the instruction unit 13.

[0036] If the statistical quantity exceeds the threshold, the instruction unit 13 outputs an instruction to reduce the maximum number of connections. The threshold that the instruction unit 13 compares with the statistical quantity is set from the threshold set in the performance specification value. The threshold that the instruction unit 13 compares with the statistical quantity may be the same as the threshold set in the performance specification value, or may be a value obtained by adding a buffer to the threshold, such as the threshold set in the performance specification value multiplied by 0.9.

[0037] When the cloud platform 2 is in a normal state and the statistics calculated by the analysis unit 12 exceed a threshold, specifically when the cloud platform 2 transitions to a high-load state, the instruction unit 13 outputs an instruction to reduce the maximum number of connections to the flow restriction unit 21. The instruction unit 13 may specify the amount by which the maximum number of connections is to be reduced as a ratio such as the current maximum number of connections x 0.5, or as a numerical value such as 100.

[0038] The processing after transitioning from normal to high-load conditions will be described. Even after transitioning to high-load conditions, the control device 1 refers to the log data 11 successively acquired from the cloud platform 2 and calculates statistical values ​​using the analysis unit 12. The analysis unit 12 determines instructions to be input to the flow rate restriction unit 21 according to the calculated statistical values.

[0039] The instruction unit 13 maintains the maximum number of connections if the statistics exceed a threshold determined from performance specification values ​​even after transitioning from normal to high load and reducing the maximum number of connections. If the statistics subsequently fall below the threshold, the instruction unit 13 increases or decreases the maximum number of connections by referring to the number of request blocks.

[0040] The instruction unit 13 outputs an instruction to increase the maximum number of connections if, in new log data 11 at a predetermined time after outputting an instruction to reduce the maximum number of connections, the statistical amount is below a threshold and the number of requests associated with a status code indicating a request rejection exceeds a predetermined number.

[0041] Here, if the statistical amount falls below the threshold and the number of request blocks exceeds a predetermined number, the instruction unit 13 increases the maximum number of connections of the flow restriction unit 21. In this case, the response time is also within the performance specification values, so it is considered that the load on the cloud platform 2 has been reduced. It is considered that the number of request blocks has increased because the maximum number of connections has been reduced. Therefore, the instruction unit 13 increases the maximum number of connections to increase the number of processed requests.

[0042] On the other hand, if the statistical amount is equal to or less than the threshold value and the number of requests associated with a status code indicating a request failure is equal to or less than a predetermined number, the instruction unit 13 does not change the maximum number of connections.

[0043] Here, if the statistical amount is below the threshold but the number of request blocks is equal to or less than a predetermined number, the instruction unit 13 does not change the maximum number of connections of the flow restriction unit 21. In this case, the response time is also within the performance specification values, so it is considered that the load on the cloud platform 2 has been reduced. Since the number of request blocks has not increased, it is considered that the number of requests has not increased and processing can continue with the maximum number of connections reduced. Therefore, the instruction unit 13 maintains the maximum number of connections.

[0044] The statistical amount and the maximum number of connections over time will be described with reference to Fig. 5. In the present disclosure, the instruction unit 13 increases or decreases the maximum number of connections according to the concept of Additive-Increase / Multiplicative-Decrease (AIMD).

[0045] Specifically, in FIG. 5A, the 90th percentile value of the response time of the 200 response log is a statistic calculated by the analysis unit 12. When the statistic exceeds a threshold, the maximum number of connections is significantly reduced. When the statistic subsequently falls below the threshold, the maximum number of connections is gradually increased and restored. Here, if the maximum number of connections to be reduced after the statistic exceeds the threshold is a first number, and the maximum number of connections to be subsequently increased is a second number, the first number is greater than the second number.

[0046] (Control Method) A control method according to the present disclosure will be described with reference to FIG.

[0047] First, in step S1, the control device 1 acquires log data 11 of the response time of each request within a predetermined time period from the cloud platform 2. In step S2, the control device 1 calculates statistics from the response time of requests with a status code of 200 in the acquired log data 11.

[0048] If the statistics calculated in step S2 do not exceed the threshold, the process returns to step S1 to acquire new log data 11. On the other hand, if the statistics exceed the threshold, in step S4 the control device 1 inputs an instruction to the flow restriction unit 21 to reduce the maximum number of connections. At this time, the cloud platform 2 is in a high-load state.

[0049] In step S5, the control device 1 acquires new log data 11 of the response time of each request within a predetermined time period from the cloud platform 2. In step S6, the control device 1 calculates statistics from the response time of a request with a status code of 200 in the acquired log data 11.

[0050] If the statistical amount calculated in step S7 does not exceed the threshold, the process returns to step S5 and acquires new log data 11. On the other hand, if the statistical amount exceeds the threshold, and if the number of requests with a status code of 503 response is less than a predetermined number, the control device 1 returns to step S5 and acquires new log data 11 in step S10 without changing the maximum number of connections.

[0051] In step S8, if the number of requests with a status code of 503 response is equal to or greater than a predetermined number, the control device 1 inputs an instruction to increase the maximum number of connections to the flow restriction unit 21 in step S9. In step S9, the control device 1 may increase the maximum number of connections to the level before it was reduced in step S4. Alternatively, the control device 1 may increase the maximum number of connections by a number less than the number reduced in step S4, and repeat the processes of steps S5 to S9 multiple times to increase the maximum number of connections to the level before it was reduced in step S4.

[0052] (Implementation example) Nginx can be used for the flow restriction unit 21. In the case of Nginx, the maximum number of connections is set using the limit_conn item. Response times in the cloud platform 2 can be collected using an agent-based monitoring system. For example, one method is to collect logs from the flow restriction unit 21 using filebeat in the same instance as the flow restriction unit 21, and then store the logs from filebeat to OpenSearch after parsing. Nginx can output the response time and status code to access.log.

[0053] The log data 11 is acquired by a program that periodically executes queries to OpenSearch.

[0054] The instruction from the instruction unit 13 to the flow rate limiting unit 21 to increase or decrease the maximum number of connections can be realized by a program that overwrites and saves the Nginx configuration file and then executes a script to restart Nginx. Here, a graceful restart of Nginx can be performed by using the reload command.

[0055] As described above, the control device 1 according to the present disclosure can dynamically change the maximum connection number setting so as to prevent a continuous high load state of the application 22 in the cloud platform 2. Furthermore, by adopting the performance specification value of the response time as the control criterion, the control device 1 can continue to appropriately monitor the load of the cloud platform 2 even if the performance of the hardware of the cloud platform 2 or the application 22 changes.

[0056] The control device 1 according to the present disclosure can dynamically and easily adjust the maximum number of simultaneous connections of the flow rate limiting unit 21 of the cloud platform 2 .

[0057] The control device 1 of the present embodiment described above is, for example, a general-purpose computer system including a CPU (Central Processing Unit, processor) 901, a memory 902, a storage 903 (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device 904, an input device 905, and an output device 906. In this computer system, the CPU 901 executes a program loaded on the memory 902, thereby realizing each function of the control device 1.

[0058] The control device 1 may be implemented by one computer or by multiple computers, and may also be a virtual machine implemented on a computer.

[0059] The program of the control device 1 can be stored in a computer-readable recording medium such as a HDD, SSD, USB (Universal Serial Bus) memory, CD (Compact Disc), DVD (Digital Versatile Disc), or can be distributed via a network. The computer-readable recording medium is, for example, a non-transitory recording medium.

[0060] The present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the present disclosure.

[0061] REFERENCE SIGNS LIST 1 control device 2 cloud platform 3 wireless communication network 5 control system 11 log data 12 analysis unit 13 instruction unit 21 flow rate limiting unit 22 application 901 CPU 902 memory 903 storage 904 communication device 905 input device 906 output device

Claims

1. A control device comprising: a storage device that stores log data including the response time and status code of each request received within a specified period of time, the flow restriction unit accepting requests to the application and rejecting the request if the number of connections to the application exceeds the maximum number of connections; an analysis unit that calculates statistics from the log data based on the response time associated with a status code indicating acceptance of the request; and an instruction unit that outputs an instruction to reduce the maximum number of connections if the statistics exceed a threshold value.

2. The control device described in claim 1, wherein the instruction unit outputs an instruction to increase the maximum number of connections if, in new log data at the specified time after outputting an instruction to decrease the maximum number of connections, the statistical amount is less than or equal to the threshold and the number of requests associated with a status code indicating a rejection of the request exceeds a specified number.

3. The control device according to claim 2, wherein the instruction unit does not change the maximum number of connections when the statistical amount is equal to or less than the threshold value and the number of requests associated with a status code indicating a failure of the request is equal to or less than a predetermined number.

4. A program that causes a computer to function as: a storage device that stores log data including the response time and status code of each request received within a specified period by a flow restriction unit that accepts requests to an application and rejects the request if the number of connections to the application exceeds the maximum number of connections; an analysis unit that calculates statistics from the log data based on the response time associated with a status code indicating acceptance of the request; and an instruction unit that outputs an instruction to reduce the maximum number of connections if the statistics exceed a threshold value.

Citation Information

Patent Citations

  • Page view control method and page view control device

    CN111131058A

  • Machine learning-based selection of metrics for anomaly detection

    US11748568B1

  • Management of client perceived page view response time

    US20070299965A1