spf-discuss
[Top] [All Lists]

Re: TXT Records

2003-11-19 20:05:35
I think that the performance of the reference implementation of SPF is important. This leads me to wonder if we should perform some set of the DNS lookups and mechanism evaluations in parallel. For example:

   Extract the ordered list of mechanisms.
   While list not empty do
extract initial subset whose 'result's are the same (i.e. get the list of '+' from the front)
      initiate DNS lookups in parallel
      while pending lookups do
            get result
            if mechanism matches, then return result.
       done
    done

There are various complications associated with include and redirect, but I'm sure that these can be handled.

Note that this works nicely for cases like:

      v=spf1 a mx ptr:%{d2} -all

It *may* initiate more lookups than necessary, but the latency will (almost certainly) be lower. Of course, you could just perform all the lookups and then evaluate until you get an answer -- but that is even more complex.

If the reference implementation goes to these lengths, then it will eliminate a criticism that the specification is inherently unusable for performance reasons.

It *may* also be that the spec needs to note that mechanisms may be evaluated out of order, but the overall result of an SPF check is as though the mechanisms were evaluated from left to right. The reason that this makes a difference is that you might have a complex SPF record that triggered DNS lookups that had side effects (e.g. recorded an entry into a log file).

Just my late night ramblings....

Philip

Jonathan Steinert wrote:

I need to just point out; If we keep adding things to do in DNS lookups in a serial order, the time it takes to do an SPF lookup goes up and up and up.

I'm not saying that these aren't good ideas, but we need to realize that the tradeoff is in longer SPF lookup times. The trouble is that SPF is being designed to be fast enough to run at message acceptance time, and on high load servers it's bad to keep a connection open for long.

--Jonathan



--
Philip Gladstone
* Check out the live pondcam at http://pond.gladstonefamily.net

-------
Sender Permitted From: http://spf.pobox.com/
Archives at http://archives.listbox.com/spf-discuss/current/
Latest draft at http://spf.pobox.com/draft-mengwong-spf-02.6.txt
To unsubscribe, change your address, or temporarily deactivate your subscription, please go to http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

<Prev in Thread] Current Thread [Next in Thread>