Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRV TTL triggers timeout event #176

Closed
wants to merge 2 commits into from
Closed

Conversation

wfeii1980
Copy link

issue 54 Add ServiceEvent::ServiceInactive

@keepsimple1
Copy link
Owner

Thanks for your PR! Could you please describe the problem at hand?

From the title, my understanding is that SRV TTL expired while PTR record was still valid because PTR has 75 mins TTL while SRV only has 2 mins TTL. Is that the problem?

If yes, I think the direct cause is that currently we checks only PTR record for refresh due. If we send out TYPE_SRV refresh query when SRV is due to refresh, will that solve your problem?

At the high level, I think if SRV TTL indeed expires (even with refresh), which means the server no longer exists for the service instance, we should generate ServiceRemoved as the service instance is no longer valid. It seems to me ServiceInactive is too similar to ServiceRemoved and would cause confusions.

@wfeii1980
Copy link
Author

Because I don't quite understand the difference between PTR and SRV timeout, I added a ServiceInactive.

@keepsimple1
Copy link
Owner

Because I don't quite understand the difference between PTR and SRV timeout, I added a ServiceInactive.

Both PTR and SRV (and address records A / AAAA) are required to have a complete service instance. I think any of them timeout should generate the event ServiceRemoved. Do you need to know which of them caused the ServiceRemoved ? If yes, then we need to find a way to distinguish them.

@keepsimple1
Copy link
Owner

I added a draft PR #180 to address the issues here. Let me know what you think. @wfeii1980 . Thanks.

@keepsimple1
Copy link
Owner

keepsimple1 commented Mar 19, 2024

I've updated the PR #180 to support your use case. Would you please help check if that PR can:

  1. refresh SRV when the responder is alive.
  2. trigger ServiceRemoved when the SRV expires and the responder no longer alive

Please let me know if any issues. Thanks! (and just to clarify, @wfeii1980 I will add you as co-author in #180 because it was inspired by yours)

@keepsimple1
Copy link
Owner

@wfeii1980 please let me know what do you think about PR #180 ? Would it help your use case?

@wfeii1980
Copy link
Author

wfeii1980 commented Apr 26, 2024

upgrade to 0.11.0
very good!

@keepsimple1
Copy link
Owner

I've merged PR #180, which should have fixed this one. If you still have issues with SRV TTL triggers, please open a new issue, or re-open this one. Thanks!

@keepsimple1 keepsimple1 closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants