In the discovery mechanism, whenever the server deregisters from the LDSME, it will not be identified by the findServOnNetwork service( graceful exit). When the server advertises itself, it would present itself to the network with SRV,PTR and TXT records. Each of these records will have a TTL, which would signify how long the data will be cached.
Suppose, the server which is registered to the LDSME, undergoes a ungraceful exit or a unforeseen issue, and exits, it would not be degistered from the LDS and hence would still be seen while running the findServOnNetwork service. Even if the TTL value of the mDNS records are reduced to half the original value( eg 5 mins), even after the TTL has expired, records for the server(which had a ungraceful exit) are still seen.
This gives an impression that, although the OPC UA is dynamic for normal working scenarios, unplanned disasters may not be dynamic enough.
Is it wrong to consider the fact of reducing the TTL value to get more dynamic results? (Considering the case of unplanned exit)
The UA spec mandates that servers periodically register with the LDS.
If the server crashes the LDS ME could send the goodbye notice that registers the server.
If the entire device crashes or is disconnected from the network then the problem would still exist.
That said, I do not feel the mDNS should be the mechanism used for detecting failures. What problem are you trying to solve?
I was having the understanding that, if there is a unexpected crash from the server, it could be detected by the mDNS record TTL(Not immidiately)
So the case goes something like this: I have a LDS, advertised with MDNS packets having TTL of 10minutes. So is the case with the multicast server registering to the LDS. Again it would be advertised with TTL of 10mins. If suppose, the multicast server crashes here, then, there is no means to update about the crash until the next 10mins.
Hence, if i am able to configure the TTL value to 5mins, may be the server crash could be realised earlier with no responders to reply to the queries raised for the multicast server.
Is this the correct understanding?
It is correct but you have no control over the TTL of every LDS ME on the network.
You also have to consider that lower TTL means more multicast traffic which causes other issues.
Which is why I am wondering why you want to use mDNS for failure detection.
It is not the right tool for the job.