Controlling user visits of distributed system with thread pool



but I wonder if I can use a thread pool. Like fixedthreadpool. To limit the number of threads to control the number of visits
if the number of visits exceeds the limit of the number of threads, refuse directly. Can you control the number of visits

?

it"s just a whim. You can express your views


I don't know if I understand your problem correctly. If it is a web server, such as Apache and Tomcat, it is already designed to control concurrent access through thread pools. However, this can only control the number of concurrent visits, and if the actual number of visitors exceeds the maximum concurrency, subsequent visits will wait until they time out.

Menu