Spot Scenarios

Spot scenarios are executed between the local machine (where shaker runs) and the remote. Local machine must have all necessary tools installed, e.g. the following scenarios require iperf3 and flent utilities.

TCP

This scenario tests TCP bandwidth to the destination host. By default it sends traffic to one of public iperf3 servers. This can be overridden via parameter --matrix "{host:<host>}". The scenario requires iperf3 to be installed locally.

How To Run

  1. Run the scenario with defaults and generate interactive report into file report.html:
shaker-spot --scenario spot/tcp --report report.html
  1. Run the scenario with overridden target host (10.0.0.2) and store raw result:
shaker-spot --scenario spot/tcp --matrix "{host:10.0.0.2}" --output report.json
  1. Run the scenario with overridden target host (10.0.0.2) and store SLA verification results in subunit stream file:
shaker-spot --scenario spot/tcp --matrix "{host:10.0.0.2}" --subunit report.subunit
  1. Run the scenario against the list of target hosts and store report:
shaker-spot --scenario spot/tcp --matrix "{host:[10.0.0.2, 10.0.0.3]}" --output report.html

Scenario

title: TCP bandwidth

description: >
  This scenario uses iperf3 to measure TCP throughput between local host and
  ping.online.net (or against hosts provided via CLI). SLA check is verified
  and expects the speed to be at least 90Mbit and at most 20 retransmitts.
  The destination host can be overridden by command-line parameter,
  e.g. ``--matrix "{host: 172.10.1.2}"``.

execution:
  tests:
  -
    title: TCP
    class: iperf3
    host: ping.online.net
    time: 20
    sla:
    - "[type == 'agent'] >> (stats.bandwidth.avg > 90)"
    - "[type == 'agent'] >> (stats.retransmits.max < 20)"

UDP

This scenario tests UDP packets per second to the destination host. By default it sends traffic to one of public iperf3 servers. This can be overridden via parameter --matrix "{host:<host>}". The scenario requires iperf3 to be installed locally.

How To Run

shaker-spot --scenario spot/udp --report report.html

Scenario

title: UDP bandwidth

description: >
  This scenario uses iperf3 to measure UDP throughput between local host and
  ping.online.net (or against hosts provided via CLI). SLA check is verified
  and requires at least 10 000 packets per second.
  The destination host can be overridden by command-line parameter,
  e.g. ``--matrix "{host: 172.10.1.2}"``.

execution:
  tests:
  -
    title: UDP
    class: iperf3
    host: ping.online.net
    udp: on
    time: 20
    bandwidth: 1000M
    sla:
    - "[type == 'agent'] >> (stats.packets.avg > 10000)"

Ping

This scenario tests ICMP ping between the local machine and the remote. By default pings are sent to public 8.8.8.8 address. The remote address can be overridden via parameter --matrix "{host: <host>}". The scenario requires flent to be installed locally.

How To Run

shaker-spot --scenario spot/ping --report report.html

Scenario

title: Ping

description: >
  This scenario uses ping to measure the latency between the local host and
  the remote. The remote host can be provided via command-line, it defaults
  to 8.8.8.8. The scenario verifies SLA and expects the latency to be at most
  30ms.
  The destination host can be overridden by command-line parameter,
  e.g. ``--matrix "{host: 172.10.1.2}"``.

execution:
  tests:
  -
    title: Ping
    class: flent
    host: 8.8.8.8
    method: ping
    time: 10
    sla:
    - "[type == 'agent'] >> (stats.ping_icmp.avg < 30)"