From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0FB5B2C704 for ; Tue, 16 Oct 2018 14:42:17 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V6h7Vh-T8qYL for ; Tue, 16 Oct 2018 14:42:16 -0400 (EDT) Received: from smtp62.i.mail.ru (smtp62.i.mail.ru [217.69.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id BFBAA2C6D4 for ; Tue, 16 Oct 2018 14:42:16 -0400 (EDT) Date: Tue, 16 Oct 2018 21:42:14 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2] iproto: introduce a proxy module. Message-ID: <20181016184214.GF5454@chai> References: <20181002180554.1142-1-sergepetrenko@tarantool.org> <20181008194515.h5tgx7erp5ryjywp@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181008194515.h5tgx7erp5ryjywp@esperanza> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Serge Petrenko * Vladimir Davydov [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