All Classes Namespaces Files Functions Pages
Layer5.Http.MultiClient Class Reference

Layer5.Http.MultiClient can be used in combination with Layer5.Http.MultiServer to start multiple concurrent HTTP requests. More...

Methods

 CumulativeConnectionLimit.Get
 Returns the limit on the total number of connections that may be created. More...
 
 CumulativeConnectionLimit.Set
 Sets a limit on the total number of connections that may be created. More...
 
 Description.Get
 Returns a textual description of the object.
 
 Duration.Get
 Returns the flow duration. More...
 
 Duration.Set requestDuration
 Sets the maximum total duration of the flow. More...
 
 Finished.Get
 Returns true if the flow has finished or was stopped explicitly. More...
 
 FlowLabel.Get
 Returns the "Flow Label" for IPv6 flows. More...
 
 FlowLabel.Set
 Sets the flow label for IPv6 flows. More...
 
 Http.Method.Get
 Returns the HTTP request method. More...
 
 Http.Method.Set
 Sets the HTTP request method. More...
 
 InitialTimeToWait.Get
 Returns the initial time to wait value. More...
 
 InitialTimeToWait.Set timeToWait
 Sets the initial time to wait before really starting the flow. More...
 
 Local.PortRange.Get
 Returns the port range. More...
 
 Local.PortRange.Set min max
 Sets the local port range for the TCP connections. More...
 
 MaximumConcurrentConnectionAttempts.Get
 Returns the maximum number of concurrent connection attempts.
 
 MaximumConcurrentConnectionAttempts.Set
 Sets the maximum number of concurrent connection attempts. More...
 
 MaximumConcurrentRequests.Get
 Returns the maximum number of concurrent requests. More...
 
 MaximumConcurrentRequests.Set numberOfRequests
 Sets the maximum number of concurrent requests. More...
 
 MaximumSegmentSize.Get
 Returns the TCP maximum segment size. More...
 
 MaximumSegmentSize.Set size
 Sets the TCP maximum segment size. More...
 
 Parent.Get
 Returns the parent object.
 
 ReceiveWindow.InitialSize.Get
 Returns the TCP receive window. More...
 
 ReceiveWindow.InitialSize.Set windowsize
 Sets the TCP receive window. More...
 
 ReceiveWindow.Scaling.Enable
 Enables of disables the TCP window scale option. More...
 
 ReceiveWindow.Scaling.IsEnabled
 Returns if TCP window scaling is enabled or not. More...
 
 ReceiveWindow.Scaling.Value.Get
 Returns the TCP window scale value. More...
 
 ReceiveWindow.Scaling.Value.Set scale
 Sets the TCP window scale value. More...
 
 Remote.Address.Get
 Returns the remote address. More...
 
 Remote.Address.Set address
 Sets the remote address for the HTTP requests. More...
 
 Remote.Port.Get
 Returns the remote port. More...
 
 Remote.Port.Set portNumber
 Sets the remote port for the HTTP requests. More...
 
 Result.Get
 Returns the current result counters. More...
 
 Result.History.Get
 Returns the result history. More...
 
 Sampling.BufferLength.Get
 Returns the snapshot buffer length. More...
 
 Sampling.BufferLength.Set
 Configure the snapshot buffer size. More...
 
 Sampling.Interval.Duration.Get intervalDuration
 Returns the duration for the result snapshots. More...
 
 Sampling.Interval.Duration.Set
 Sets the duration of the result snapshots. More...
 
 Session.Duration.Get
 Returns the session duration expressed in nanoseconds. More...
 
 Session.Duration.Set requestDuration
 Sets the duration for the individual HTTP requests. More...
 
 Session.RateLimit.Get
 Returns the rate limit for the individual HTTP requests. More...
 
 Session.RateLimit.Set
 Sets a rate limit for the individual HTTP requests. More...
 
 Session.Size.Get
 Returns the session size. More...
 
 Session.Size.Set requestSize
 Sets the size for the individual HTTP requests. More...
 
 Size.Get
 Returns the size limit. More...
 
 Size.Set requestSize
 Puts a size limit on the total number of bytes that can be sent. More...
 
 SlowStartThreshold.Get
 Returns the initial slow-start threshold value used by TCP. More...
 
 SlowStartThreshold.Set ssthresh
 Set the initial slow-start threshold value used by TCP. More...
 
 Start
 Starts the flow. More...
 
 Status.Get
 Returns the status of the flow. More...
 
 Stop
 Stops the flow. More...
 
 Tcp.CongestionAvoidance.Algorithm.Get
 Returns the preferred TCP Congestion Avoidance Algorithm. More...
 
 Tcp.CongestionAvoidance.Algorithm.Set congestionAvoidanceAlgorithm
 Configure the preferred TCP Congestion Avoidance Algorithm. More...
 
 Tcp.Prague.Enable
 Enables TCP Prague congestion control for L4S.
 
 Tcp.Prague.IsEnabled
 Returns if TCP Prague congestion control is enabled or not.
 
 TypeOfService.Get
 Returns the 'Type Of Service' or 'Traffic Class' value.
 
 TypeOfService.Set
 Sets the 'Type Of Service' or 'Traffic Class' used at the IP layer. More...
 

