Re: [twsocket] TWSocket.Connet/GetHostByName bottleneck

2015-09-18 Thread Stephen Dickason
Just a non-well-informed thought: Are you not able to cache the results and combine multiple requests that would return the same results into a single first call and subsequent requests would read from the cache? That is to say comparing 50 calls to 300 calls, the likelihood of more of the

Re: [twsocket] TWSocket.Connet/GetHostByName bottleneck

2015-09-18 Thread Angus Robertson - Magenta Systems Ltd
> At this time I see this way: > > 1. Use TDNSQuery.MXLookup to resolve MX, then TDNSQuery.ALookup to > resolve MX's IP. Then supply resolved MX IP to TSmtpCli to avoid > GetHostByName. > > 2. Cache both MX and A results in my own DNS cache. Seems sensible, just make sure you time out the