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

Add HTTP 1.0 support on Reactor Netty [SPR-14964] #19531

Open
spring-issuemaster opened this Issue Nov 30, 2016 · 9 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented Nov 30, 2016

Yevhenii Melnyk opened SPR-14964 and commented

Scenario

  • Web application outputting a sequence of items produced by a Flux<Item>, serialized as JSON
  • SSE not being used.
  • Use Apache Benchmark to perform 1000 requests

Results

Web app based on Jetty,Tomcat and Undertow returns result in a reasonable amount of time.
Web app that runs using Reactor Netty or RxNetty doesn't finish. After benchmark timeouts server can't handle requests any more, even single ones from browser.
The following test was performed from localhost as well as from another computer in the same local network. The debug console output is attached.

>ab -n 1000 -c 100 http://localhost:8083/items/10

This is ApacheBench, Version 2.3 <$Revision: 1663405 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
apr_pollset_poll: The timeout specified has expired (70007)

Affects: 5.0 M3

Reference URL: reactor/reactor-netty#21

Attachments:

Issue Links:

  • #19510 Buffering of output in Spring Web Reactive with Netty too aggressive ("duplicates")
@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Dec 1, 2016

Rossen Stoyanchev commented

hi Yevhenii Melnyk thanks for logging this. It looks like a duplicate of #19510.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Dec 22, 2016

Yevhenii Melnyk commented

@Rossen Stoyanchev Even after #19510 is closed the issue is reproducible.
Considering I use apacheBenchmark can be quite misleading because of timeouts of the test.
But after the test fails the connections does not seem to be closed. The browser request that is performed during this benchmark test never ends (or it will take really long to finish request).
It seems to me that some performance should be useful to check the ability to handle multiple requests at the same time.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Dec 22, 2016

Yevhenii Melnyk commented

Still cannot handle handle multiple requests at the same time using Netty

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Dec 23, 2016

Rossen Stoyanchev commented

What version of Reactor Netty are you using? You have to use 0.6.0.BUILD-SNAPSHOT snapshots (to be released tomorrow) and also make sure you don't have stale snapshots in your local repository.

Sébastien Deleuze would you mind taking a look if it is still an issue since you worked on #19510?

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Dec 23, 2016

Yevhenii Melnyk commented

I tried to run benchmark again on totally clean Ubuntu. It doesn't end, but if I make logging level Debug, I see that all requests are successful. Maybe something's wrong with the "ab" tool.
The only concern I have in this case is that the benchmark ends successfully when web-reactive is backed with Jetty/Tomcat/Undertow and doesn't when uses Netty.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Dec 23, 2016

Sébastien Deleuze commented

I am going to test again with latest snapshots.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Dec 23, 2016

Sébastien Deleuze commented

Indeed the tests with multiple connection using ab seems to fail with Reactor Netty at least, we are going to have a look with Reactor team.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Dec 23, 2016

Sébastien Deleuze commented

After a lot of tests, it seems the issue observed come from the fact than ab testing tool is using HTTP 1.0 and not HTTP 1.1.

I manage to reproduce it with a simple ab -n 1 -c 1 http://localhost:8083/items/10 command and the same kind of test performed with wrk, siege and httpie works!

I have created issue for HTTP 1.0 support on both Reactor Netty and RxNetty bugtrackers.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Jun 22, 2017

Sébastien Deleuze commented

I move this issue to the 5.X backlog since it has been postponed to Reactor Netty 0.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment