Skip to content

Instantly share code, notes, and snippets.

@danehans
Last active February 6, 2018 23:29
Show Gist options
  • Save danehans/334fca847547bf9827bd5e87f1c768c2 to your computer and use it in GitHub Desktop.
Save danehans/334fca847547bf9827bd5e87f1c768c2 to your computer and use it in GitHub Desktop.
fortio_listen_addr_testing

Run the fortio container, specifying a host:port pair for -http-port:

$ sudo docker run -d --net host danehans/fortio:listen_addr server -http-port 10.138.0.2:8080
d490e515f3bd34b52b1a67b8870f6d99637573a6b30eee9fc10c32a61c9b2d3a

$ sudo docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS               NAMES
d490e515f3bd        danehans/fortio:listen_addr   "/usr/local/bin/fort…"   8 seconds ago       Up 6 seconds                            musing_almeida

Check the container logs for the proper fortio log messages. Verify the fortio handler uses the proper host:port and echo server is listening on host:port:

$ sudo docker logs d490e515f3bd
18:28:51 I uihandler.go:91> Using resources directory set at link time: /usr/local/lib/fortio
Fortio 0.6.8 grpc ping server listening on port 8079
UI starting - visit:
http://10.138.0.2:8080/fortio/
Fortio 0.6.8 echo server listening on port 10.138.0.2:8080
Https redirector running on :8081

curl the fortio handler. Ensure the default url contains the proper host:port:

$ curl http://10.138.0.2:8080/fortio/
<!DOCTYPE html><html><head><title>Φορτίο v0.6.8</title>
<script src="0.6.8/static/js/Chart.min.js"></script>
<script src="0.6.8/static/js/fortio_chart.js"></script>
<link rel="icon" href="../favicon.ico" />
</head>
<body style="background: linear-gradient(to right, #d8aa20 , #c75228);">
<a href="http://fortio.org/"><img src="0.6.8/static/img/logo.svg" alt="." height="69" width="45" align="right" /></a>
<img src="0.6.8/static/img/logo.svg" alt="." height="92" width="60" align="right" />
<img src="0.6.8/static/img/logo.svg" alt="istio logo" height="123" width="80" align="right" />
<h1>Φορτίο (fortio) v0.6.8 control UI</h1>
<p>Up for 24.8s (since Tue Feb  6 18:28:51 2018).


<form>
<div>
Title/Labels: <input type="text" name="labels" size="40" value="Fortio" /> (empty to skip title)<br />
URL: <input type="text" name="url" size="80" value="http://10.138.0.2:8080/echo?delay=250us:30%,5ms:5%&status=503:0.5%,429:1.5%" /> <br />
QPS: <input type="text" name="qps" size="6" value="1000" />
Duration: <input id="duration" type="text" name="t" size="6" value="3s" />
or run until interrupted: <input type="checkbox" name="t" onchange="toggleDuration(this)" />
or run for exactly <input type="text" name="n" size="6" value="" /> calls. <br />
Threads/Simultaneous connections: <input type="text" name="c" size="6" value="8" /> <br />
Percentiles: <input type="text" name="p" size="20" value="50, 75, 99, 99.9" /> <br />
Histogram Resolution: <input type="text" name="r" size="8" value="0.0001" /> <br />
Headers: <br />

<input type="text" name="H" size=40 value="User-Agent: istio/fortio-0.6.8" /> <br />
 
<input type="text" name="H" size=40 value="" /> <br />
<input type="text" name="H" size=40 value="" /> <br />
JSON output: <input type="checkbox" name="json" />,
Save output: <input type="checkbox" name="save" checked /> <br />
<input type="submit" name="load" value="Start"/>
</div>
</form>
<p><i>Or</i></p>
<div>
Browse <a href='browse'>saved results</a> (or <a href="data/">raw JSON</a>)
</div>
<p><i>Or</i></p>
<form action="javascript:document.location += 'fetch/' + document.getElementById('uri').value">
<div>
Debug fetch http://<input type="text" id="uri" name="uri" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<a href="../debug">debug</a> and <a href="../debug?env=dump">debug with env dump</a>
<p><i>Or</i></p>
<form action="sync">
<div>
Sync/download tsv or xml s3 bucket data from:<br />
<input type="text" name="url" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<form method="POST">
<div>
Interrupt runs from this server: <input type="submit" name="stop" value="Stop" />
</div>
</form>

