You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2010/08/24 21:40:15 UTC
[jira] Created: (AVRO-625) RPC: permit out-of-order responses
RPC: permit out-of-order responses
----------------------------------
Key: AVRO-625
URL: https://issues.apache.org/jira/browse/AVRO-625
Project: Avro
Issue Type: New Feature
Components: java, spec
Reporter: Doug Cutting
Assignee: Doug Cutting
It should be possible, when using a stateful, connection-based transport, for a client to complete a second request over a connection before the first request has returned. In other words, responses should be permitted to arrive out-of-order.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-625) RPC: permit out-of-order responses
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905300#action_12905300 ]
Doug Cutting commented on AVRO-625:
-----------------------------------
Ryan, it sounds like we should make it possible to avoid connection sharing too. A simple approach might be to continue to have a connection per client object, as Avro does today. (Hadoop has a static cache of connections that are shared among client objects.) Then, if a single proxy is used from many threads, it would share the connection, but if each thread uses its own client object it would have its own connection. Would that suffice?
Note that, with the current Avro approach, once a connection is closed then its client instance may no longer be used: connections are not automatically re-opened as they are in Hadoop. I don't know yet if this is a bug or a feature.
> RPC: permit out-of-order responses
> ----------------------------------
>
> Key: AVRO-625
> URL: https://issues.apache.org/jira/browse/AVRO-625
> Project: Avro
> Issue Type: New Feature
> Components: java, spec
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.5.0
>
>
> It should be possible, when using a stateful, connection-based transport, for a client to complete a second request over a connection before the first request has returned. In other words, responses should be permitted to arrive out-of-order.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-625) RPC: permit out-of-order responses
Posted by "ryan rawson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905259#action_12905259 ]
ryan rawson commented on AVRO-625:
----------------------------------
Note that in HBase land we have suffered heavily from the 1 socket per RPC endpoint pair policy. In highly multithreaded apps our users find that they can't get the performance they desire due to this. A few people have independently invented mechanisms to make this thread local that gives massive speedups in their clients.
Multiplexing multiple RPCs on the same socket is in other words not a clear gain when the RPC request and/or response may be significantly large.
> RPC: permit out-of-order responses
> ----------------------------------
>
> Key: AVRO-625
> URL: https://issues.apache.org/jira/browse/AVRO-625
> Project: Avro
> Issue Type: New Feature
> Components: java, spec
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.5.0
>
>
> It should be possible, when using a stateful, connection-based transport, for a client to complete a second request over a connection before the first request has returned. In other words, responses should be permitted to arrive out-of-order.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-625) RPC: permit out-of-order responses
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905312#action_12905312 ]
Doug Cutting commented on AVRO-625:
-----------------------------------
Ryan, I'm curious, what is the performance bottleneck with HBase when connections are shared? In theory, with speed-of-light and switch delays, multiple TCP streams are faster than a single stream, and perhaps that's what's seen here, but I didn't think such effects came into play within a data center. Also, if responses are streamed off of disk directly to the socket, then, in theory, serializing responses over a single connection would limit throughput to the speed of a single disk. But RPC responses are typically buffered before they're written, so I wouldn't expect that to be a factor. Do you know what the actual bottleneck is?
> RPC: permit out-of-order responses
> ----------------------------------
>
> Key: AVRO-625
> URL: https://issues.apache.org/jira/browse/AVRO-625
> Project: Avro
> Issue Type: New Feature
> Components: java, spec
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.5.0
>
>
> It should be possible, when using a stateful, connection-based transport, for a client to complete a second request over a connection before the first request has returned. In other words, responses should be permitted to arrive out-of-order.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AVRO-625) RPC: permit out-of-order responses
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-625:
------------------------------
Fix Version/s: 1.5.0
> RPC: permit out-of-order responses
> ----------------------------------
>
> Key: AVRO-625
> URL: https://issues.apache.org/jira/browse/AVRO-625
> Project: Avro
> Issue Type: New Feature
> Components: java, spec
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.5.0
>
>
> It should be possible, when using a stateful, connection-based transport, for a client to complete a second request over a connection before the first request has returned. In other words, responses should be permitted to arrive out-of-order.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-625) RPC: permit out-of-order responses
Posted by "ryan rawson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905362#action_12905362 ]
ryan rawson commented on AVRO-625:
----------------------------------
Not sure exactly, but when multiple threads (lets say 50) all share 1 socket to talk to 1 regionserver (in my tests), the speed is capped below 13k ops/sec. Freeing that, along with some server-side fixes, we can hit past 21k. The thing to remember is that HBase doesn't stream data from disk ever - we read & cache data from HDFS, and in my test, the test is 100% memory cached. Also the more data you have to stream, the worse things become, mostly because it takes a while to read out 64kbytes into a local array.
The memory caching is key here, since everything comes from RAM we should be able to serve at insane speeds, but this is just not the case, in part due to this connection sharing, also in part due to server-side issues (Listener actually reading & deserializing data for all connections) and so on.
> RPC: permit out-of-order responses
> ----------------------------------
>
> Key: AVRO-625
> URL: https://issues.apache.org/jira/browse/AVRO-625
> Project: Avro
> Issue Type: New Feature
> Components: java, spec
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.5.0
>
>
> It should be possible, when using a stateful, connection-based transport, for a client to complete a second request over a connection before the first request has returned. In other words, responses should be permitted to arrive out-of-order.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-625) RPC: permit out-of-order responses
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902049#action_12902049 ]
Doug Cutting commented on AVRO-625:
-----------------------------------
I think it is possible to implement this as an optional, back-compatible feature as follows:
- clients may add a "call-id" metadata field to requests, uniquely identifying the call within the connection.
- if no call-id is present in a request, servers must respond in-order.
- if a call-id is present in a request, and a server supports out-of-order responses, the server must copy the "call-id" to the response;
- if no call-id is present in a response, then the response must be in-order.
Simple clients and servers need not specify call ids.
A client which can handle out-of-order responses might keep a lifo queue of outstanding call-ids so that it can process responses that lack a call-id.
A server which implements out-of-order responses, when requests lack call-ids, might block subsequent requests over the connection until each response has been sent.
> RPC: permit out-of-order responses
> ----------------------------------
>
> Key: AVRO-625
> URL: https://issues.apache.org/jira/browse/AVRO-625
> Project: Avro
> Issue Type: New Feature
> Components: java, spec
> Reporter: Doug Cutting
> Assignee: Doug Cutting
>
> It should be possible, when using a stateful, connection-based transport, for a client to complete a second request over a connection before the first request has returned. In other words, responses should be permitted to arrive out-of-order.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.