Class overview

Layer5.Http.MultiClient can be used in combination with Layer5.Http.MultiServer to start multiple concurrent HTTP requests.

When starting the flow, the configured number of HTTP requests will be started. Each time a request is finished (succesfully or unsuccesfully) it will be replaced by a new request. This is repeated until one of the configured stop conditions is reached. Possible stop conditions are: total duration, total size or number of connections created. If no stop conditions are configured then the flow continues indefinitely.

Main parameters:

MaximumConcurrentRequests
Number of HTTP requests to run concurrently
Duration
Total duration of the flow
Size
Total number of bytes that may transmitted
SessionDuration
Duration of individual requests
SessionSize
Number of bytes transmitted by individual requests
CumulativeConnectionLimit
Maximum number of connections that may be created during the whole flow
Since
2.10.0

Definition at line 13654 of file api.tcl.

Method documentation

Layer5.Http.MultiClient::CumulativeConnectionLimit.Get

Returns the limit on the total number of connections that may be created.

A value of zero indicates no limit (infinite number of connections may be created).

Example
1 $httpMultiClient CumulativeConnectionLimit.Get

Returns:

100 

Definition at line 13666 of file api.tcl.

Layer5.Http.MultiClient::CumulativeConnectionLimit.Set

Sets a limit on the total number of connections that may be created.

Once the total number of connection attempts has reached the configured limit no new connections will be created. If there are no active connections at that time then flow immediately enters Finished state. Otherwise the flow remains in Running state until all remaining requests have finished.

A value of zero indicates no limit (infinite number of connections may be created).

Default value: 0
Example

Allow 100 connection attempts in total

1 $httpMultiClient CumulativeConnectionLimit.Set 100

Definition at line 13682 of file api.tcl.

Layer5.Http.MultiClient::Duration.Get

Returns the flow duration.

A value of zero indicates unlimited duration.

Returns
The configured request duration in nanoseconds.
Example
1 $httpMultiClient Duration.Get

Returns:

300000000000 

Definition at line 13701 of file api.tcl.

Layer5.Http.MultiClient::Duration.Set   requestDuration  

Sets the maximum total duration of the flow.

A value of zero indicates unlimited duration.

Default value: 0
Parameters
requestDurationThe total duration of the flow.
Example

Configure the flow to run for 15 minutes

1 $httpMultiClient Duration.Set 15m

Definition at line 13717 of file api.tcl.

Layer5.Http.MultiClient::Finished.Get

Returns true if the flow has finished or was stopped explicitly.

Example

Check if the multi-session is finished

1 $httpMultiClient Finished.Get

Returns:

1 

Definition at line 13727 of file api.tcl.

Layer5.Http.MultiClient::FlowLabel.Get

Returns the "Flow Label" for IPv6 flows.

This feature only affects IPv6 flows. It is ignored for IPv4 flows.

Example
1 $httpMultiClient FlowLabel.Get