</body>
</html>

Run a load test against fortio's echo server:

$ curl "http://10.138.0.2:8080/fortio/?json=on&qps=-1&t=3s&c=48&load=Start&url=http://10.138.0.2:8080/echo"
{
  "Labels": "",
  "StartTime": "2018-02-06T18:32:34.699327856Z",
  "RequestedQPS": "max",
  "RequestedDuration": "3s",
  "ActualQPS": 40288.693052893526,
  "ActualDuration": 3003398493,
  "NumThreads": 48,
  "Version": "0.6.8",
  "DurationHistogram": {
    "Count": 121003,
    "Min": 0.000057327,
    "Max": 0.009201452,
    "Sum": 144.03811846999997,
    "Avg": 0.0011903681600456185,
    "StdDev": 0.00037683194326980493,
    "Data": [
      {
        "Start": 0.000057327,
        "End": 0.001,
        "Percent": 30.81907060155533,
        "Count": 37292
      },
      {
        "Start": 0.001,
        "End": 0.002,
        "Percent": 97.11329471170136,
        "Count": 80218
      },
      {
        "Start": 0.002,
        "End": 0.003,
        "Percent": 99.55207722122591,
        "Count": 2951
      },
      {
        "Start": 0.003,
        "End": 0.004,
        "Percent": 99.90991958877052,
        "Count": 433
      },
      {
        "Start": 0.004,
        "End": 0.005,
        "Percent": 99.93801806566779,
        "Count": 34
      },
      {
        "Start": 0.005,
        "End": 0.006,
        "Percent": 99.98264505838698,
        "Count": 54
      },
      {
        "Start": 0.006,
        "End": 0.007,
        "Percent": 99.99008289050684,
        "Count": 9
      },
      {
        "Start": 0.007,
        "End": 0.008,
        "Percent": 99.99090931629794,
        "Count": 1
      },
      {
        "Start": 0.008,
        "End": 0.009000000000000001,
        "Percent": 99.99421501946233,
        "Count": 4
      },
      {
        "Start": 0.009000000000000001,
        "End": 0.009201452,
        "Percent": 100,
        "Count": 7
      }
    ],
    "Percentiles": null
  },
  "Exactly": 0,
  "RetCodes": {
    "200": 121003
  },
  "Sizes": {
    "Count": 121003,
    "Min": 116,
    "Max": 116,
    "Sum": 14036348,
    "Avg": 116,
    "StdDev": 0,
    "Data": [
      {
        "Start": 116,
        "End": 116,
        "Percent": 100,
        "Count": 121003
      }
    ],
    "Percentiles": null
  },
  "HeaderSizes": {
    "Count": 121003,
    "Min": 116,
    "Max": 116,
    "Sum": 14036348,
    "Avg": 116,
    "StdDev": 0,
    "Data": [
      {
        "Start": 116,
        "End": 116,
        "Percent": 100,
        "Count": 121003
      }
    ],
    "Percentiles": null
  },
  "URL": "http://10.138.0.2:8080/echo"
}

Success testing multiple port options from local VM:

