thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Latza <>
Subject Thrift / Scala concurrency issue
Date Wed, 16 Sep 2009 16:54:59 GMT
Hi everybody,

while Scala isn''t natively supported by Thrift, maybe someone has  
seen the same problem I'm facing.
I have got a very simple Thrift service which is doing some processing  
(100 to 1000ms) and then returns the result back to the client. When  
benchmarking I noticed that when adding more concurrent clients the  
performance degraded: while one client was getting 10 req/sec, two  
were getting 5 req/sec, and so on. So the server is handling the  
requests sequential for some reason. I have tried all implementations  
(TThreadPoolServer, TNonblockingServer, THsHaServer) with the same  
results. The implementation is quite vanilla:

// Includes here...

class ServiceHandler() extends service.Iface {
	override def call_function(String: foo) : String = {
		return "result"

object server {
  def main(args: Array[String]) {
    val processor = new service.Processor(new ServiceHandler())
    val socket = new TNonblockingServerSocket(9090)
    val server = new TNonblockingServer(processor, socket)

Java 1.6.0_16, Scala 2.7.5, same results on Mac and Linux.

Any hints what I might be running into here?


View raw message