Is the authoritative source of WHOIS data stored with the registrar that a domain name is registered with, or some other organization?
@micahflee It's almost like DNS, just with fewer layers/intermediaries. IANA delegates whois authority to the operators of each TLD. Your whois client either has that list or recurses from whois,iana,org
I'm not entirely sure if this exists but for some TLDs the registry in charge can refer to the whois service of providers that sell domains under that TLD.
@micahflee For IP-addresses it's a bit more tricky. Your client has a set of which block was assigned to which RIR (Regional Internet Registry, i.e. RIPE NCC, ARIN, LACNIC, Afrinic, etc.) and the RIR can refer to the receiving RIR for transferred blocks. But still IANA will answer with the information which RIR is responsible for which /8:
@micahflee Last but not least: The whois protocol is old. Very old. How old? Its assigned port is 43. It is the most minimal implementation of a thing that returns information after receiving a query. It is even more basic than HTTP/1.0 as HTTP knows verbs like GET which whois doesn't. You connect to the whois server at TCP/43, you state the domain, you get a reply: