-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
65 lines (41 loc) · 1.86 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
RTT
This little project is useful if you want to measure TCP RTT between a web client and
two or more sites.
On the remote sites you need nginx (tested with version >=1.2.0) which has the ability
to extract RTT information if the underlying OS supports it (for instance Linux 2.6 has
this information in the TCP_INFO struct).
BASIC IDEA
The basic idea is configure the remote nginx like this:
location /rtt {
rewrite ^/rtt/(.*)$ http://central.site.com/rtt/singleMeasure.php?site=SITE_NAME&rtt=$tcpinfo_rtt;
}
When a client requests http://probe.site1.com/rtt/ it gets redirected back with SITE_NAME and RTT
information in the GET request.
If you have two remote sites you will configure them taking into account the location "/rtt" defined above,
for instance
'sites' => array (
'mi' => array(
'probeurl' => 'http://probe.site1.com/rtt/',
),
'rm' => array (
'probeurl' => 'http://probe.site2.com/rtt/'),
),
),
Measure can be collected on the central site by using an invisible iframe
<iframe src="http://central.site/rtt/doMeasure.php?" style="display:none"></iframe>
If you want there is also a fancier page: doMeasureJs.php - which as some special effects
and can also display the measure.
INSTALLATION
Choose where you want to install rtt, then do
cd /path
git clone git://github.com/enricocavalli/rtt.git
This will clone rtt to /path/rtt/
I suggest to put /path/rtt/ outside the document root of your web site, and use an alias to refer to it.
In apache this can be as simple as
Alias /rtt/ "/path/rtt/www/"
CREDITS
Thanks to the guys who developed simpleSAMLphp. Since I'm familiar with that project, I copied
the autoloader and some utilities from their project.
LICENSE
The code from simpleSAMLphp is licensed GNU Lesser GPL - see http://www.gnu.org/licenses/lgpl.html
Other code is licensed under the GPL - http://www.gnu.org/licenses/gpl-3.0.html