After setting up Lync 2010 support for iOS/Android/WP clients a number of users commented that it was unbearably slow to logon and continuing slowness issues periodically once logged on.
After taking some diagnostic logs via the Lync client, I find that client is failing to discover the Lync server external URL several times before finally succeeding.
We were seeing the client query for the dns entry lyncdiscoverinternal.domain.com and get redirected to http://www.domain.com, which would happen a few times before the client gave up and moved on to lyncdiscover.domain.com and then successfully log on.
The normal process of discovery for the Lync mobile client is to try the following:
We didn’t create the A record for lyncdiscoverinternal.domain.com in the External DNS zone (which seemed obvious), so the first record that should have worked was lyncdiscover.domain.com EXCEPT that our external DNS zone is configured with a wildcard where anything.domain.com redirects to http://www.domain.com which fouls up the autodiscover process.
We found that creating a CNAME lyncdiscoverinternal pointing that to the existing lyncdiscover entry solved the issue. Depending on the config, this type of solution might require an addition Subject Alternative Name on the certificate of the Lync Edge server.
After that change, mobile logons are lightning fast, previously over a minute for some.