Is there a way to make 10 GET with 1 CONNECT

Alex Rousskov rousskov at measurement-factory.com
Mon Sep 25 21:05:47 UTC 2017


On 09/22/2017 04:31 PM, Nagaraja Gundurao wrote:

> I am currently exploring a case where I want to make 1 CONNECT with
> that I need to send 10 or more GET requests.  Is this possible and if
> yes, what do I need to set in the .pg file?.

Yes, it is possible. If you allow Polygraph to use persistent HTTP
connections, it should reuse CONNECT tunnels for many requests.

To allow persistent connection use, pconn_use_lmt should yield a
positive number. It is also a good idea to set idle_pconn_tout. For
details about those settings, search [1] for "pconn". For examples,
search workloads/include/polymix-4-guts.pg distributed with Polygraph.

Please note that both sides of a persistent connection have to keep it
persistent. In many cases, you need to configure both Polygraph robots
and server to use persistent connections (same setting apply to both
kinds of agents). And if your proxy modifies tunneled messages, it has
to play along as well.

Finally, persistent connections lead to HTTP race conditions when a
client attempts to send a request on the connection already closed by
the server. In many test scenarios, your Polygraph server should keep
idle persistent connections open longer than the client does.


[1]
http://www.web-polygraph.org/test/docs/reference/pgl/types.html#type:docs/reference/pgl/types/Agent


HTH,

Alex.


More information about the Users mailing list