首页 > ATS调优 > a�z????�?e�??Z�a?�-SRV ?��e?�a??c�?

a�z????�?e�??Z�a?�-SRV ?��e?�a??c�?

2013年4月26日     浏览数:380 发表评论 阅读评论

TS-1713 ???taobao e�?a??ats a�z????�?e�??Z�a?�?��e�?a???��cs�a?�a??patcha?�a�?.

a?�e�?aZYc?�???e�se?�e�?c?�DNScs�SRVe��a?�i???Z�a?�e��a?�cs�a??a�?c?�a�????e�?i??a�Ze�?e??a?�a�z???cs�?�?e�??Z�a?�a��

Ats a??a�z???cs�?��a��a??e��a?ZDNS?Y?e??a��a??a??c�?DNS SRVe��a?�?�????a?Zi??a??a�??Y?e??SRVe��a?�a��c��a�?a???�????_http._tcp

c��a?�a��c�?a?�a?�SRVcs�e��a?�?�?a??

srve��a?�?�?a??a��a?�i?s
a?�e�?i?shttp://www.zytrax.com/books/dns/ch8/srv.html
srvce.prot.name ttl class rr pri weight port target

_http._tcp.www.sina.com.cn. SRV 0 2 80 sina.

a??a�?c?�?��a�?e�Sa�?i??c?�a?�e�Sa��a��a??a??a�?c?�c�?a????�a��a?�i?????e�?e�Sa��i??e��a?�a�?cZ�??�a?�a��e�Sa��a��

e??e??a??a�se??a?�i??a?Sa??e?�a?�a��

?�?git mastera?�cs�?��??�i??c��a?Zc?�e?�a��e?�i??a��?z?e��a?�a???�?a??i??a��e�?a��build rpma?�a��

a��e?�a?Zi??a?�a??srv ?Y?e???�????,?SSdnse�??z???�a?�??�a?�cs�dns,??�??�a?�a�?binda??a?�a��

[php]

traffic_line -s proxy.config.srv_enabled -v 1
traffic_line -s proxy.config.dns.nameservers -v 127.0.0.1
traffic_line -x

[/php]

a?�a??debug

[php]

traffic_line -s proxy.config.diags.debug.enabled -v 1
traffic_line -s proxy.config.diags.debug.tags -v dns*
traffic_line -x

[/php]

remap.config a�?sinaa??a?�i??e�?c?�a��a?�i?s

[php]

map http://www.sina.com.cn/ http://www.sina.com.cn/

[/php]

??�a?�dns e�?c?�zone a��a?�i?s

[php]
$TTL 60
$ORIGIN .
@ IN SOA ns1. root.localhost. (
20051213;
7000;
3000;
15000;
86400;
);

@ 86400 IN NS ns1
ns1 86400 IN A 127.0.0.1
sina. A 218.30.66.101 A 218.30.66.102

sina2. A 58.63.236.32
A 58.63.236.36
_http._tcp.www.sina.com.cn. SRV 0 2 80 sina.
SRV 0 1 80 sina2.
;—–
*. IN CNAME wild
*.cn. IN CNAME wild
*.com. IN CNAME wild
*.com.cn. IN CNAME wild
*.gov. IN CNAME wild
*.gov.cn. IN CNAME wild
*.edu. IN CNAME wild
*.edu.cn. IN CNAME wild

[/php]

c?�a??a?�cs�nameda�?ats ?�?a??e??e??

?Z?a?�????��e?�

[php]

wget -S -O /dev/null -e http_proxy=127.0.0.1 http://www.sina.com.cn/

[/php]

c?�a?�a?�e?�a�??�?a?�a?�.a?�cs�a??a�?a�se??a?�a��

[php]

