DNS resolution expiration
See original GitHub issueIt looks like the channel is somehow caching the IP resolved through DNS but never refreshing it. We are using grpc in AWS and since ELB’s IPs change over time, we’ve run into issues and found out grpc clients are trying to connect to an old IP.
Code snippet:
private[this] val channel = NettyChannelBuilder.forAddress(httpHost, httpPort).negotiationType(NegotiationType.PLAINTEXT).build();
private[this] val blockingStub = CrudGrpc.newBlockingStub(channel)
private[this] def getStub = blockingStub.withDeadlineAfter(timeout.toNanos, TimeUnit.NANOSECONDS)
override def getEntity(id: String): Entity = {
getStub.getEntity(id)
}
Is our assumption correct? Is there any issue in how are we using the client library? Would it be a bad practice (performance-wise at least) to create a new channel in each request?
Thanks in advance
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
DNS SOA Expire Value - MxToolbox
MxToolBox will issue a warning if your value is less than 2 weeks or more than 4 weeks, which are suggested values.
Read more >Tips to Make Sure Your DNS Registration Doesn't Expire
One upside to this situation, due to a policy introduced by ICANN a few years ago, is that an expired domain name will...
Read more >Domain Name Expiry Checker - Check when a domain is ...
Checking the expiration date of a domain name is an easy process, by using the whatsmydns.net domain name expiry checker tool you can...
Read more >Expiration and deletion of domain registrations - Google Support
From days 31 to 60* after expiration : · Restoration grace period: Your domain name will be prepared for deletion. · From day...
Read more >What is DNS TTL + Best Practices - Varonis
DNS TTL (time to live) is a setting that tells the DNS resolver how long to cache a query before requesting a new...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also encountered such problem, using Python as server, Java as client and appoint NettyChannelBuilder as the ManagedChannel builder, deploy in AWS with ELB, but IP changes over time. if I change ManagedChannel builder to ManagedChannelBuilder, the grpc-java version is 0.13.1, ManagedChannelBuilder using io.grpc.okhttp.OkHttpChannelProvider as provider seems to work fine.
Any suggestion on this?
Yes I think we have addressed the original issue. The periodic refreshing is discussed in #2514