How to re-use the SSL session for a single vuser for each and every iteration, but different for another vuser

278 views
Skip to first unread message

srikant

unread,
Apr 5, 2012, 7:36:39 PM4/5/12
to LoadRunner
Hi All,

I have to create a Web Service script wherein i should hit a request,
which inturn will create a SSL session for a single user. Now, for all
the iterations of the same user, the same SSL session has to be
reused. But when the next user hits, the user has to establish a new
SSL session and again, the same SSL session has to be re-used for all
its iterations.This was raised by the application team, as the SSL
handshake was doing an overhead on the performance of the service. So
can any one please help me to find out a way to accomplish the same. I
tried creating the script with web http/html and web service protocol
with "Print SSL information" enabled in Run-Time settings and got the
SSL info in the logs. But since this is the connection part, i was not
able to capture it or use it for anything.I am stuck and not able to
find any way.
Any help would be really appreciated.

Thanks & Regards,
Srikant S

Ganesh Moorthy

unread,
Apr 5, 2012, 8:46:45 PM4/5/12
to lr-loa...@googlegroups.com
Try this option to force only 1 session per connection ....

web_set_sockets_option("MAX_CONNECTIONS_PER_HOST","1");

To load the CERT try this ......

web_set_certificate_ex("CertFilePath=example.PEM", "CertFormat=PEM", LAST);
web_set_sockets_option("LOAD_VERIFY_FILE","example.PEM");

> --
> You received this message because you are subscribed to the Google "LoadRunner" group.
> To post to this group, send email to LR-Loa...@googlegroups.com
> To unsubscribe from this group, send email to
> LR-LoadRunne...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/LR-LoadRunner?hl=en

srikant

unread,
Apr 8, 2012, 7:16:27 PM4/8/12
to LoadRunner
Hi Ganesh,

Thank you for your prompt response. I will try the same and let you
know.

Best Regards,
Srikant

André Luyer

unread,
Apr 9, 2012, 4:25:05 PM4/9/12
to LoadRunner
The easiest way would be to execute all actions for one userid in one
iteration.

If it must be multiple iterations (I can't think of a reason...) then
you may convert your script to Web/HTML and turn off the setting
"Simulate a new user on each iteration" in the browser emulation (not
available with Web Services).
To force a disconnect when switching to the next userid you can use:
web_set_sockets_option("CLOSE_KEEPALIVE_CONNECTIONS", "1");

Use 'advanced trace' to find out when TCP/SSL connections are set up
and closed.

André
Reply all
Reply to author
Forward
0 new messages