Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88001 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42566 invoked from network); 2 Sep 2015 06:03:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2015 06:03:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.180 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.180 mail-ob0-f180.google.com Received: from [209.85.214.180] ([209.85.214.180:35222] helo=mail-ob0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/B5-23910-44196E55 for ; Wed, 02 Sep 2015 02:03:48 -0400 Received: by obuk4 with SMTP id k4so18396820obu.2 for ; Tue, 01 Sep 2015 23:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Fv97UokBOUyq3p6ApC5Hsw/TsE8J8YdMkLF2QZe5HGg=; b=0CmSA6FNQyHTK0r1psb8eYaz2k22vhpOVNhwrWWsW84tbGK32l6B8giXSCJWYJ1BtP VybJA2w1LfU/oD9qmJ8GsM2JR6wQUdZWrWIozAK65g8CYM8CEQHZTp9AJmfk6u8G6PNZ y3uBw1K8KGd0u6AskgXXzmBmU+yIuZaytpMVdACBEwb1SP/w9pP+3itNctvvmdnhzsEj S2j2R/bpbMCNmVPmb0nS0WVN2339PkBN3c8uXJ1srw3/LTAfHlru222i4LX7P9tiB1cV Mz+XH/3NMPsiKeKDaqplsQYduciU9zelUgCjB1Fs0ORJpt53TtdR5cJYhiQO/VU5Y5Pq JvDw== MIME-Version: 1.0 X-Received: by 10.60.82.67 with SMTP id g3mr18991558oey.29.1441173825158; Tue, 01 Sep 2015 23:03:45 -0700 (PDT) Received: by 10.202.169.198 with HTTP; Tue, 1 Sep 2015 23:03:43 -0700 (PDT) Received: by 10.202.169.198 with HTTP; Tue, 1 Sep 2015 23:03:43 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Sep 2015 13:03:43 +0700 Message-ID: To: Davey Shafik Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7b676d52e886c1051ebd6dcd Subject: Re: [PHP-DEV] Add HTTP/2 Multiplexing-related constants to ext/curl From: pierre.php@gmail.com (Pierre Joye) --047d7b676d52e886c1051ebd6dcd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, On Sep 2, 2015 12:31 PM, "Davey Shafik" wrote: > > Hi, > > I've been poking around at HTTP/2 a lot lately, and it seems that so long > as you are using libcurl 7.43.0+ it's possible to do request multiplexing= . > > This change simply introduces three constants, CURLPIPE_NOTHING (0), > CURLPIPE_HTTP1 (1), and CURLPIPE_MULTIPLEX (2) which represent possible > values passed into curl_multi_setopt() for the CURLMOPT_PIPELINING option= . > Current behavior of passing in 0 and 1 map to the first two constants, > while the third allows for multiplexing. > > Now, of course, being constants, you can just pass in 0, 1, or 2, but thi= s > brings the consistency and explicitness of exposing them as with all the > other curl constants. > > I'd love to see this make it into PHP 7.0 if it's not too late? It's > extremely trivial, but whatever =E2=80=94 not that fussed :) > > PR is here: https://github.com/php/php-src/pull/1497 > > I'm not sure if there is some way to ensure that libcurl is compiled with > nghttp, but we don't check for the other HTTP/2 stuff so either it's done > elsewhere and I missed it, or we're making assumptions that the right > version is enough. Any input on this would be good. > > FTR, multiplexing can bring substantial performance improvements, > especially when factoring in SSL: > > 379 HTTP SSL requests > > Using HTTP/2 in serial: 63.293796062469 (HTTP/1.1 in serial should be eve= n > slower) > Using HTTP/1.1 with curl_multi: 12.383034944534 > Using HTTP/2 w/multiplexing: 2.7933928966522 I think it should be fine as nothing is changed in the code but the constants addition. Let see what the RMs say :) --047d7b676d52e886c1051ebd6dcd--