Limiting TCP connections

Hi,

I’d like to limit TCP connections and make all requests go through these.

I thought of injecting x amount of users and then looping:
https://github.com/bbc/gatling-load-tests/blob/master/src/test/scala/bbc/geoip/GeoIp.scala

There are two problems I see with this:

  1. I will be unable to control the amount of requests per second without pausing/pacing and throttling
  2. The console output keeps printing OK requests of 20 (atOnceUsers(10))

Is there a better way of limiting TCP connections and why do looped requests not appear in the Gatling stdout?

Many Thanks

Aidy

I'd like to limit TCP connections and make all requests go through these.

What's the rationale?

why do looped requests not appear in the Gatling stdout?

caching?

*Stéphane Landelle*
*GatlingCorp CEO*
slandelle@gatling.io

Hi Stéphane,

why do looped requests not appear in the Gatling stdout?> caching?

Yes, I should have realised that.

I’d like to limit TCP connections and make all requests go through these.
What’s the rationale?

After further investigation, it seems that there are x number of clients that make API calls with a keep-alive of 45 secs.

So, I was thinking maybe I inject a new set of users every 45 seconds?

Many Thanks

Aidy

After further investigation, it seems that there are x number of clients
that make API calls with a keep-alive of 45 secs.

Are those clients trusted? Even though, keep-alive duration client should
never be trusted and servers should quickly close connections after some
idle time. IMHO, 45 secs is very (way too) long. I'd use something like
5-15 seconds.

Hi Stephane,

The clients are internal, but I am struggling on how to model this. It looks as though we may have a batch of requests within each keep-live session.

Aidy

So your clients are other applications, not browsers?

Yes, it is actually one application and X amount of instances of it.

So you should share the connection pool.

So you should share the connection pool.

Thanks, but wouldn’t this mean all users share one connection? Would I need to write x number of similar scenarios to simulate x connections?

How do those applications work? Do they use one single connection each? Or do they use a connection pool too?

Each application instance would make a separate connection.

OK, so you’re back with your original solution. And I don’t see your points.

OK, so you’re back with your original solution. And I don’t see your points.

Thanks Stephane,

One of the drawbacks of my original solution was that if I make x number of connections and loop, I will only be able to “control” the request rate through pace/pausing and throttling, and I wondered if there was a better way to handle this.

No :slight_smile:

Hi

my application also having the scenario.As you mentioned can controlling the request rate by pause/throttling .
which is the best approach ? throttling or pause

Hi,

Could you please express your requirements a little more fully as there may be alternative ways to achieve your goal?