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

Netty: Add HTTP pipelining support #8299

Merged
merged 1 commit into from Oct 31, 2014

Conversation

Projects
None yet
4 participants
@spinscale
Member

spinscale commented Oct 30, 2014

This adds HTTP pipelining support to netty. Previously pipelining was not
supported due to the asynchronous nature of elasticsearch. The first request
that was returned by Elasticsearch, was returned as first response,
regardless of the correct order.

The solution to this problem is to add a handler to the netty pipeline
that maintains an ordered list and thus orders the responses before
returning them to the client. This means, we will always have some state
on the server side and also requires some memory in order to keep the
responses there.

Pipelining is enabled by default, but can be configured by setting the
http.pipelining property to true|false. In addition the maximum size of
the event queue can be configured.

The initial netty handler is copied from this repo
https://github.com/typesafehub/netty-http-pipelining

Closes #2665

@kimchy

View changes

Show outdated Hide outdated src/test/java/org/elasticsearch/http/netty/NettyHttpClient.java
@kimchy

View changes

Show outdated Hide outdated src/test/java/org/elasticsearch/http/netty/NettyHttpClient.java
@kimchy

View changes

Show outdated Hide outdated src/test/java/org/elasticsearch/http/netty/NettyHttpClient.java
@kimchy

View changes

Show outdated Hide outdated ...est/java/org/elasticsearch/http/netty/NettyHttpServerPipeliningTest.java
@kimchy

This comment has been minimized.

Show comment
Hide comment
@kimchy

kimchy Oct 31, 2014

Member

few comments, LGTM

Member

kimchy commented Oct 31, 2014

few comments, LGTM

@tlrx

View changes

Show outdated Hide outdated src/test/java/org/elasticsearch/http/netty/NettyHttpClient.java
Netty: Add HTTP pipelining support
This adds HTTP pipelining support to netty. Previously pipelining was not
supported due to the asynchronous nature of elasticsearch. The first request
that was returned by Elasticsearch, was returned as first response,
regardless of the correct order.

The solution to this problem is to add a handler to the netty pipeline
that maintains an ordered list and thus orders the responses before
returning them to the client. This means, we will always have some state
on the server side and also requires some memory in order to keep the
responses there.

Pipelining is enabled by default, but can be configured by setting the
http.pipelining property to true|false. In addition the maximum size of
the event queue can be configured.

The initial netty handler is copied from this repo
https://github.com/typesafehub/netty-http-pipelining

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