daneyonhansen@fortio-vm:~$ sudo docker run -d --net host danehans/fortio:listen_addr server -http-port 8080
Unable to find image 'danehans/fortio:listen_addr' locally
listen_addr: Pulling from danehans/fortio
954044b98fa1: Pull complete 
f3c07ef90693: Pull complete 
8233a11c49ed: Pull complete 
18158988ceeb: Pull complete 
Digest: sha256:d1d8ce215fd604d3981d5c3aa7c5a23b4e24e1a9b7b41d9d736c96237d9ac529
Status: Downloaded newer image for danehans/fortio:listen_addr
0d29e37c0b357d9b82131ed8e92ee3ff8cef8abaad1f33cb202338844053b373
daneyonhansen@fortio-vm:~$ sudo docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS               NAMES
0d29e37c0b35        danehans/fortio:listen_addr   "/usr/local/bin/fort…"   2 seconds ago       Up 2 seconds                            practical_elion
daneyonhansen@fortio-vm:~$ sudo docker logs 0d29e37c0b35
23:15:13 I uihandler.go:91> Using resources directory set at link time: /usr/local/lib/fortio
Fortio 0.6.8 grpc ping server listening on port 8079
UI starting - visit:
http://localhost:8080/fortio/
Fortio 0.6.8 echo server listening on port :8080
Https redirector running on :8081
daneyonhansen@fortio-vm:~$ curl http://localhost:8080/fortio/
<!DOCTYPE html><html><head><title>Φορτίο v0.6.8</title>
<script src="0.6.8/static/js/Chart.min.js"></script>
<script src="0.6.8/static/js/fortio_chart.js"></script>
<link rel="icon" href="../favicon.ico" />
</head>
<body style="background: linear-gradient(to right, #d8aa20 , #c75228);">
<a href="http://fortio.org/"><img src="0.6.8/static/img/logo.svg" alt="." height="69" width="45" align="right" /></a>
<img src="0.6.8/static/img/logo.svg" alt="." height="92" width="60" align="right" />
<img src="0.6.8/static/img/logo.svg" alt="istio logo" height="123" width="80" align="right" />
<h1>Φορτίο (fortio) v0.6.8 control UI</h1>
<p>Up for 19.4s (since Tue Feb  6 23:15:13 2018).


<form>
<div>
Title/Labels: <input type="text" name="labels" size="40" value="Fortio" /> (empty to skip title)<br />
URL: <input type="text" name="url" size="80" value="http://localhost:8080/echo?delay=250us:30%,5ms:5%&status=503:0.5%,429:1.5%" /> <br />
QPS: <input type="text" name="qps" size="6" value="1000" />
Duration: <input id="duration" type="text" name="t" size="6" value="3s" />
or run until interrupted: <input type="checkbox" name="t" onchange="toggleDuration(this)" />
or run for exactly <input type="text" name="n" size="6" value="" /> calls. <br />
Threads/Simultaneous connections: <input type="text" name="c" size="6" value="8" /> <br />
Percentiles: <input type="text" name="p" size="20" value="50, 75, 99, 99.9" /> <br />
Histogram Resolution: <input type="text" name="r" size="8" value="0.0001" /> <br />
Headers: <br />

<input type="text" name="H" size=40 value="User-Agent: istio/fortio-0.6.8" /> <br />
 
<input type="text" name="H" size=40 value="" /> <br />
<input type="text" name="H" size=40 value="" /> <br />
JSON output: <input type="checkbox" name="json" />,
Save output: <input type="checkbox" name="save" checked /> <br />
<input type="submit" name="load" value="Start"/>
</div>
</form>
<p><i>Or</i></p>
<div>
Browse <a href='browse'>saved results</a> (or <a href="data/">raw JSON</a>)
</div>
<p><i>Or</i></p>
<form action="javascript:document.location += 'fetch/' + document.getElementById('uri').value">
<div>
Debug fetch http://<input type="text" id="uri" name="uri" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<a href="../debug">debug</a> and <a href="../debug?env=dump">debug with env dump</a>
<p><i>Or</i></p>
<form action="sync">
<div>
Sync/download tsv or xml s3 bucket data from:<br />
<input type="text" name="url" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<form method="POST">
<div>
Interrupt runs from this server: <input type="submit" name="stop" value="Stop" />
</div>
</form>

</body>
</html>

