Nio (selector (Bytebuffer size allocation))
*Bytebuffer cannot be used by multiple channels together
*If we allocate a Bytebuffer of 1Mb, then 1Tb of memory is required for millions of connections. The server is not enough
Solutions:
- If the small Bytebuffer is not enough, give a large Bytebuffer. It involves data copying, and the performance is almost
- Bytebuffer arrays, multiple arrays form a buffer, so access is discontinuous (a single array is continuous in data memory, deletion can only be overwritten, not directly deleted)