Definition at line 13739 of file api.tcl.

Layer5.Http.MultiClient::FlowLabel.Set

Sets the flow label for IPv6 flows.

This feature only affects IPv6 flows. It is ignored for IPv4 flows.

Example
1 $httpMultiClient FlowLabel.Set 1234

Definition at line 13751 of file api.tcl.

Layer5.Http.MultiClient::Http.Method.Get

Returns the HTTP request method.

Example
1 $httpClient Http.Method.Get

Returns:

PUT 

Definition at line 13761 of file api.tcl.

Layer5.Http.MultiClient::Http.Method.Set

Sets the HTTP request method.

There are 2 possible values:

GET
For HTTP GET requests (data will be downloaded from the HTTP server).
PUT
For HTTP PUT requests (data will be uploaded to the HTTP server).
Default value: GET
Example
1 $httpClient Http.Method.Set PUT

Definition at line 13775 of file api.tcl.

Layer5.Http.MultiClient::InitialTimeToWait.Get

Returns the initial time to wait value.

Example
1 $httpMultiClient Request.InitialTimeToWait.Get

Returns:

60000000000 

Definition at line 13785 of file api.tcl.

Layer5.Http.MultiClient::InitialTimeToWait.Set   timeToWait  

Sets the initial time to wait before really starting the flow.

This can be used if you want to different flows to start at different times.

Default value: 0
Parameters
timeToWaitTime to wait before the flow will start.
Example

Initial Time to wait of 60 seconds

1 $httpMultiClient Request.InitialTimeToWait.Set 60s

Initial Time to wait of 60 seconds expressed in nanoseconds

1 $httpMultiClient Request.InitialTimeToWait.Set 60000000000

Initial Time to wait of 60 seconds expressed in minutes

1 $httpMultiClient Request.InitialTimeToWait.Set 1m

Definition at line 13801 of file api.tcl.

Layer5.Http.MultiClient::Local.PortRange.Get

Returns the port range.

Example
1 $httpMultiClient Local.PortRange.Get

Returns:

20000 30000 

Definition at line 13811 of file api.tcl.

Layer5.Http.MultiClient::Local.PortRange.Set   min max  

Sets the local port range for the TCP connections.

Parameters
minThe minimum value of the port range.
maxThe maximum value of the port range.
Example
1 $httpMultiClient Local.PortRange.Set 20000 30000

Definition at line 13825 of file api.tcl.

Layer5.Http.MultiClient::MaximumConcurrentConnectionAttempts.Set

Sets the maximum number of concurrent connection attempts.

This method limits maximum number of requests that can be in the TCP SYN-SENT state.

Default value: 1
Example

Allow 100 concurrent connection attempts:

1 $httpMultiClient MaximumConcurrentConnectionAttempts.Set 100

Definition at line 13845 of file api.tcl.

Layer5.Http.MultiClient::MaximumConcurrentRequests.Get

Returns the maximum number of concurrent requests.

Example
1 $httpMultiClient MaximumConcurrentRequests.Get

Returns:

100 

Definition at line 13855 of file api.tcl.

Layer5.Http.MultiClient::MaximumConcurrentRequests.Set   numberOfRequests  

Sets the maximum number of concurrent requests.

The flow will start the requested number of HTTP requests and then maintain this number by starting a new request every time a request has finished or failed.

Default value: 1
Parameters
numberOfRequestsMaximum number of concurrent requests.
Example

Allow 100 concurrent HTTP requests:

1 $httpMultiClient MaximumConcurrentRequests.Set 100

Definition at line 13871 of file api.tcl.

Layer5.Http.MultiClient::MaximumSegmentSize.Get

Returns the TCP maximum segment size.

Default value: 65535
Example
1 $httpClient MaximumSegmentSize.Get

Returns:

65535 

Definition at line 13884 of file api.tcl.

Layer5.Http.MultiClient::MaximumSegmentSize.Set   size  

Sets the TCP maximum segment size.

This option specifies an upper bound on the TCP segment size.

