In this chapter, we'll discuss how our application can efficiently serve thousands of requests per second. In the previous chapter, we already had one glimpse at it—reactive streams use a number of different threads (exposed by the Schedulers API), and we even had to create a thread once or twice with the thread() function. But before we dive into nuances, let's first discuss what kind of problems threads are able to solve.
In your laptop, you have a CPU with multiple cores, probably four of them. That means that it can do four different computations in parallel, which is pretty amazing, considering that 10 years ago, a single-core CPU was the default and even two cores were only for enthusiasts.
But even back then, you were not actually limited to doing only a single task at a time, right? You could listen to music and browse the internet...