海外サーバーを高速に利用しよう(その2)

Cacheサーバーの位置を近くに持ってきた場合の変化

[東京] ---- [大阪:nginx Reverse Proxy] ---- [シカゴ]
      10ms                            171ms
# ab -c 50 -n 50 http://4cats.xaffy.net/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 4cats.xaffy.net (be patient).....done


Server Software:        nginx
Server Hostname:        4cats.xaffy.net
Server Port:            80

Document Path:          /
Document Length:        18464 bytes

Concurrency Level:      50
Time taken for tests:   0.354 seconds
Complete requests:      50
Failed requests:        0
Write errors:           0
Total transferred:      953826 bytes
HTML transferred:       940311 bytes
Requests per second:    141.06 [#/sec] (mean)
Time per request:       354.471 [ms] (mean)
Time per request:       7.089 [ms] (mean, across all concurrent requests)
Transfer rate:          2627.78 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       11   11   0.3     11      12
Processing:    23  287  55.9    300     320
Waiting:       11   19   3.3     18      24
Total:         34  298  56.0    312     331

Percentage of the requests served within a certain time (ms)
  50%    312
  66%    312
  75%    315
  80%    316
  90%    330
  95%    330
  98%    331
  99%    331
 100%    331 (longest request)
# ab -c 1 -n 50 http://4cats.xaffy.net/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 4cats.xaffy.net (be patient).....done


Server Software:        nginx
Server Hostname:        4cats.xaffy.net
Server Port:            80

Document Path:          /
Document Length:        18464 bytes

Concurrency Level:      1
Time taken for tests:   1.669 seconds
Complete requests:      50
Failed requests:        0
Write errors:           0
Total transferred:      936450 bytes
HTML transferred:       923200 bytes
Requests per second:    29.96 [#/sec] (mean)
Time per request:       33.376 [ms] (mean)
Time per request:       33.376 [ms] (mean, across all concurrent requests)
Transfer rate:          548.00 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       10   11   0.1     11      11
Processing:    22   23   0.2     23      24
Waiting:       11   11   0.2     11      12
Total:         33   33   0.2     33      34

Percentage of the requests served within a certain time (ms)
  50%     33
  66%     33
  75%     33
  80%     34
  90%     34
  95%     34
  98%     34
  99%     34
 100%     34 (longest request)

当然のことながら、Cacheまでの地理的影響が少なくなっており、Cacheを海外に置いた場合と異なり、国内でも比較的速い方のWeb応答となる。
どちらが良いかは、アクセス数が多ければ、国内にCacheを置けば、海外サーバーでも、充分なレスポンスが得られる結果となった。このようにCache経由であれば、海外サーバーもそう気にすること無く利用することが可能になってくる。

Comments are closed.