1,首先这种方式忽略了对客户本地网络的影响。
如果客户本地网络不行的话。这种方式并不能准确的反映cdn节点是否有问题。
2,如果客户本地网络比较好
然后让客户去ping下访问到的域名:
iuhanlindemac:~ yishiyaonie$ ping liuhanlin-work.qiniudn.com
PING qiniunor.xdwscache.glb0.lxdns.com (122.228.94.180): 56 data bytes
64 bytes from 122.228.94.180: icmp_seq=0 ttl=52 time=13.335 ms
64 bytes from 122.228.94.180: icmp_seq=1 ttl=52 time=14.025 ms
64 bytes from 122.228.94.180: icmp_seq=2 ttl=52 time=16.682 ms
64 bytes from 122.228.94.180: icmp_seq=3 ttl=52 time=13.475 ms
64 bytes from 122.228.94.180: icmp_seq=4 ttl=52 time=13.474 ms
64 bytes from 122.228.94.180: icmp_seq=5 ttl=52 time=13.418 ms
64 bytes from 122.228.94.180: icmp_seq=6 ttl=52 time=14.736 ms
然后我们拿到访问到的ip:122.228.94.180
执行如下命令:
curl -I http://7ktr6y.com5.z0.glb.qiniucdn.com/-123456.jpg -x 122.228.94.180:80
如果是https连接则是:
curl -I https://7ktr6y.com5.z0.glb.qiniucdn.com/-123456.jpg -x 122.228.94.180:443
如果发生如下情况:
liuhanlindemac:~ yishiyaonie$ curl -I http://7ktr6y.com5.z0.glb.qiniucdn.com/-123456.jpg -x 180.97.211.38:80
HTTP/1.1 200 OK
Date: Tue, 09 Jun 2015 05:05:05 GMT
Server: nginx/1.4.4
Content-Type: image/jpeg
Content-Length: 52136
Accept-Ranges: bytes
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 2592000
Cache-Control: public, max-age=31536000
Content-Disposition: inline; filename="-123456.jpg"
Content-Transfer-Encoding: binary
ETag: "FmMG7vzZayClmSqzAuOd_F-tqm07"
X-Log: AC:1;CFGG:3;mc.g;IO:7
X-Reqid: jjgAAFlmUnht-eUT
X-Whom: nb263
X-Qiniu-Zone: 0
Age: 1
X-Via: 1.1 czdx85:8107 (Cdn Cache Server V2.0), 1.1 jiangxiazai17:0 (Cdn Cache Server V2.0)
Connection: keep-alive
说明节点ok。
如果出现其他信息都代表不ok。