WPG - Active connections + persistent idle connections
Alex Rousskov
rousskov at measurement-factory.com
Fri Mar 18 02:28:28 UTC 2016
On 03/17/2016 12:45 PM, Sanjeevi Rangan wrote:
> I am trying to simulate persistent idle connections (that won't
> contribute to the actual traffic) along with the workload that
> contributes to the traffic. For an instance, if the actual test has 100
> concurrent connections that has content size of 64KB, I would like to
> have few sockets (say 50) in established state without sending any
> requests. The requests would go via proxy. Is it possible to keep the
> socket connections (client->proxy->server) alive with out sending any
> requests (or just keep alives that doesn't send much of data) in WPG?
Yes, provided the proxy plays along. Polygraph can only control its side
of the robot-proxy and proxy-server connections. The proxy may decide to
close its connection at any time regardless of what Polygraph does.
To accomplish the above, use 50 Robots with large constant pconn_use_lmt
that avoid non-idempotent requests. Such a robot will not close its side
of the idle persistent connection until its idle timeout expires (which
you control via idle_pconn_tout).
Same for Polygraph Server, except you only need one to serve all 50 robots.
I believe all of the PGL options mentioned above are documented at
http://www.web-polygraph.org/docs/reference/pgl/types.html#type:docs/reference/pgl/types/Agent
Currently, there is no way to tell Polygraph to open a new connection
(and send a new request) as soon as the proxy closes a previously idle
persistent connection. That would be a generally useful option to add.
It would make your test setup less dependent on the proxy behavior
because Polygraph will maintain a pool of mostly idle 50 HTTP
connections even if the proxy closes idle connections after a few
seconds of inactivity.
Currently, there is no way to configure Robots to open a connection
without sending at least one request on that connection. We could add an
option to delay request sending (after opening a connection for that
request), but that feels like going a little too far in TCP testing
direction. Besides, proxies may be more impatient with virgin
connections waiting for their first request than with previously used
idle persistent connections so you may want to send that first GET or
HEAD anyway.
> I can even run two instances of WPG server (listening to two different
> ports) and clients (one for the active connections and another one for
> idle connections).
One polygraph-client (or polygraph-server) instance can support
thousands of robots (or server agents). You may want to create agents
dedicated to this "idle connection pool" task, but there is no need to
use many Polygraph instances to accomplish that. Just describe
everything your test needs in one PGL workload.
HTH,
Alex.
More information about the Users
mailing list