A Tour of Netty

Kondah Mouad
Geek Culture
Published in
29 min readSep 21, 2021

--

Introduction

This article serves as a valuable introduction to master I/O related technologies, it spans all of aspects needed to be on your way to demystify advanced frameworks, in particular the popular framework Netty. You will be prepared to delve deeper into more advanced topics by learning what is going on “under the hood”.

You may find that the article is a bit too long, but it’s not, most sections are just recalls, the aim is to ease the understanding.

We’ll begin with background on high-performance networking. With this context in place, we’ll introduce Netty, its core concepts, and building blocks.

1. Thread Pool Design Pattern

The Thread Pool pattern is a desing pattern used to execute multiple tasks through a fixed number of threads. The idea behind using a thread pool is to improve performance and throughput, in fact, creating a thread per request is totally infeasible for modern applications.

The idea is the following, given a task, it will be passed to the thread pool executor, it gets then pushed into a blocking queue and gets assigned to a given thread for execution. When a…

--

--