This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
forked from amnigos/CloudWatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
390 lines (314 loc) · 13.7 KB
/
index.html
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CloudWatch - Easy way to measure AWS services latency from your browser!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="CloudWatch is a service that can be used to measure the latency of AWS services like EC2, SimpleDB, S3 etc">
<meta name="author" content="Vijay Rayapati, http://amnigos.com">
<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<!-- Le styles -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
.rowtopspacing {
margin-top: 20px;
}
</style>
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33429218-1']);
_gaq.push(['_setDomainName', 'cloudwatch.in']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">CloudWatch</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="http://www.minjar.com/" target="_blank">About</a></li>
<li><a href="mailto:[email protected]">Contact</a></li>
<li><a href="#faq">FAQ</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="row offset9">
<p>
It's <a href="http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html" target="_blank">hosted on S3</a> and add your awesomeness <a href="https://github.com/amnigos/CloudWatch" target="_blank">on GitHub</a>.
</p>
</div>
<div class="container">
<div class="hero-unit">
<div class="row">
<h3 class="span8">Measure Amazon EC2, SimpleDB, SQS and SNS Services Latency From Your Browser!</h3>
</div>
<div class="row">
<p class="span12"/>
<p class="span8"> <a href="http://aws.amazon.com/" target="_blank">Amazon Cloud </a> is available in multiple regions and this tool will help you measure the latency from your browser to different regions. Click on the check latency button below to get started.</p>
</div>
<p class="span12 rowtopspacing"/>
<div class="row">
<table class="table table-bordered span4">
<thead>
<tr>
<th class="label label-info">AWS Region</th>
<th class="label label-info">Service Name</th>
<th class="label label-info">HTTP Ping</th>
</tr>
</thead>
<tbody>
<tr>
<td>N. Virginia</td>
<td id="vaservicename"></td>
<td class="awsregion" id="va"><label/></td>
</tr>
<tr style="background-color:red">
<td>Ohio</td>
<td id="ohservicename"></td>
<td class="awsregion" id="oh"><label/></td>
</tr>
<tr>
<td>Oregon</td>
<td id="ogservicename"><label/></td>
<td class="awsregion" id="og"><label/></td>
</tr>
<tr>
<td>N. California</td>
<td id="caservicename"><label/></td>
<td class="awsregion" id="ca"><label/></td>
</tr>
<tr>
<td>Frankfurt</td>
<td id="frservicename"><label/></td>
<td class="awsregion" id="fr"><label/></td>
</tr>
<tr>
<td>Ireland</td>
<td id="irservicename"><label/></td>
<td class="awsregion" id="ir"><label/></td>
</tr>
<tr>
<td>Singapore</td>
<td id="sgpservicename"><label/></td>
<td class="awsregion" id="sgp"><label/></td>
</tr>
<tr>
<td>Tokyo</td>
<td id="tkservicename"><label/></td>
<td class="awsregion" id="tk"><label/></td>
</tr>
<tr>
<td>São Paulo</td>
<td id="spservicename"><label/></td>
<td class="awsregion" id="sp"><label/></td>
</tr>
<tr>
<td>Australia</td>
<td id="ausservicename"><label/></td>
<td class="awsregion" id="aus"><label/></td>
</tr>
</tbody>
</table>
</div>
<div class="row">
<div class="span2 offset1">
<p id='awsapirequest'></p>
<div class="btn-group">
<button class="btn btn-large btn-success" id="btnCheckLatency" data-toggle="dropdown">Check Latency</button>
<button class="btn btn-large btn-success dropdown-toggle" id="dropdown" data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a id="btnEC2">EC2</a></li>
<li class="divider"></li>
<li><a id="btnSDB">SimpleDB</a></li>
<li class="divider"></li>
<li><a id="btnSQS">SQS</a></li>
<li class="divider"></li>
<li><a id="btnSNS">SNS</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="hero-unit" id="faq">
<div class="row">
<h2 class="span12">FAQ</h2>
</div>
<p class="span12"/>
<div class="row">
<h3 class="span12">How reliable is this latency measurement?</h3>
</div>
<div class="row">
<p class="span12"/>
<p class="span10">I would say from absolute latency perspective, it's not very reliable. However you should be looking at the relative value of the observed latencies for each AWS region to identify which are best AWS regions for your location.</p>
</div>
<p class="span12"/>
<div class="row">
<h3 class="span12">How are you measuring the HTTP Ping Request Latency?</h3>
</div>
<div class="row">
<p class="span12"/>
<p class="span10"> We are making a HTTP GET request to AWS Service Endpoints (like EC2, SQS, SNS etc) for PING and measuring the observed latency for it across all regions.</p>
</div>
<div class="row">
<h3 class="span12">What is NA in latency result?</h3>
</div>
<div class="row">
<p class="span12"/>
<p class="span10">It means Not Applicable and when a specific service like SimpleDB is not available in any AWS region, we will display NA instead of latency.</p>
</div>
</div>
<hr>
<footer>
<p class="span8">© Minjar 2012. Built using <a href="http://twitter.github.com/bootstrap/" target="_target">Bootstrap</a> by <a href="http://amnigos.com" target="_target">Vijay Rayapati</a></p>
</footer>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript">
//Initialize all AWS Service API ends for different regions which will be used to measure the latency
var AWS = {
ec2 : {
va: "ec2.us-east-1.amazonaws.com",
oh: "ec2.us-east-2.amazonaws.com",
ca: "ec2.us-west-1.amazonaws.com",
sgp: "ec2.ap-southeast-1.amazonaws.com",
og: "ec2.us-west-2.amazonaws.com",
sp: "ec2.sa-east-1.amazonaws.com",
fr: "ec2.eu-central-1.amazonaws.com",
ir: "ec2.eu-west-1.amazonaws.com",
tk: "ec2.ap-northeast-1.amazonaws.com",
aus: "ec2.ap-southeast-2.amazonaws.com"
},
sqs : {
va: "sqs.us-east-1.amazonaws.com",
oh: "sqs.us-east-2.amazonaws.com",
ca: "sqs.us-west-1.amazonaws.com",
sgp: "sqs.ap-southeast-1.amazonaws.com",
og: "sqs.us-west-2.amazonaws.com",
sp: "sqs.sa-east-1.amazonaws.com",
fr: "sqs.eu-central-1.amazonaws.com",
ir: "sqs.eu-west-1.amazonaws.com",
tk: "sqs.ap-northeast-1.amazonaws.com",
aus: "sqs.ap-southeast-2.amazonaws.com"
},
sdb : {
va: "sdb.amazonaws.com",
oh: "NA",
ca: "sdb.us-west-1.amazonaws.com",
sgp: "sdb.ap-southeast-1.amazonaws.com",
og: "sdb.us-west-2.amazonaws.com",
sp: "sdb.sa-east-1.amazonaws.com",
fr: "NA",
ir: "sdb.eu-west-1.amazonaws.com",
tk: "sdb.ap-northeast-1.amazonaws.com",
aus: "sdb.ap-southeast-2.amazonaws.com"
},
sns : {
va: "sns.us-east-1.amazonaws.com",
oh: "sns.us-east-2.amazonaws.com",
ca: "sns.us-west-1.amazonaws.com",
sgp: "sns.ap-southeast-1.amazonaws.com",
og: "sns.us-west-2.amazonaws.com",
sp: "sns.sa-east-1.amazonaws.com",
fr: "sns.eu-central-1.amazonaws.com",
ir: "sns.eu-west-1.amazonaws.com",
tk: "sns.ap-northeast-1.amazonaws.com",
aus: "sns.ap-southeast-2.amazonaws.com"
},
generateAPIRequest : function(regions, serviceEndPoints, serviceName) {
var region = regions.pop();
if (region) {
var regionName = region.id;
var endpoint = serviceEndPoints[regionName];
$('#'+regionName).html('connecting..');
$('#'+regionName+'servicename').html(serviceName);
// The endpoint will be NA if a specific service like SimpleDB is not available in AWS region
if(endpoint !="NA") {
this.executeAPIRequest(endpoint, function(){
// Using to "AWS" context instead of "this" as anonymous function will loose "this" context related to AWS during invokation
AWS.displayHTTPLatency(regionName, regions, serviceEndPoints, serviceName);
});
} else {
//Just display NA instead of latency in milliseconds if specific service is not available in AWS region.
$('#'+regionName).html("NA");
this.generateAPIRequest(regions, serviceEndPoints, serviceName);
}
}
},
executeAPIRequest : function(endpoint, onComplete) {
var apirequest = $("#awsapirequest");
// Cache burst issues? - EC2 doesn't allow adding any parameters to /ping call
var endPointURL = "http://"+endpoint + "/ping";
apirequest.empty();
apirequest.html("<img id='apiresponse' style='display: none'>");
var pingData = $("#apiresponse");
pingData.error(onComplete); // Since we are loading http text data into image src, it will execute onError handler.
window.startTime = this.getTimeStamp(); // global variable startTime is initialized
pingData.attr("src", endPointURL);
},
displayHTTPLatency : function ( regionName, regions, serviceEndPoints, serviceName) {
var endTime = this.getTimeStamp();
var latencyTime = endTime-window.startTime;
$('#'+regionName).html(latencyTime.toString()+"ms");
this.generateAPIRequest(regions, serviceEndPoints, serviceName);
},
getTimeStamp : function (){
return (new Date()).getTime();
}
}
$(document).ready(function(){
var objAWS = AWS;
$("#btnEC2").click( function () {
// get all regions data from the table elements
var regions = $(".awsregion").toArray();
// generate required ping requests to EC2 regions
objAWS.generateAPIRequest(regions, objAWS.ec2, "EC2");
});
$("#btnSQS").click( function () {
// get all regions data from the table elements
var regions = $(".awsregion").toArray();
// generate required ping requests to SQS regions
objAWS.generateAPIRequest(regions, objAWS.sqs, "SQS");
});
$("#btnSNS").click( function () {
// get all regions data from the table elements
var regions = $(".awsregion").toArray();
// generate required ping requests to SNS regions
objAWS.generateAPIRequest(regions, objAWS.sns, "SNS");
});
$("#btnSDB").click( function () {
// get all regions data from the table elements
var regions = $(".awsregion").toArray();
// generate required ping requests to SimpleDB regions
objAWS.generateAPIRequest(regions, objAWS.sdb, "SimpleDB");
});
});
</script>
</body>
</html>