歡迎您光臨本站 註冊首頁

關於DNS伺服器負載平衡的問題

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

關於DNS伺服器負載平衡的問題

我們自己的域名是我們自己解析的,但域名註冊商那裡只能提供兩條NS記錄,所以只綁定了,NS1 ->192.168.0.1和NS2 ->192.168.0.11,
現在我們的域名有些地方解析不了,我們加了兩台DNS伺服器,在域名現在的NS的a記錄那裡設置如下
ns1     IN     A      192.168.0.1
ns1     IN     A      192.168.0.2
ns2     IN     A      192.168.0.11
ns2     IN     A      192.168.0.12

以前的為ns1 -> 192.168.0.1 和ns2 ->192.168.0.11
這樣做了后,我發現0.1和0.11上面的負載還是很大,新加進去的0.2和0.12兩個機器的負載很小,不知道為什麼?

此外請教,除了這種方法還有沒有其它的DNS負載的解析辦法.
《解決方案》

ttl設置小些有利於輪訓的效果如TTL=600
《解決方案》

樓主這樣的設計不會起任何作用
glue record的A記錄在父域里已經指定了。
可以用另外的負載均衡實現,例如用NAT的一對多映射,可以看看CCNA書關於NAT的典型應用。

[ 本帖最後由 goodgrief 於 2008-2-4 09:22 編輯 ]
《解決方案》

NAT我們想過,lvs也想過,但我們的DNS伺服器不是因為負載太大的原因靠成的,可能是中國特色的網路環境造成的,我們在幾大ISP服務商機房放了伺服器,這麼做好像是沒有什麼效果
《解決方案》

不談其它,只在技術層面探討

你說特色網路環境大概是指幾大運營商之間網路互聯互通不暢,這個問題確實很讓人無語。
如果你的DNS只提供非recursion的查詢,應該負載不會高到無法承受,請問你的dns伺服器CPU佔用率和內存佔用是多少
再複雜再特色的網路環境,總是有技術手段可以來應付的
《解決方案》

原帖由 goodgrief 於 2008-2-4 09:32 發表 http://bbs.chinaunix.net/images/common/back.gif
你說特色網路環境大概是指幾大運營商之間網路互聯互通不暢,這個問題確實很讓人無語。
如果你的DNS只提供非recursion的查詢,應該負載不會高到無法承受,請問你的dns伺服器CPU佔用率和內存佔用是多少
再複雜再 ...


last pid: 75827;  load averages:  0.00,  0.02,  0.00                                                                                                      up 40+19:20:48  10:19:46
56 processes:  1 running, 55 sleeping, 1 zombie
CPU states:  0.6% user,  0.0% nice,  0.8% system,  0.0% interrupt, 98.7% idle
《解決方案》

CPU利用率不高
下面是我的,平台是solaris 9 sparc,512M內存

PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
568 root       67M   65M sleep   59    0   1:08:27 0.4% named/4

感覺還可以
《解決方案》

這是我在BIND-9.4 的管理員手冊找的,請參考

Load Balancing

A primitive form of load balancing can be achieved in the DNS by using multiple A records for one
name.
For example, if you have three WWW servers with network addresses of 10.0.0.1, 10.0.0.2 and 10.0.0.3,
a set of records such as the following means that clients will connect to each machine one third of the
time:
Name   TTL   CLASS   TYPE   Resource Record (RR) Data
www   600    IN           A      10.0.0.1
           600    IN           A      10.0.0.2
           600    IN           A      10.0.0.3
When a resolver queries for these records, BIND will rotate them and respond to the query with the
records in a different order. In the example above, clients will randomly receive records in the order 1,
2, 3; 2, 3, 1; and 3, 1, 2. Most clients will use the first record returned and discard the rest.
For more detail on ordering responses, check the rrset-order substatement in the options statement, see
RRset Ordering.
《解決方案》

多謝樓上的,我們現在就這麼做的,不過沒有什麼效果
《解決方案》

找域名註冊商。

[ 本帖最後由 baif 於 2008-2-13 14:16 編輯 ]

[火星人 ] 關於DNS伺服器負載平衡的問題已經有548次圍觀

http://coctec.com/docs/service/show-post-32501.html