Connection multiplexing in the Erlang client

Matthew Von-Maszewski matthewv at basho.com
Sun Jan 3 14:31:42 EST 2016


Paulo,

There is nothing to prevent you from "stacking" multiple protocol buffer request packets into the TCP chain.  None of our published clients support this usage, but it is known to work.  You would always get the response packets in the order you sent request packets.  The benefit is that there is no round trip wait between response of first packet and arrival at server for request in second packet.

Start with stacking two packets at a time, then work up until throughput no longer changes.

Matthew

> On Jan 2, 2016, at 8:30 AM, Paulo Almeida <paulo.m.m.almeida at gmail.com> wrote:
> 
> Hi Russell,
> 
> Thanks for the confirmation.
> 
> I'll take a look at the riak_api. I suspect the protobuf messages would also need to be changed to include a token/correlation id in order to allow async request/replies.
> 
> Regards,
> 
> Paulo
> 
> On Thu, Dec 31, 2015 at 10:16 AM, Russell Brown <russell.brown at me.com <mailto:russell.brown at me.com>> wrote:
> Hi Paulo,
> You’ll need more than client work. If you’re interested in exploring the server side code riak_api (https://github.com/basho/riak_api <https://github.com/basho/riak_api>) is probably where you want to look.
> 
> I’m happy to help/advise on this if you want to get stuck in :D
> 
> Cheers
> 
> Russell
> 
> On 31 Dec 2015, at 08:47, Paulo Almeida <paulo.m.m.almeida at gmail.com <mailto:paulo.m.m.almeida at gmail.com>> wrote:
> 
> > Hi,
> >
> > A poolboy or other connection pool based solution still means 1 open tcp connection per worker. I'm exploring the option of having a single TCP connection (actually 1 for each Riak node) and then multiplex concurrent requests to a DB node in a single TCP connection (think HTTP/2 TCP connection multiplexing).
> >
> > Thanks.
> >
> > Paulo
> >
> > On Thu, Dec 31, 2015 at 2:59 AM, Bryan Hunt <admin at binarytemple.co.uk <mailto:admin at binarytemple.co.uk>> wrote:
> > Paulo,
> >
> > You can find a list of community maintained PBC pooling ‎libraries in the Erlang sub-section of this page:
> >
> > ‎http://docs.basho.com/riak/latest/dev/using/libraries/#Community-Libraries <http://docs.basho.com/riak/latest/dev/using/libraries/#Community-Libraries>
> >
> > II was under the impression that Riak Erlang client ships with poolboy ‎so I'm uncertain of the distinction between the different libraries listed.
> >
> > Perhaps someone could comment to clarify?
> >
> > Bryan
> >
> >
> >
> > From: Paulo Almeida
> > Sent: Wednesday, December 30, 2015 10:40 PM
> > To: riak-users at lists.basho.com <mailto:riak-users at lists.basho.com>
> > Subject: Connection multiplexing in the Erlang client
> >
> > Hi,
> >
> > Does the Erlang Riak client support multiplexing multiple concurrent calls in a single TCP connection? Specifically when using the PB interface (riakc_pb_socket:start_link).
> >
> > Thanks.
> >
> > Regards,
> >
> > Paulo
> >
> >
> > _______________________________________________
> > riak-users mailing list
> > riak-users at lists.basho.com <mailto:riak-users at lists.basho.com>
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com <http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com>
> 
> 
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20160103/31504b5a/attachment-0002.html>


More information about the riak-users mailing list