Systems that handle clients with slow connections

A second application of WebFlux is in building systems that are intended to work with mobile devices of clients with a slow or unstable network connection. To understand why WebFlux is useful in this area, let's remind ourselves what is going on when we are dealing with a slow connection. The problem is that transferring data from a client to a server may take a significant amount of time and the corresponding response may also take a lot of time. With the use of the thread-per-connection model, there is a higher chance of crashing the system with an increasing number of connected clients. For instance, using a Denial-of-Service (DoS) attack, hackers may easily make our server unavailable.

By contrast, WebFlux allows us to accept connections without blocking working threads. In this way, slow connections do not cause any problems. WebFlux will continue to receive other connections without blocking while waiting for an incoming request body. The Reactive Streams abstraction allows us to consume data when it is needed. This means that the server may control event consumption depending on the readiness of the network.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.35.72