In this chapter, you learned that building a correct, concurrent TCP server is by no means trivial, and there are more than a few tricky parts. Our simple HTTP server can handle a few hundred connections on modest hardware, which is sufficient for a variety of applications. Especially in modern cluster environments, there are many “sidecar services” that play vital roles, despite serving only a few requests per minute. That said, modern frameworks typically perform better than this; a simple node.js application can serve close to a thousand connections comfortably, while frameworks like Akka HTTP[30] and Finagle[31] can easily serve many thousands. The good news is that we can implement many of these same techniques for high-performance servers in Scala Native, either directly, or by using powerful C libraries.
In the remaining chapters of the book, we’ll continue to build upon the techniques we’ve learned, but with a modern twist. In particular, we’ll begin to investigate how poll-based techniques could improve the design of our web server, as we come much closer to the domain of heavily asynchronous, massively scalable web services for which Scala is rightly famous.