thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Reiss <>
Subject Re: Multiplexed, poolable transport
Date Thu, 19 Jun 2008 18:40:09 GMT
It seems to me that this is something that can be done completely
outside of Thrift (and we have done it at least once at Facebook).
Currently, it is not possible to use the same connection for multiple
simultaneous requests, but the concept of a client pool should still
work.  If this is done in a general way, I'd be happy to include it
in the base Thrift distribution.


Johan Stuyts wrote:
> Hi,
> Is anyone interested in writing a specification for a multiplexed, 
> poolable transport?
> My use case is this: I separate my applications in a server tier 
> containing all the business logic, validation and security, and one or 
> more presentation tiers. All functionality of the application is exposed 
> using multiple Thrift services. The current implementation requires 
> opening a new server socket for each service. When the number of services 
> grows this becomes very cumbersome. Also a connection to the server can be 
> used for only one invocation which makes invocations expensive because the 
> TCP handshake has to be performed each time.
> What I am proposing is similar to database connections. The client pools a 
> number of connections to the server. When a request has to be made, a 
> connection is retrieved from the pool, a function of an arbitrary service 
> is invoked and the connection is returned to the pool.
> The advantages are:
> - more friendly to firewalls. Only one socket per application needs to be 
> opened.
> - better performance because connections are kept open indefinitely so the 
> expensive TCP handshake can be omitted.
> I have no experience writing protocols so I will need help to write the 
> specification.
> --
> Kind regards,
> Johan Stuyts

View raw message