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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b333b9-2be6c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b333b9-2be6c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?