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"
}
the test would be to curl your external IP
(ifconfig -a to get it)