1 Star 0 Fork 0

javahongxi / webflux-sample

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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

空文件

简介

WebFlux 解决方案 ⚛ 展开 收起
Java
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/javahongxi/webflux-sample.git
git@gitee.com:javahongxi/webflux-sample.git
javahongxi
webflux-sample
webflux-sample
main

搜索帮助

14c37bed 8189591 565d56ea 8189591