daneyonhansen@fortio-vm:~$ sudo docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS               NAMES
0d29e37c0b35        danehans/fortio:listen_addr   "/usr/local/bin/fort…"   23 seconds ago      Up 23 seconds                           practical_elion
daneyonhansen@fortio-vm:~$ sudo docker rm -f 0d29e37c0b35
0d29e37c0b35
daneyonhansen@fortio-vm:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
daneyonhansen@fortio-vm:~$ 
daneyonhansen@fortio-vm:~$ sudo docker run -d --net host danehans/fortio:listen_addr server -http-port 0.0.0.0:8080
a12fbab4261ae995b486df1592e83ead8dbdb0693468d01fe86c51277b6539d7
daneyonhansen@fortio-vm:~$ 
daneyonhansen@fortio-vm:~$ sudo docker logs 0d29e37c0b35
Error response from daemon: No such container: 0d29e37c0b35
daneyonhansen@fortio-vm:~$ sudo docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS               NAMES
a12fbab4261a        danehans/fortio:listen_addr   "/usr/local/bin/fort…"   4 seconds ago       Up 4 seconds                            vigilant_liskov
daneyonhansen@fortio-vm:~$ d^C
daneyonhansen@fortio-vm:~$ sudo docker logs a12fbab4261a
Fortio 0.6.8 grpc ping server listening on port 8079
UI starting - visit:
http://0.0.0.0:8080/fortio/
23:15:57 I uihandler.go:91> Using resources directory set at link time: /usr/local/lib/fortio
Fortio 0.6.8 echo server listening on port 0.0.0.0:8080
Https redirector running on :8081
daneyonhansen@fortio-vm:~$ 
daneyonhansen@fortio-vm:~$ 
daneyonhansen@fortio-vm:~$ 
(reverse-i-search)`curl': ^Crl http://localhost:8080/fortio/
daneyonhansen@fortio-vm:~$ curl http://0.0.0.0:8080/fortio/
<!DOCTYPE html><html><head><title>Φορτίο v0.6.8</title>
<script src="0.6.8/static/js/Chart.min.js"></script>
<script src="0.6.8/static/js/fortio_chart.js"></script>
<link rel="icon" href="../favicon.ico" />
</head>
<body style="background: linear-gradient(to right, #d8aa20 , #c75228);">
<a href="http://fortio.org/"><img src="0.6.8/static/img/logo.svg" alt="." height="69" width="45" align="right" /></a>
<img src="0.6.8/static/img/logo.svg" alt="." height="92" width="60" align="right" />
<img src="0.6.8/static/img/logo.svg" alt="istio logo" height="123" width="80" align="right" />
<h1>Φορτίο (fortio) v0.6.8 control UI</h1>
<p>Up for 24.6s (since Tue Feb  6 23:15:57 2018).


<form>
<div>
Title/Labels: <input type="text" name="labels" size="40" value="Fortio" /> (empty to skip title)<br />
URL: <input type="text" name="url" size="80" value="http://0.0.0.0:8080/echo?delay=250us:30%,5ms:5%&status=503:0.5%,429:1.5%" /> <br />
QPS: <input type="text" name="qps" size="6" value="1000" />
Duration: <input id="duration" type="text" name="t" size="6" value="3s" />
or run until interrupted: <input type="checkbox" name="t" onchange="toggleDuration(this)" />
or run for exactly <input type="text" name="n" size="6" value="" /> calls. <br />
Threads/Simultaneous connections: <input type="text" name="c" size="6" value="8" /> <br />
Percentiles: <input type="text" name="p" size="20" value="50, 75, 99, 99.9" /> <br />
Histogram Resolution: <input type="text" name="r" size="8" value="0.0001" /> <br />
Headers: <br />

<input type="text" name="H" size=40 value="User-Agent: istio/fortio-0.6.8" /> <br />
 
<input type="text" name="H" size=40 value="" /> <br />
<input type="text" name="H" size=40 value="" /> <br />
JSON output: <input type="checkbox" name="json" />,
Save output: <input type="checkbox" name="save" checked /> <br />
<input type="submit" name="load" value="Start"/>
</div>
</form>
<p><i>Or</i></p>
<div>
Browse <a href='browse'>saved results</a> (or <a href="data/">raw JSON</a>)
</div>
<p><i>Or</i></p>
<form action="javascript:document.location += 'fetch/' + document.getElementById('uri').value">
<div>
Debug fetch http://<input type="text" id="uri" name="uri" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<a href="../debug">debug</a> and <a href="../debug?env=dump">debug with env dump</a>
<p><i>Or</i></p>
<form action="sync">
<div>
Sync/download tsv or xml s3 bucket data from:<br />
<input type="text" name="url" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<form method="POST">
<div>
Interrupt runs from this server: <input type="submit" name="stop" value="Stop" />
</div>
</form>

</body>
</html>

daneyonhansen@fortio-vm:~$ sudo docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS               NAMES
a12fbab4261a        danehans/fortio:listen_addr   "/usr/local/bin/fort…"   52 seconds ago      Up 52 seconds                           vigilant_liskov
daneyonhansen@fortio-vm:~$ sudo docker rm -f a12fbab4261a
a12fbab4261a
daneyonhansen@fortio-vm:~$ sudo docker run -d --net host danehans/fortio:listen_addr server -http-port 0.0.0.0:8080 ^C
daneyonhansen@fortio-vm:~$ ip addr list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc mq state UP group default qlen 1000
    link/ether 42:01:0a:8a:00:02 brd ff:ff:ff:ff:ff:ff
    inet 10.138.0.2/32 brd 10.138.0.2 scope global ens4
       valid_lft forever preferred_lft forever
    inet6 fe80::4001:aff:fe8a:2/64 scope link 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:64:8d:a1:28 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:64ff:fe8d:a128/64 scope link 
       valid_lft forever preferred_lft forever
daneyonhansen@fortio-vm:~$ sudo docker run -d --net host danehans/fortio:listen_addr server -http-port 10.138.0.2:8080
f352a9728d0138d9e996664107d0386da7275163247dd4dad649daa486504397 
daneyonhansen@fortio-vm:~$ sudo docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS               NAMES
f352a9728d01        danehans/fortio:listen_addr   "/usr/local/bin/fort…"   2 seconds ago       Up 1 second                             optimistic_neumann
daneyonhansen@fortio-vm:~$ sudo docker logs f352a9728d01
Https redirector running on :8081
Fortio 0.6.8 grpc ping server listening on port 8079
UI starting - visit:
http://10.138.0.2:8080/fortio/
Fortio 0.6.8 echo server listening on port 10.138.0.2:8080
23:17:26 I uihandler.go:91> Using resources directory set at link time: /usr/local/lib/fortio
daneyonhansen@fortio-vm:~$ curl http://10.138.0.2:8080/fortio/
<!DOCTYPE html><html><head><title>Φορτίο v0.6.8</title>
<script src="0.6.8/static/js/Chart.min.js"></script>
<script src="0.6.8/static/js/fortio_chart.js"></script>
<link rel="icon" href="../favicon.ico" />
</head>
<body style="background: linear-gradient(to right, #d8aa20 , #c75228);">
<a href="http://fortio.org/"><img src="0.6.8/static/img/logo.svg" alt="." height="69" width="45" align="right" /></a>
<img src="0.6.8/static/img/logo.svg" alt="." height="92" width="60" align="right" />
<img src="0.6.8/static/img/logo.svg" alt="istio logo" height="123" width="80" align="right" />
<h1>Φορτίο (fortio) v0.6.8 control UI</h1>
<p>Up for 29.6s (since Tue Feb  6 23:17:26 2018).


<form>
<div>
Title/Labels: <input type="text" name="labels" size="40" value="Fortio" /> (empty to skip title)<br />
URL: <input type="text" name="url" size="80" value="http://10.138.0.2:8080/echo?delay=250us:30%,5ms:5%&status=503:0.5%,429:1.5%" /> <br />
QPS: <input type="text" name="qps" size="6" value="1000" />
Duration: <input id="duration" type="text" name="t" size="6" value="3s" />
or run until interrupted: <input type="checkbox" name="t" onchange="toggleDuration(this)" />
or run for exactly <input type="text" name="n" size="6" value="" /> calls. <br />
Threads/Simultaneous connections: <input type="text" name="c" size="6" value="8" /> <br />
Percentiles: <input type="text" name="p" size="20" value="50, 75, 99, 99.9" /> <br />
Histogram Resolution: <input type="text" name="r" size="8" value="0.0001" /> <br />
Headers: <br />

<input type="text" name="H" size=40 value="User-Agent: istio/fortio-0.6.8" /> <br />
 
<input type="text" name="H" size=40 value="" /> <br />
<input type="text" name="H" size=40 value="" /> <br />
JSON output: <input type="checkbox" name="json" />,
Save output: <input type="checkbox" name="save" checked /> <br />
<input type="submit" name="load" value="Start"/>
</div>
</form>
<p><i>Or</i></p>
<div>
Browse <a href='browse'>saved results</a> (or <a href="data/">raw JSON</a>)
</div>
<p><i>Or</i></p>
<form action="javascript:document.location += 'fetch/' + document.getElementById('uri').value">
<div>
Debug fetch http://<input type="text" id="uri" name="uri" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<a href="../debug">debug</a> and <a href="../debug?env=dump">debug with env dump</a>
<p><i>Or</i></p>
<form action="sync">
<div>
Sync/download tsv or xml s3 bucket data from:<br />
<input type="text" name="url" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<form method="POST">
<div>
Interrupt runs from this server: <input type="submit" name="stop" value="Stop" />
</div>
</form>

</body>
</html>

Successful test from remote:

DANEHANS-M-C1KP:fortio daneyonhansen$ gcloud compute instances list
NAME       ZONE        MACHINE_TYPE  PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP     STATUS
fortio-vm  us-west1-a  n1-highcpu-2               10.138.0.2   35.199.174.142  RUNNING
(reverse-i-search)`curl': curl http://35.199.174.142:8080/fortio/
DANEHANS-M-C1KP:fortio daneyonhansen$ curl "http://35.199.174.142:8080/fortio/?json=on&q=-1&t=3s&c=48&load=Start&url=http://35.199.174.142:8080/echo"
{
  "Labels": "",
  "StartTime": "2018-02-06T23:18:53.332555395Z",
  "RequestedQPS": "8",
  "RequestedDuration": "3s",
  "ActualQPS": 7.996756811317332,
  "ActualDuration": 3001216689,
  "NumThreads": 12,
  "Version": "0.6.8",
  "DurationHistogram": {
    "Count": 24,
    "Min": 0.000436963,
    "Max": 0.000939898,
    "Sum": 0.016393217,
    "Avg": 0.0006830507083333334,
    "StdDev": 0.0001518422947420771,
    "Data": [
      {
        "Start": 0.000436963,
        "End": 0.000939898,
        "Percent": 100,
        "Count": 24
      }
    ],
    "Percentiles": null
  },
  "Exactly": 0,
  "RetCodes": {
    "200": 24
  },
  "Sizes": {
    "Count": 24,
    "Min": 116,
    "Max": 116,
    "Sum": 2784,
    "Avg": 116,
    "StdDev": 0,
    "Data": [
      {
        "Start": 116,
        "End": 116,
        "Percent": 100,
        "Count": 24
      }
    ],
    "Percentiles": null
  },
  "HeaderSizes": {
    "Count": 24,
    "Min": 116,
    "Max": 116,
    "Sum": 2784,
    "Avg": 116,
    "StdDev": 0,
    "Data": [
      {
        "Start": 116,
        "End": 116,
        "Percent": 100,
        "Count": 24
      }
    ],
    "Percentiles": null
  },
  "URL": "http://35.199.174.142:8080/echo"
}

