java - Spring Framework under high load with @Async methods - Stack Overflow
am building highly available & scalable web application. It will also handle quite significant load.
The question is, how @Async
methods work in Spring Framework?
I am planning to use@Async
method for the logging ( send the logs to some external logging server ). And I wonder how the system will behave if a lot of threads ( ie users ) will start to call these methods?
As far as I understand Spring takes pre-created threads from the thread's executor. But what happen, if there are only 3 threads, but 1000 simultaneous users?
Will @Async
method be blocked, unless some thread become available and start doing the job? Or the "job" will be placed in queue and the main thread will continue to run as expected?
Any help will be highly appreciated.
Read full article from java - Spring Framework under high load with @Async methods - Stack Overflow
No comments:
Post a Comment