影響 CURL Response 時間的因素 - Linux

Tracy avatar
By Tracy
at 2017-08-28T23:30

Table of Contents

作業系統:CetnOS 6.9 64bit

請問一下各位 最近碰到一個問題

假設第三方api server abc.com.tw 205.123.123.111

當server使用 curl 發出request到 abc.com.tw

'有時候' 會發生response時間過久(約5s以上)

後來發現是ipv6沒有關閉. 關閉後, 速度有優化很多(5s->650ms),

但覺得還是沒有預期的快, 因為如果將curl domain換成ip 回應時間提升至(250ms),

DNS 解析時間應該不至於到 400ms ... (目前DNS 設定為 168.95.1.1)

目前ipv6已經確定關閉 lsmod | grep ipv6

不知道還有其他會影響到系統發送 curl 速度的原因嗎?

網路架構

router ----> IP分享 ----> WebServer(VM1)

PS : 如果在servre /etc/hosts 加入 abc.com.tw 205.123.123.111

回應時間也是約250ms, 所以明顯的是DNS問題

另外關閉ipv6 有一個步驟無法執行, 不知是否有影響 ...
error: "net.ipv6.conf.all.disable_ipv6" is an unknown key
error: "net.ipv6.conf.default.disable_ipv6" is an unknown key
error: "net.ipv6.conf.lo.disable_ipv6" is an unknown key

--
Tags: Linux

All Comments

Isla avatar
By Isla
at 2017-08-31T18:14
請你先確定一下負責 abc.com.tw 該網域的 nameserver
Isabella avatar
By Isabella
at 2017-09-03T01:47
設定是不是正確,還有這些 nameserver 本身是否都可以
正常對外提供解析運作
Valerie avatar
By Valerie
at 2017-09-06T07:58
然後在內網自行用 nslookup 解析測試查詢
使用 hinet dns 或是 google dns 分別解析側試看看

無OS筆電裝linux的相容性好嗎?

Rebecca avatar
By Rebecca
at 2017-08-28T08:46
我因為在外頭跑都是用centos和ubuntu,使用win的機會較少,真要的話都是連回 家裡電腦處理。 我看到IdeaPad 320-15IKB 80XL0017TW有出無OS的版本,會便宜2000,我還省得 要重新分割或移除預載軟體等一堆問題,想說就這台好了。 不過之前遇過centos無法啟動筆電無線網 ...

關於檔案處理

Steve avatar
By Steve
at 2017-08-27T16:46
原本檔案內容: AAA,B,C,D BBB,E,F,G CCC,X,Y,Z ... 希望變成格式: AAA,1,B,C,D BBB,2,E,F,G CCC,3,X,Y,Z ... 數字部分從1-10,超過會從1開始重新循環. 想請教有沒有比較精簡的做法 感恩 - ...

dd備份系統至不同的硬體機器

Tom avatar
By Tom
at 2017-08-26T21:59
各位板友大家好, 想請問一下使用dd備份出來的系統硬碟, 直接接上完全不同的硬體會不會有錯誤產生呢? 懇請有經驗的板上先進提供經驗分享, 如果有錯誤,又該如何排除呢? 謝謝大家。 P.S. Windows下,印象中把系統碟換插另台主板是可以的! - ...

AMD 似乎已修正 Ryzen 的 Segmentation Fault 問題

Carolina Franco avatar
By Carolina Franco
at 2017-08-26T19:54
消息來源: phoronix 網站 New Ryzen Is Running Solid Under Linux, No Compiler Segmentation Fault Issue http://bit.ly/2wcqdks Some Early AMD Ryzen Threadripper 195 ...

process問題

Caitlin avatar
By Caitlin
at 2017-08-26T18:20
在這請教關於process的問題 在your unix/linux the ultimate guide這本書上看到 當一個process繼承他的parentand#39;s process時 會連parentsand#39;s process所執行的當前directory一同繼承 所以不能創造一個p ...