Thursday, February 04, 2010

CouchDb RPC vs HTTP client

I have been lately doing Erlang RPC client for couchdb and found following interesting facts.
Http is almost 3 times slower than RPC and 6-7 times slower than co-located client (client and couchdb running on same beam process).
runtime=20 wall_clock=280 microseconds
runtime=10 wall_clock=313 microseconds
runtime=20 wall_clock=368 microseconds
runtime=20 wall_clock=402 microseconds
runtime=20 wall_clock=445 microseconds

runtime=80 wall_clock=781 microseconds
runtime=80 wall_clock=819 microseconds
runtime=80 wall_clock=804 microseconds
runtime=80 wall_clock=784 microseconds
runtime=80 wall_clock=798 microseconds