Parameters
sizeMaximum segment size. Should be between 1 and 65535.
Example
1 $httpClient MaximumSegmentSize.Set 65535

Definition at line 13898 of file api.tcl.

Layer5.Http.MultiClient::ReceiveWindow.InitialSize.Get

Returns the TCP receive window.

Example
1 $httpServer ReceiveWindow.InitialSize.Get

Returns:

65535 

Definition at line 13913 of file api.tcl.

Layer5.Http.MultiClient::ReceiveWindow.InitialSize.Set   windowsize  

Sets the TCP receive window.

Parameters
windowsizeNew value of the TCP receive window. Must be between 1 and 65535 bytes.
Example
1 $httpServer ReceiveWindow.InitialSize.Set 65535

Definition at line 13925 of file api.tcl.

Layer5.Http.MultiClient::ReceiveWindow.Scaling.Enable

Enables of disables the TCP window scale option.

Window scaling window sizes that are larger than 65535 bytes.

Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Example

To enable window scaling

1 $httpClient WindowScaling.Enable true

Definition at line 13939 of file api.tcl.

Layer5.Http.MultiClient::ReceiveWindow.Scaling.IsEnabled

Returns if TCP window scaling is enabled or not.

Window scaling enables window sizes that are larger than 65535 bytes.

Returns
1
window scale enabled
0
window scale disabled
Example
1 $httpServer ReceiveWindow.Scaling.IsEnabled

Returns:

1 

Definition at line 13953 of file api.tcl.

Layer5.Http.MultiClient::ReceiveWindow.Scaling.Value.Get

Returns the TCP window scale value.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323.

Returns
current receive window scale
Example
1 $httpServer ReceiveWindow.Scaling.Value.Get

Returns:

3 

Definition at line 13967 of file api.tcl.

Layer5.Http.MultiClient::ReceiveWindow.Scaling.Value.Set   scale  

Sets the TCP window scale value.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323.

Parameters
scaleInteger (0-8), which is used for bitwise shifting.
Exceptions
ByteBlower.Exception.InvalidValue.Integerwhen the value is not an integer
Example
1 $httpServer ReceiveWindow.Scaling.Value.Set 3

Definition at line 13983 of file api.tcl.

Layer5.Http.MultiClient::Remote.Address.Get

Returns the remote address.

Example
1 $httpMultiClient Remote.Address.Get

Returns:

10.8.255.15 

Definition at line 13993 of file api.tcl.

Layer5.Http.MultiClient::Remote.Address.Set   address  

Sets the remote address for the HTTP requests.

Parameters
addressThe destination address for the HTTP requests.

This should be the address of the Layer5.Http.MultiServer.

Example
1 $httpMultiClient Remote.Address.Set 10.8.255.15

Definition at line 14007 of file api.tcl.

Layer5.Http.MultiClient::Remote.Port.Get

Returns the remote port.

Example
1 $httpMultiClient Remote.Port.Get

Returns:

80 

Definition at line 14017 of file api.tcl.

Layer5.Http.MultiClient::Remote.Port.Set   portNumber  

Sets the remote port for the HTTP requests.

Parameters
portNumberThe destination port for the HTTP requests.

This should be the port that the Layer5.Http.MultiServer is listening to.

Example
1 $httpMultiClient Remote.Port.Set 80

Definition at line 14031 of file api.tcl.

Layer5.Http.MultiClient::Result.Get

Returns the current result counters.

Returns
The OID of the Layer5.Http.MultiResultSnapshot object.
Example
1 $httpMultiClient Result.Get

Returns:

<Layer5.Http.MultiResultSnapshot object> 

Definition at line 14043 of file api.tcl.

Layer5.Http.MultiClient::Result.History.Get

Returns the result history.

This method returns a Layer5.Http.MultiResultHistory Object. This will contain the Cumulative and the Interval counters over time.

Returns
The OID of the Layer5.Http.MultiResultHistory object.
Example
1 $httpMultiClient Results.History.Get

Returns:

<Layer5.Http.MultiResultHistory object> 

Definition at line 14057 of file api.tcl.

