chrome dns cache
ํฌ๋กฌ ๋ธ๋ผ์ฐ์ ๋ dns cache ์ค์ ์ด ๋์ด์๋ค. ํ์ง๋ง dns cache ๋ฅผ clear ํ ์ ์๋ ๋ฐฉ๋ฒ์ด ์๋ค. chrome://net-internals/#dns ์ ์ ์ํ๋ฉฐ ์๋์ ํ๋ฉด๊ณผ ๊ฐ์ด Clear host cache ๋ฅผ ํด๋ฆญํ๋ฉด ๋๋ค. dns lookup ๋ ์ ๊ณตํ๋ค.
command ๋ก๋ ์๋์ฒ๋ผ ์ ๋ ฅํ ์ ์๋ค. (www.naver.com nslookup ์ํ ์, ๊ฒฐ๊ณผ๊ฐ)
โฏ nslookup www.naver.com
Server: 168.126.63.1
Address: 168.126.63.1#53
Non-authoritative answer:
www.naver.com canonical name = www.naver.com.nheos.com.
Name: www.naver.com.nheos.com
Address: 223.130.195.200
Name: www.naver.com.nheos.com
Address: 223.130.200.107
java dns cache
VIP ๋ก ๋ฌถ์ธ MySQL ์๋ฒ์ ์ค์ ๋ฌผ๋ฆฌ์ฅ๋น๊ฐ ์ค์์นญ๋๋ ๊ฒฝ์ฐ์ ๊ฑฐ๊ธฐ์ ๋ถ์ ์๋ฒ๋ ๊ฐ์ด ๋ณ๊ฒฝ์ด ์ด๋ค๋์ผ ํ๋ค. ๊ทธ๋ ์ง ์์ผ๋ฉด ๋ณ๊ฒฝ์ MySQL ์๋ฒ์ ์ธ์ ์ด ๋ถ์ด์๋ ํ์์ด ๋ฐ์๋ ์ ์๋ค. ๋ฐ๋ผ์ ์๋ฐ๋จ์์ dns cache ๋นํ์ฑํ ์ฒ๋ฆฌ๋ฅผ ํด์ค์ผ ํ๋ค. ์๋์ฒ๋ผ ํ ์ ์๋ค.
// DNS ์บ์ ๋นํ์ฑํ
java.security.Security.setProperty("networkaddress.cache.ttl" , "0");
java.security.Security.setProperty("networkaddress.cache.negative.ttl", "0");
- networkaddress.cache.ttl ์ DNS ์กฐํ๊ฒฐ๊ณผ๋ฅผ ์บ์ํ๋๋ฐ ์ฌ์ฉ๋๋ TTL ๊ฐ์ด๋ค. ์ด๋จ์๋ก ํ์๋๋ค. ๋ฐ๋ผ์ ํด๋น ๊ฐ์ด 0์ด๋ฉด DNS ์๋ฒ์ ์๋ก์ด ์์ฒญ์ ๋งค๋ฒ ์ํํ๋ค.
- networkaddress.cache.negative.ttl ์ ์คํจํ DNS ์กฐํ๊ฒฐ๊ณผ๋ฅผ ์บ์ํ๋๋ฐ ์ฌ์ฉ๋๋ TTL ๊ฐ์ด๋ค. ์ด๋จ์๋ก ํ์๋๋ค. ํด๋น ๊ฐ์ด 0์ด๋ฉด ์คํจํ dns cache ์ ๋ํด์ ๋ฐ๋ณต์ ์ผ๋ก dns ์๋ฒ์ ์์ฒญ์ ๋ณด๋ด๊ฒ ๋๋ค.
๊ฒฐ๊ตญ ๋งค๋ฒ dns ์๋ฒ์ ์ง์ํ์ฌ IP ๋ฅผ ์ฐพ๋๋ค.
java 8 ์ด์ ๋ฒ์ ์์ java dns cache
java8 ์ด์ ๋ฒ์ ์์๋ง ์ฌ์ฉ๋ dns cache disable ๋ฐฉ๋ฒ์ด ์๋ค. ์๋์ฒ๋ผ ์์ฑํ๊ณ java8 ์ดํ๋ถํฐ๋ networkaddress.cache.ttl ๋ก ์ฌ์ฉํ๋ค๊ณ ํ๋ค. ๊ทธ๋๋ java8 ์ดํ์ ์ ์์ฑ์ ์ฌ์ ํ ๋์ํ๋ค๊ณ ํ๋ค. ๋ค๋ง java8 ์ดํ์์ ๊ถ์ฅ๋๋ ๋ฐฉ์์ด ์๋๋ผ๊ณ ํ๋ค.
(์ฐธ๊ณ : https://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html)
System.setProperty("sun.net.inetaddr.ttl", "0");
'Interest > ๊ฐ๋ฐ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
2024-02 ๊ฐ๋ฐ : ์ํฌ๋ฆฌ ๊ธฐ๋ก (1) | 2024.02.20 |
---|---|
2024-01 ๊ฐ๋ฐ : ์ํฌ๋ฆฌ ๊ธฐ๋ก (0) | 2024.01.21 |
2023-11-19 ๊ฐ๋ฐ : ์ํฌ๋ฆฌ ๊ธฐ๋ก (0) | 2023.11.19 |
20201226 ๋์์ : ์ํํธ์จ์ด ์ํคํ ์ฒ์ ์ค์์ฑ (0) | 2020.12.26 |
20201221 ์ฑ : ๊ฐ์ฒด์งํฅ ์ฌ๊ณ ํ๋ก์ธ์ค (0) | 2020.12.22 |