Impact of different processing models on memory consumption

Another critical component of framework analysis is comparing memory usage. Thinking back to our discussion of the Thread per connection model in Chapter 1Why Reactive Spring?, we know that, instead of allocating memory for tiny events' objects, we allocate a huge dedicated Thread for each new connection. The first thing that we should bear in mind is that a Thread keeps some space free for its stack. The actual stack size depends on the OS and JVM configuration. By default, for most common servers running on 64-bit, the VM stack size is 1 MB.

An event means a signal about changes in the system state, such as an opened connection or data availability.

For the high-load scenario, ...

Get Hands-On Reactive Programming in Spring 5 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.