Layer5.Http.MultiClient::Sampling.BufferLength.Get

Returns the snapshot buffer length.

Returns
The length of the server sample buffer

Definition at line 14065 of file api.tcl.

Layer5.Http.MultiClient::Sampling.BufferLength.Set

Configure the snapshot buffer size.

ByteBlower server stores the snapshots in a circular buffer before they are transferred to the client. If the buffer overflows then the oldest snapshot is overwritten. This method configures the maximum size of the buffer.

Example
1 $httpMultiClient Sampling.BufferLength.Set 6

Definition at line 14077 of file api.tcl.

Layer5.Http.MultiClient::Sampling.Interval.Duration.Get   intervalDuration  

Returns the duration for the result snapshots.

Parameters
intervalDurationexpressed as nanoseconds
Example
1 $httpMultiClient Interval.Duration.Get

Returns:

1000000000 

Definition at line 14089 of file api.tcl.

Layer5.Http.MultiClient::Sampling.Interval.Duration.Set

Sets the duration of the result snapshots.

Example
1 $httpMultiClient Sampling.Interval.Duration.Set 1000000000
Example
1 $httpMultiClient Sampling.Interval.Duration.Set 1s

Definition at line 14101 of file api.tcl.

Layer5.Http.MultiClient::Session.Duration.Get

Returns the session duration expressed in nanoseconds.

A value of zero indicates unlimited duration.

Example
1 $httpMultiClient Session.Duration.Get

Returns:

10000000000 

Definition at line 14113 of file api.tcl.

Layer5.Http.MultiClient::Session.Duration.Set   requestDuration  

Sets the duration for the individual HTTP requests.

Each request will run for the configured duration. This duration will automatically be reduced near the end of the flow so that the global time limit (see Layer5.Http.MultiClient::Duration.Set) is not exceeded.

A value of zero indicates unlimited duration.

Default value: 0
Parameters
requestDurationThe duration of each HTTP request.
Example

Configure each request to run for 10 seconds

1 $httpMultiClient Session.Duration.Set 10s

Definition at line 14131 of file api.tcl.

Layer5.Http.MultiClient::Session.RateLimit.Get

Returns the rate limit for the individual HTTP requests.

Example
1 $httpMultiClient Session.RateLimit.Get

Returns:

1000 

Definition at line 14141 of file api.tcl.

Layer5.Http.MultiClient::Session.RateLimit.Set

Sets a rate limit for the individual HTTP requests.

A value of zero indicates no rate limit.

Default value: 0
Example
1 $httpMultiClient Session.RateLimit.Set 15000

Returns:

{}  

Definition at line 14155 of file api.tcl.

Layer5.Http.MultiClient::Session.Size.Get

Returns the session size.

A value of zero indicates unlimited size.

Example
1 $httpMultiClient Session.Size.Get

Returns:

15000 

Definition at line 14167 of file api.tcl.

Layer5.Http.MultiClient::Session.Size.Set   requestSize  

Sets the size for the individual HTTP requests.

Each new started request will send or receive the configured size in bytes.

A value of zero indicates unlimited size.

Default value: 0
Parameters
requestSizeThe payload size in bytes of each HTTP request.
Example

Configure each request to send 15000 bytes:

1 $httpMultiClient Session.Size.Set 15000

Definition at line 14185 of file api.tcl.

Layer5.Http.MultiClient::Size.Get

Returns the size limit.

A value of zero indicates unlimited size.

Example
1 $httpMultiClient Size.Get

Returns:

1000000000 

Definition at line 14197 of file api.tcl.

Layer5.Http.MultiClient::Size.Set   requestSize  

Puts a size limit on the total number of bytes that can be sent.

A value of zero indicates unlimited size.

Default value: 0
Parameters
requestSizeThe maximum cumulative payload size of all flows.
Example

Allow a global payload of 1 GB

1 $httpMultiClient Size.Set 1000000000

Definition at line 14213 of file api.tcl.

Layer5.Http.MultiClient::SlowStartThreshold.Get

