Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 801AB118AE for ; Thu, 17 Jul 2014 18:10:24 +0000 (UTC) Received: (qmail 25025 invoked by uid 500); 17 Jul 2014 18:10:22 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 24956 invoked by uid 500); 17 Jul 2014 18:10:22 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 24944 invoked by uid 99); 17 Jul 2014 18:10:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jul 2014 18:10:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Steve.Zweep@watchguard.com designates 206.191.171.101 as permitted sender) Received: from [206.191.171.101] (HELO XCS01CO.watchguard.com) (206.191.171.101) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jul 2014 18:10:19 +0000 From: Steve Zweep To: "dev@httpd.apache.org" Subject: Question about async mod_proxy_wstunnel and threads Thread-Topic: Question about async mod_proxy_wstunnel and threads Thread-Index: Ac+h5XytHQsy+CF5QO2T1BA/0SM8Bg== Date: Thu, 17 Jul 2014 18:09:52 +0000 Message-ID: <56C2E06F97EACF4FB2F1B31EEFC4493091FA8B62@mbx2.wgti.net> Accept-Language: en-CA, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: multipart/alternative; boundary="_000_56C2E06F97EACF4FB2F1B31EEFC4493091FA8B62mbx2wgtinet_" MIME-Version: 1.0 Received-SPF: none X-Virus-Checked: Checked by ClamAV on apache.org --_000_56C2E06F97EACF4FB2F1B31EEFC4493091FA8B62mbx2wgtinet_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi I am prototyping a system in which we will have a large number of websocket= connections between multiple clients and a server (potentially) behind mod= _proxy_wstunnel. Currently I am testing a trunk build with the event mpm. W= ith ProxyWebsocketAsync turned off, communication between client and server= works well except that an Apache thread is held open for each connection (= which is expected). With ProxyWebsocketAsync enabled, these threads are no = longer seen, again as expected. I see two issues though: 1. While communication from client to server works well, unsolicited = messages from the server to clients seem to queue. If the client subsequent= ly sends a message back to the server, the original message from the server= is received. I would have expected the data from the server to generate an= event resulting in immediate delivery. 2. In attempts to debug this I experimented with ProxyWebsocketAsyncD= elay. I observed that when this is used, the connections never go into asyn= c mode. I.e. proxy_tunnel_pump() never returns SUSPENDED. As a result I see= the same thread usage as when ProxyWebsocketAsync is turned off. Is this e= xpected behavior? Any insights into what is going on here would be helpful. I noticed that th= ere have been a number of recent changes both to the event mpm and mod_prox= y_wstunnel. Perhaps there are still some known issues with this code? Thanks - Steve ----------- Steve Zweep | Senior Software Engineer WatchGuard Technologies, Inc. | www.watchguard.com 905.804.2143 steve.zweep@watchguard.com --_000_56C2E06F97EACF4FB2F1B31EEFC4493091FA8B62mbx2wgtinet_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi

 

I am prototyping a system in which we will have a la= rge number of websocket connections between multiple clients and a server (= potentially) behind mod_proxy_wstunnel. Currently I am testing a trunk buil= d with the event mpm. With ProxyWebsocketAsync turned off, communication between client and server works well except that= an Apache thread is held open for each connection (which is expected). Wit= h ProxyWebsocketAsync enabled, these threads are no longer seen, again as e= xpected. I see two issues though:

1.     &= nbsp; While communication from client to server works wel= l, unsolicited messages from the server to clients seem to queue. If the cl= ient subsequently sends a message back to the server, the original message = from the server is received. I would have expected the data from the server to generate an event resulting in i= mmediate delivery.

2.     &= nbsp; In attempts to debug this I experimented with Proxy= WebsocketAsyncDelay. I observed that when this is used, the connections nev= er go into async mode. I.e. proxy_tunnel_pump() never returns SUSPENDED. As= a result I see the same thread usage as when ProxyWebsocketAsync is turned off. Is this expected behavior= ?

 

Any insights into what is going on here would be hel= pful. I noticed that there have been a number of recent changes both to the= event mpm and mod_proxy_wstunnel. Perhaps there are still some known issue= s with this code?

 

Thanks

 

- Steve

 

-----------

Steve Zweep | Senior Software Engineer

WatchGuard Technologies, Inc. | www.watchguard.com

 

905.804.2143

steve.zweep@watchguard.com

 

--_000_56C2E06F97EACF4FB2F1B31EEFC4493091FA8B62mbx2wgtinet_--