The Bootstrap is used to organize each Netty structure (pipeline, handler, eventloop), and make them to run the class structure. It is divided into two parts, one is the client Bootstrap class, which only uses one channel to handle all network interactions, and the other is the server ServerBootstrap, which provides a parent channel to accept the client requests. The parent channel then creates multiple child channels for communication



How can Netty support a proxy server that receives client requests and calls its own internal services?

This business scenario requires a server to receive requests and a new client to send requests downstream. Netty implementations can share Eventloops to achieve thread sharing. Neither additional threads need to be created nor context switches needed to exchange data between the requesting subchannel and the client channel



Netty’s general guideline for this type solution is to reuse eventLoop

How do I add multiple ChannelHandlers at once?

Custom inherit ChannelInitiallizer, override its initChannel method to get the pipeline, and then call some column methods like addLast to add your own handlers one by one

What is ChannelOption for?

The channel Settings item is used to configure the channel Settings, which, when used for boot, will apply to all channels created by the current boot

What can I do if I want to use related properties and data outside of the Netty lifecycle?

Using AttributeMap and AttributeKey<T>, they can associate any type of data item with client and server channels