Returns the initial slow-start threshold value used by TCP.

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 "TCP Congestion Control" for more information on this topic.

Returns
Slow-start threshold
Example
1 $httpServer SlowStartThreshold.Get

Returns:

65535 

Definition at line 14227 of file api.tcl.

Layer5.Http.MultiClient::SlowStartThreshold.Set   ssthresh  

Set the initial slow-start threshold value used by TCP.

The slow-start threshold indicates when the slow-start phase ends and the congestion avoidance phase starts. Consider increasing this value if you find that TCP takes a long time to reach peak throughput. See RFC 5681 "TCP Congestion Control" for more information on this topic.

Parameters
ssthreshNew value for the slow-start threshold
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not a positive integer
Example

To set slow-start threshold to 1000000

1 $httpServer SlowStartThreshold.Set 1000000

Definition at line 14245 of file api.tcl.

Layer5.Http.MultiClient::Start

Starts the flow.

Exceptions
ByteBlower.Exception.API.ConfigErrorThis exception is thrown in case of an incomplete configuration. For example if the remote IP or remote port is not set.
Example
1 $httpMultiClient Start

Definition at line 14257 of file api.tcl.

Layer5.Http.MultiClient::Status.Get

Returns the status of the flow.

Returns
configuration
initial state in which the configuration takes place
scheduled
during the initial time to wait
running
when the flow is running
finished
flow finished succesfully
stopped
flow was stopped by user
Example
1 $httpMultiClient Status.Get

Returns:

configuration 

Definition at line 14269 of file api.tcl.

Layer5.Http.MultiClient::Stop

Stops the flow.

Explicitly stops a flow. Normally the flow finishes automatically when the configured duration or size has been reached. This method stops the flow immediately.

Example
1 $httpMultiClient Stop

Definition at line 14281 of file api.tcl.

Layer5.Http.MultiClient::Tcp.CongestionAvoidance.Algorithm.Get

Returns the preferred TCP Congestion Avoidance Algorithm.

Returns
current Congestion Avoidance Algorithm. Possible values are:
  • none
  • sack
  • newreno
  • sack-with-cubic
  • newreno-with-cubic
Example
1 $httpMultiClient Tcp.CongestionAvoidance.Algorithm.Get

Returns:

sack 

Definition at line 14293 of file api.tcl.

Layer5.Http.MultiClient::Tcp.CongestionAvoidance.Algorithm.Set   congestionAvoidanceAlgorithm  

Configure the preferred TCP Congestion Avoidance Algorithm.

Parameters
congestionAvoidanceAlgorithmCongestion Avoidance Algorithm to configure.
  • none
  • sack
  • newreno
  • sack-with-cubic
  • newreno-with-cubic
Exceptions
<tcl_error>Failed to parse enumerator: When the value could not be interpreted as a valid TCAA
Example

Configure NewReno as congestionAvoidance Algorithm

1 $httpMultiClient Tcp.CongestionAvoidance.Algorithm.Set newreno

Configure Sack as congestionAvoidance Algorithm

1 $httpMultiClient Tcp.CongestionAvoidance.Algorithm.Set sack

Configure None as congestionAvoidance Algorithm

1 $httpMultiClient Tcp.CongestionAvoidance.Algorithm.Set none

Definition at line 14307 of file api.tcl.

Layer5.Http.MultiClient::TypeOfService.Set

Sets the 'Type Of Service' or 'Traffic Class' used at the IP layer.

Both IP headers reserve space to specify the expected quality of service(QOS). IPv4 calls this field the 'Type Of Service'. In IPv6 one uses the term 'Traffic Class'. Despite naming, they are both 8 bits wide. For ease of use, the method is generic, it is used for both IPv4 and IPv6 layers. The implementaion will configure the proper header.

The input accepts integers from 0 up to 255. This value will be directly used in byte-sized field at the IP layer. No additional coding is performed.

This method can be called solely during the configuration phase,thus before the parent ByteBlower port is started. Invoking the method at other moments will result in error.

Example
1 $httpMultiClient TypeOfService.Set 16

Definition at line 14341 of file api.tcl.