1 Star 0 Fork 0

javahongxi / webflux-sample

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

WebFlux Sample

Concurrency Model

Both Spring MVC and Spring WebFlux support annotated controllers, but there is a key difference in the concurrency model and the default assumptions for blocking and threads.

In Spring MVC (and servlet applications in general), it is assumed that applications can block the current thread, (for example, for remote calls). For this reason, servlet containers use a large thread pool to absorb potential blocking during request handling.

In Spring WebFlux (and non-blocking servers in general), it is assumed that applications do not block. Therefore, non-blocking servers use a small, fixed-size thread pool (event loop workers) to handle requests.

“To scale” and “small number of threads” may sound contradictory but to never block the 
current thread (and rely on callbacks instead) means that you do not need extra threads, 
as there are no blocking calls to absorb.

© hongxi.org | web.hongxi.org

Repository Comments ( 0 )

Sign in to post a comment

About

WebFlux 解决方案 ⚛ expand collapse
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/javahongxi/webflux-sample.git
git@gitee.com:javahongxi/webflux-sample.git
javahongxi
webflux-sample
webflux-sample
main

Search

103111 552b83b3 1850385 103110 ed87a847 1850385