@@ -189,7 +189,7 @@ lets applications use the Servlet API directly if they need to. Spring WebFlux
189
189
relies on Servlet non-blocking I/O and uses the Servlet API behind a low-level
190
190
adapter. It is not exposed for direct use.
191
191
192
- NOTE: It is strongly advised not to map Servlet filters nor directly manipulate the Servlet API in the context of a WebFlux application.
192
+ NOTE: It is strongly advised not to map Servlet filters or directly manipulate the Servlet API in the context of a WebFlux application.
193
193
For the reasons listed above, mixing blocking I/O and non-blocking I/O in the same context will cause runtime issues.
194
194
195
195
For Undertow, Spring WebFlux uses Undertow APIs directly without the Servlet API.
@@ -200,9 +200,9 @@ For Undertow, Spring WebFlux uses Undertow APIs directly without the Servlet API
200
200
== Performance
201
201
202
202
Performance has many characteristics and meanings. Reactive and non-blocking generally
203
- do not make applications run faster. They can, in some cases, ( for example, if using the
204
- `WebClient` to run remote calls in parallel). On the whole , it requires more work to do
205
- things the non-blocking way and that can slightly increase the required processing time.
203
+ do not make applications run faster. They can in some cases – for example, if using the
204
+ `WebClient` to run remote calls in parallel. However , it requires more work to do
205
+ things the non-blocking way, and that can slightly increase the required processing time.
206
206
207
207
The key expected benefit of reactive and non-blocking is the ability to scale with a small,
208
208
fixed number of threads and less memory. That makes applications more resilient under load,
@@ -224,10 +224,10 @@ block the current thread, (for example, for remote calls). For this reason, serv
224
224
use a large thread pool to absorb potential blocking during request handling.
225
225
226
226
In Spring WebFlux (and non-blocking servers in general), it is assumed that applications
227
- do not block. Therefore, non-blocking servers use a small, fixed-size thread pool
227
+ do not block. Therefore, non-blocking servers use a small, fixed-size thread pool
228
228
(event loop workers) to handle requests.
229
229
230
- TIP: "`To scale`" and "`small number of threads`" may sound contradictory but to never block the
230
+ TIP: "`To scale`" and "`small number of threads`" may sound contradictory, but to never block the
231
231
current thread (and rely on callbacks instead) means that you do not need extra threads, as
232
232
there are no blocking calls to absorb.
233
233
@@ -253,7 +253,7 @@ application code within that pipeline is never invoked concurrently.
253
253
254
254
What threads should you expect to see on a server running with Spring WebFlux?
255
255
256
- * On a "`vanilla`" Spring WebFlux server (for example, no data access nor other optional
256
+ * On a "`vanilla`" Spring WebFlux server (for example, no data access or other optional
257
257
dependencies), you can expect one thread for the server and several others for request
258
258
processing (typically as many as the number of CPU cores). Servlet containers, however,
259
259
may start with more threads (for example, 10 on Tomcat), in support of both servlet (blocking) I/O
0 commit comments