Run the fortio container:

$ sudo docker run -d --net host danehans/fortio:listen_addr server -http-port 8080
e5715e099703bc2d8c7f86d125a75cb7f613e1e9bee70a248105fb393d7209b9

$ sudo docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS               NAMES
e5715e099703        danehans/fortio:listen_addr   "/usr/local/bin/fort…"   1 second ago        Up 1 second                             jolly_visvesvaraya

Check the logs:

$ sudo docker logs e5715e099703
Https redirector running on :8081
Fortio 0.6.8 grpc ping server listening on port 8079
UI starting - visit:
http://0.0.0.0:8080/fortio/
02:21:36 I uihandler.go:91> Using resources directory set at link time: /usr/local/lib/fortio
Fortio 0.6.8 echo server listening on port :8080

Curl the all zeros address:

$ curl http://0.0.0.0:8080/fortio/
<!DOCTYPE html><html><head><title>Φορτίο v0.6.8</title>
<script src="0.6.8/static/js/Chart.min.js"></script>
<script src="0.6.8/static/js/fortio_chart.js"></script>
<link rel="icon" href="../favicon.ico" />
</head>
<body style="background: linear-gradient(to right, #d8aa20 , #c75228);">
<a href="http://fortio.org/"><img src="0.6.8/static/img/logo.svg" alt="." height="69" width="45" align="right" /></a>
<img src="0.6.8/static/img/logo.svg" alt="." height="92" width="60" align="right" />
<img src="0.6.8/static/img/logo.svg" alt="istio logo" height="123" width="80" align="right" />
<h1>Φορτίο (fortio) v0.6.8 control UI</h1>
<p>Up for 15.5s (since Tue Feb  6 02:21:36 2018).


