You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Ryan Schmitt (JIRA)" <ji...@apache.org> on 2018/09/02 03:36:00 UTC

[jira] [Comment Edited] (HTTPCLIENT-1942) Add support for Reactive Streams

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16599925#comment-16599925 ] 

Ryan Schmitt edited comment on HTTPCLIENT-1942 at 9/2/18 3:35 AM:
------------------------------------------------------------------

[~olegk] I have a first draft of a reactive server [here|https://github.com/rschmitt/httpcomponents-core/commit/reactive-server]. It mostly works, and I'm satisfied with the interface, but it has a serious performance issue streaming large amounts of data over HTTP/2. What happens is that the size of the {{DATA}} frames quickly falls to just one byte, and the majority of the TCP traffic is just carrying {{WINDOW_UPDATE}} frames containing one byte increments. It appears that the root cause may be in the TCP layer somewhere. I've attached a few Wireshark graphs showing TCP throughput and window scaling. You can reproduce this by running {{ReactiveClientTest#testLongRunningRequest}} with longer streams (e.g. 5,000 {{ByteBuffer}}s).

 

!client to server tput.jpeg! !client to server window scaling (bytes out).jpeg! !server to client tput.jpeg!


was (Author: rschmitt):
[~olegk] I have a first draft of a reactive server [here|https://github.com/rschmitt/httpcomponents-core/commit/reactive-server]. It mostly works, and I'm satisfied with the interface, but it has a serious performance issue streaming large amounts of data over HTTP/2. What happens is that the size of the {{DATA}} frames quickly falls to just one byte, and the majority of the TCP traffic is just carrying {{WINDOW_UPDATE}} frames containing one byte increments. It appears that the root cause may be in the TCP layer somewhere. I've attached a few Wireshark graphs showing TCP throughput and window scaling. You can reproduce this by running {{ReactiveClientTest#testLongRunningRequest}} with longer streams (e.g. 5,000 \{{ByteBuffer}}s).

 

!client to server tput.jpeg! !client to server window scaling (bytes out).jpeg! !server to client tput.jpeg!

> Add support for Reactive Streams
> --------------------------------
>
>                 Key: HTTPCLIENT-1942
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1942
>             Project: HttpComponents HttpClient
>          Issue Type: Wish
>          Components: HttpClient (async)
>    Affects Versions: 5.0 Beta1
>            Reporter: Ryan Schmitt
>            Priority: Major
>              Labels: stuck, volunteers-wanted
>             Fix For: Future
>
>         Attachments: client to server tput.jpeg, client to server window scaling (bytes out).jpeg, server to client tput.jpeg
>
>
> It would be very helpful to me if the Apache client provided an implementation of the [Reactive Streams|http://www.reactive-streams.org/] spec, particularly as an implementation of the standard [interfaces|https://search.maven.org/artifact/org.reactivestreams/reactive-streams/1.0.2/jar]. These interfaces are JDK6-compatible and have no other dependencies, but they unlock interoperability with many other frameworks, such as RxJava.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org