-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP/2 - Enable H2 protocol #490
Conversation
def579f
to
12cdd0c
Compare
9fa84aa
to
c4903ab
Compare
16c6b5c
to
b9d4c7b
Compare
@NiccoMlt Take a look on this issue #506
The certificato of domain cara17test.xxx.it is available. I don't have the full stack. I will try to debug it later |
b9d4c7b
to
9f8ad17
Compare
@NiccoMlt Reactor Netty 1.1.24 has been released with the fix for the issue we requested: https://github.com/reactor/reactor-netty/releases/tag/v1.1.24 |
Sure |
db280cb
to
2f96899
Compare
2f96899
to
4c1bbf0
Compare
b52322b
to
e8d28b2
Compare
12a23b7
to
215f5d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments to help review @hamadodene @dmercuriali
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modifications here come from the HostPort
introduction and the NetworkListenerConfiguration
transformation from a mutable class to a record.
This is a small building block in the larger plan to migrate to an immutable configuration, because right now it is a pain to track modifications for refreshes.
This was easy and was already done in the later months, so I kept it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Listeners
was pretty much rewritten from the ground up a couple of times in the later months, but I tried to strip most modifications and keep it simple.
ListeningChannel
nested class made it hard to track the flow of the setup of the channel and was externalized. More aggressive refactors were tried but dropped. We still need to find a way to wrap the "concept of channel" inside of it, while keeping the common setup into Listeners
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behaviour wasn't changed much here: the SSL context setup was moved from reactor.netty.http.server.HttpServer#doOnChannelInit
to reactor.netty.http.server.HttpServer#secure(java.util.function.Consumer<? super reactor.netty.tcp.SslProvider.SslContextSpec>)
.
This poses one major change: SslContext
s are loaded once, and then the listener needs to be restarted to pick up changes into the certificate. Hooks are already in place to take care of that, we only added a check on changes on the certs in addition to listener confs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is not actually new but moved out of Listeners
to track clearly the dependencies.
This class handles SSL contexts build, taking care of OCSP stapling (which is now done through a handlerConfigurator
.
This class keeps some problems, that were not evident when it was a nested, non-static, class.
For example, different listeners will load pretty much the same certificates but with their own SSL ciphers and protocols. This might lead to tricky behaviors.
This was mitigated by not actually sharing the certs, but leads to duplication, and I think that these settings should simply be moved from listerners to certs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty much a glorified lambda that actually does the stapling.
The original beahviour (which I note that comes from the netty example and adjusted for ReactorNetty) was not changed in this PR, I think.
public static Set<HttpProtocol> getDefaultHttpProtocols(final boolean ssl) { | ||
return Set.of(HTTP11, ssl ? H2 : H2C); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we enable HTTP/2 by default with SSL, or HTTP/2 with cleartext if without
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was rewritten to debug a problem in the past, then merged to a refactor that was introduced with one of the previous PR.
Refactors were done and were kept.
dc4ab2c
to
f672658
Compare
f672658
to
1341fd3
Compare
Closes #410 and, along with #409, closes #181
Closes #506