Extend netty configuration
Currently configuration of Netty-based interpreters is split into two parts:
-
NettyConfig, which configures the Netty server itself - the pipeline, networking etc. -
NettyFutureServerOptions, which configures the Netty server interpreter
The goal of this task is to extend the configuration with some useful options known from other servers. This should mostly influence NettyConfig, but it's also possible that NettyXServerOptions will have to be made dependent on NettyConfig.
Options to add (roughly following https://doc.akka.io/docs/akka-http/current/configuration.html):
- [ ] default
Server:header (if none is specified explicitly) - [x] idle timeout
- [x] request timeout
- [x] bind timeout
- [x] linger timeout (if applicable to netty?)
- [x] max connections
- [x] backlog (maybe this is already implemented as
socketBacklog?) - [x] socket options
- [x] max content length: this should be configurable globally, and per-endpoint. The implementations might be unrelated, and the per-endpoint should probably use an attribute + an interceptor
Config options can be grouped into sub-config-objects if necessary. This should probably be split into a couple of PRs.
There is no option in the default Netty configuration to set the max-connections and max-content-length options. Additionally, I'm not certain about the default header. There is also no option available in the default Netty configuration, but shouldn't it be handled at the Tapir level?
If these are not already implemented as a Netty option, we have to implement them ourselves :)