[tarantool-patches] Re: [PATCH v2] iproto: introduce a proxy module.
kostja at tarantool.org
Tue Oct 16 21:42:14 MSK 2018
* Vladimir Davydov <vdavydov.dev at gmail.com> [18/10/11 09:55]:
> I may be wrong, but I think that using a hash table for mapping client
> connection syncs to server connection syncs, like you do here, may hurt
> performance (think of thousands requests in flight). If we really want
> to multiplex, I'd rather consider extending xrow_header with something
> like connection_id. This might need some benchmarking though.
This is a typical approach used in other proxies. My guess is that
hashing an integer sync has very low overhead compared to the
overall cost of sending/receiving it. Besides, let's keep in mind
that a proxy is usually stateless so you can have many of them,
and CPU on a proxy is cheap. Basically, the principle should be
that as much work as possible should be done on a proxy.
> > + coio_write_iproto_response(&con->output, &row);
> > +
> > + fiber_gc();
> > + }
> > + return 0;
> > +}
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
More information about the Tarantool-patches