-2

Is DNS considered stateless, if yes why so? Knowing that the local DNS for example once it learns the a mapping it caches the name to address translation for some time, doesn't that qualify DNS as state Protocol ?

I am new in this domain, tried to look for some reliable readings on this topic, didn't find any. So if you can provide some that'll be great.

1
  • 1
    The "stateless" part refers to the server not having to remember previous interactions to answer new queries.
    – vonbrand
    May 23, 2013 at 18:37

1 Answer 1

6

You're confusing protocol with infrastructure.

The DNS protocol is stateless, in that it determines that right now this name resolves to this IP address, and doesn't make assumptions about how long this will be. Higher level handlers deal with maintaining name resolution state, which is why the OS may cache DNS resolutions and deal with the cache based on the TTL value reported on the DNS reply.

The DNS infrastructure is not something you could define as a state machine. It is an eventual consistency infrastructure. The same name may resolve to different things on different parts of the infrastructure for a variety of reasons.

Not the answer you're looking for? Browse other questions tagged .