title: Why does Netty 4.0.x have a default WebSocket frame size of only 65536 byte
body: <p>In Netty 4.0.x the default frame size for the <a href="http://netty.io/4.0/xref/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.html#81" rel="nofollow noreferrer">WebSocketServerProtocolHandler</a> is 65536 byte but you can set it as high as you want. The WebSocket protocol limits the size to <a href="https://stackoverflow.com/questions/20652194/websocket-frame-size-limitation#answer-20658569">18,446,744,073,709,551,615 bytes</a>. Is there a reason for that low frame size? Are <a href="https://stackoverflow.com/questions/10249478/how-to-limit-in-netty-length-of-websocket-frame-received-by-server">DDOS-Attacks</a> a reason for that behavior?</p>
  
  <p>My Netty stack is as follows:</p>
  
  <pre><code>HttpServerCodec  
  HttpContentCompressor  
  HttpContentDecompressor  
  HttpObjectAggregator(65536)  
  WebSocketServerProtocolHandler(...,65536)  
  ...  
  </code></pre>
  
  <p>Should I rather set the HttpObjectAggregator size to 18,446,744,073,709,551,615 to avoid the TooLongFrameException and leave the WebSocketServerProtocolHandler to 65536? What is best practice?</p>