<form>
<div>
Title/Labels: <input type="text" name="labels" size="40" value="Fortio" /> (empty to skip title)<br />
URL: <input type="text" name="url" size="80" value="http://0.0.0.0:8080/echo?delay=250us:30%,5ms:5%&status=503:0.5%,429:1.5%" /> <br />
QPS: <input type="text" name="qps" size="6" value="1000" />
Duration: <input id="duration" type="text" name="t" size="6" value="3s" />
or run until interrupted: <input type="checkbox" name="t" onchange="toggleDuration(this)" />
or run for exactly <input type="text" name="n" size="6" value="" /> calls. <br />
Threads/Simultaneous connections: <input type="text" name="c" size="6" value="8" /> <br />
Percentiles: <input type="text" name="p" size="20" value="50, 75, 99, 99.9" /> <br />
Histogram Resolution: <input type="text" name="r" size="8" value="0.0001" /> <br />
Headers: <br />

<input type="text" name="H" size=40 value="User-Agent: istio/fortio-0.6.8" /> <br />

<input type="text" name="H" size=40 value="" /> <br />
<input type="text" name="H" size=40 value="" /> <br />
JSON output: <input type="checkbox" name="json" />,
Save output: <input type="checkbox" name="save" checked /> <br />
<input type="submit" name="load" value="Start"/>
</div>
</form>
<p><i>Or</i></p>
<div>
Browse <a href='browse'>saved results</a> (or <a href="data/">raw JSON</a>)
</div>
<p><i>Or</i></p>
<form action="javascript:document.location += 'fetch/' + document.getElementById('uri').value">
<div>
Debug fetch http://<input type="text" id="uri" name="uri" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<a href="../debug">debug</a> and <a href="../debug?env=dump">debug with env dump</a>
<p><i>Or</i></p>
<form action="sync">
<div>
Sync/download tsv or xml s3 bucket data from:<br />
<input type="text" name="url" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<form method="POST">
<div>
Interrupt runs from this server: <input type="submit" name="stop" value="Stop" />
</div>
</form>

</body>
</html>
@ldemailly
Copy link

the test would be to curl your external IP
(ifconfig -a to get it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment