Dns Vs Whois
2025-09-13 DNS: The Phone Book Itself What it is: The Domain Name System (DNS) is the system that translates the friendly website names you type (like google.com) into the numerical IP addresses that computers use to find each other (like 142.251.42.206). It’s the actual lookup process. Simple Analogy: DNS is the phone book. You look up a name (e.g., “Jane’s Pizza”), and it gives you the phone number you need to call to reach them. Key Purpose: Finding the correct server. It answers the question: “Where is this website located?” WHOIS: The “Who Owns This?” Section What it is: WHOIS is a protocol and a database that stores information about who registered a domain name. It’s a directory of who owns what. Simple Analogy: WHOIS is like the section in the phone book that lists who the phone number is registered to, their address, and when they registered it. It’s about ownership and registration details. Key Purpose: Identifying the domain owner. It answers the questions: “Who owns this website?”, “When did they register it?”, and “How can I contact them?” Side-by-Side Comparison Feature DNS (Domain Name System) WHOIS (Who Is) Main Job Finding an address. Translates a domain name to an IP address. Finding an owner. Provides registration details for a domain. Analogy The phone book that gives you a number. The listing that tells you who the number belongs to. What it answers “Where is google.com?” “Who owns google.com?” Information it gives IP addresses, mail server info, etc. Owner’s name, contact info, registrar, registration & expiry dates. When you use it Every time you visit a website (your browser does this automatically). When you need to investigate a domain, contact the owner, or check if a domain is available. A Simple Example Let’s say you want to visit example.com. Your computer uses DNS: It’s like your computer shouting, “Hey, everyone, what’s the address for example.com?!” A DNS server answers back, “It’s 93.184.216.34!” Your browser then uses that number to connect to the website. You get curious and use WHOIS: You wonder, “Who actually owns example.com?” You go to a WHOIS lookup website (like whois.icann.org), type in the domain, and it tells you the registration company, when it was created, and when it will expire. In a Nutshell: DNS is for computers to find websites. It’s about location. WHOIS is for people to find out about website owners. It’s about ownership. They work together to make the internet function, but they serve two completely different purposes.
依赖于第三方服务的场景要怎么测试
2018-03-30 如何依赖于第三方服务的场景? 我为什么会想到这个问题?因为依赖于三方的场景太常见了。和三方最常用的交互方式就是http/https,我在思考到底如何测试这种场景下的我方逻辑。 mock,这是我首先想到的方法。但是mock的切入点是哪里?到底要通过什么样的方式去mock? http代理拦截 (感觉比较适合前端项目,例如使用anyproxy搭建代理服务器,浏览器中配置代理,这样是可以的) 对于服务端项目来说,应该是socket层的代理才能够实现http请求的拦截吧? cnpm -g install anyproxy [AnyProxy Log][2018-03-30 20:55:42]: Http proxy started on port 8001 [AnyProxy Log][2018-03-30 20:55:42]: web interface started on port 8002 service层mock 这个是我着手做的一种mock实践。