[Apr 3 13:56:50.022] Server {0x2ae95d56c700} DEBUG: (dns_srv) Beginning lookup of SRV records for origin _http._tcp.www.sina.com.cn
[Apr 3 13:56:50.023] Server {0x2ae95d56c700} DEBUG: (dns_srv) delaying (force=0) SRV answer for _http._tcp.www.sina.com.cn [timeout = 0]
[Apr 3 13:56:50.023] Server {0x2ae95bf3f100} DEBUG: (dns_srv) SRV lookup of _http._tcp.www.sina.com.cn
[Apr 3 13:56:50.023] Server {0x2ae95bf3f100} DEBUG: (dns) received query _http._tcp.www.sina.com.cn type = 33, timeout = 0
[Apr 3 13:56:50.023] Server {0x2ae95bf3f100} DEBUG: (dns_srv) DNSProcessor::getby attempting an SRV lookup for _http._tcp.www.sina.com.cn, timeout = 0
[Apr 3 13:56:50.023] Server {0x2ae95bf3f100} DEBUG: (dns) enqueing query _http._tcp.www.sina.com.cn
[Apr 3 13:56:50.023] Server {0x2ae95bf3f100} DEBUG: (dns) adding first to collapsing queue
[Apr 3 13:56:50.023] Server {0x2ae95bf3f100} DEBUG: (dns) send query (qtype=33) for _http._tcp.www.sina.com.cn to fd 93
[Apr 3 13:56:50.023] Server {0x2ae95bf3f100} DEBUG: (dns) sent qname = _http._tcp.www.sina.com.cn, id = 10892, nameserver = 0
[Apr 3 13:56:50.023] Server {0x2ae95bf3f100} DEBUG: (dns) sent_one: failover_number for resolver 0 is 1
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns) received packet size = 189
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns) primary DNS response code = 0
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns_srv) Discovered SRV record [from NS lookup] with cost:0 weight:1 port:80 with host:sina2
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns_srv) Discovered SRV record [from NS lookup] with cost:0 weight:2 port:80 with host:sina
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns) inserting name = _http._tcp.www.sina.com.cn
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns) SUCCESS result for _http._tcp.www.sina.com.cn = _http._tcp.www.sina.com.cn af=0 retry 0
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns) called back continuation for _http._tcp.www.sina.com.cn
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns_srv) inserted SRV RR record [sina2] into HostDB with TTL: 60 seconds
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns_srv) inserted SRV RR record [sina] into HostDB with TTL: 60 seconds
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns_srv) beginning process_srv_info
[Apr 3 13:56:50.024] Server {0x2ae95bf3f100} DEBUG: (dns_srv) select SRV records sina2
[Apr 3 13:56:50.044] Server {0x2ae95bf3f100} DEBUG: (dns) received query sina2 type = 1, timeout = 0
[Apr 3 13:56:50.044] Server {0x2ae95bf3f100} DEBUG: (dns) enqueing query sina2
[Apr 3 13:56:50.044] Server {0x2ae95bf3f100} DEBUG: (dns) adding first to collapsing queue
[Apr 3 13:56:50.044] Server {0x2ae95bf3f100} DEBUG: (dns) send query (qtype=1) for sina2 to fd 93
[Apr 3 13:56:50.044] Server {0x2ae95bf3f100} DEBUG: (dns) sent qname = sina2, id = 8919, nameserver = 0
[Apr 3 13:56:50.044] Server {0x2ae95bf3f100} DEBUG: (dns) sent_one: failover_number for resolver 0 is 1
[Apr 3 13:56:50.045] Server {0x2ae95bf3f100} DEBUG: (dns) received packet size = 87
[Apr 3 13:56:50.045] Server {0x2ae95bf3f100} DEBUG: (dns) primary DNS response code = 0
[Apr 3 13:56:50.045] Server {0x2ae95bf3f100} DEBUG: (dns) received A name = sina2
[Apr 3 13:56:50.045] Server {0x2ae95bf3f100} DEBUG: (dns) received A = 58.63.236.32
[Apr 3 13:56:50.045] Server {0x2ae95bf3f100} DEBUG: (dns) received A = 58.63.236.36
[Apr 3 13:56:50.045] Server {0x2ae95bf3f100} DEBUG: (dns) SUCCESS result for sina2 = 58.63.236.32 retry 0
[Apr 3 13:56:50.045] Server {0x2ae95bf3f100} DEBUG: (dns) called back continuation for sina2

[/php]

分类: ATS调优 标签:
  1. 纸鸢
    2013年4月26日01:40 | #1

    引出了新知识点,学习了!

  2. 高高
    2016年5月26日16:48 | #2

    您下载SRV的连接失效了,还请指教,怎样编译安装SRV?

  1. 本文目前尚无任何 trackbacks 和 pingbacks.