.shareConnections explained

1,311 views
Skip to first unread message

Magnus Jensen

unread,
Dec 27, 2014, 3:56:37 PM12/27/14
to gat...@googlegroups.com
Hi,
I run a scenario that consists of two simple consecutive REST calls, and takes (with one user/real-wordl) approx. 4 seconds (I use no pauses of pacing).

without .shareConnections I get

[WARN ] i.g.h.a.AsyncHandlerActor - Request 'getService' failed: java.util.concurrent.TimeoutException: Request timed out to myapp.site.com/vv.zz.cc.xxx:443 of 60000 ms

But with .shareConnections set I do not get the WARN.

What does .shareConnections mean (basically explained), and is it not realistic to use this setting when doing REST-API simple perf testing?

My load model:

setUp(scn.inject(rampUsersPerSec(1) to (20) during (2 minutes))).maxDuration(5 minutes).protocols(httpConf)


Also I do not get a "a trend" in my reqs/responses per second using this load model. Is that because the scenario is so short?


Excilys

unread,
Jan 2, 2015, 8:22:01 AM1/2/15
to gat...@googlegroups.com
shareConnections means that you have one single global HTTP connection pool, not one per virtual user.
The former is more realistic if you have just a few real world users but still designed your Simulation with tons of virtual users. Think of server side programs calling APIs, such as booking, price comparators, etc.
The latter is more realistic if you have tons of real world users that each handle connections, typically browsers.

Those request timeouts typically mean application resource starvation, such as database connections.


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Magnus Jensen

unread,
Jan 13, 2015, 8:08:05 AM1/13/15
to gat...@googlegroups.com
Ok, I have an app (iPhone and Android), but the test I am running goes against REST api's.
The top-hour is estimated to hav 1500 unique users in one hour.
Using .shareConnections should then be the preferred way to go here then?

Stéphane Landelle

unread,
Jan 13, 2015, 10:20:22 AM1/13/15
to gat...@googlegroups.com
No.

Magnus Jensen

unread,
Jan 13, 2015, 10:35:52 AM1/13/15
to gat...@googlegroups.com
so skip the .shareConnections then?

Stéphane Landelle

unread,
Jan 13, 2015, 10:45:51 AM1/13/15
to gat...@googlegroups.com
Yep. You want to simulate a big bunch of phones. Different from a few servers of a price comparator app that call remote APIs with a bunch of concurrent connections.
Reply all
Reply to author
Forward
0 new messages