--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/fafb218a-1c43-478e-8e0e-698f57b310d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I had a look, and the DNS caching is done in the Netty layer, somewhere in DefaultDnsCache class, there is a timer attached to the TTL of the record - and the record is removed from the cache list after ttl expires, but the tcp connections that are using that entry still remain active.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/717ab9f5-d847-4a80-9ccc-7fef8a94362e%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/717ab9f5-d847-4a80-9ccc-7fef8a94362e%40googlegroups.com.
On May 8, 2017, at 8:59 PM, 'Jason Copeland' via vert.x <ve...@googlegroups.com> wrote:If the issue is simply a keep-alive connection to an IP on the backend that will go away, ideally the ELB would inject a Connection: close response to close keep-alive connections. If they aren't, seems like a miss on their end.
HttpClientOptions does have setIdleTimeout(), which can be used to clean up connections if they aren't used for a period of time, but if the connection is constantly being used, it won't get cleared out. I don't really see any kind of setMaxLiftime() type options, either. I also don't see an easy way to know how long a connection has been opened. If you could identify how long it was opened, you could close the connection and obtain a new one, that would effectively allow you to do the maxLifetime() thing.
It would be interesting to see some glue between a resolver implementation and the http pool under the HttpClient stuff, such that the resolver would identify changes (removal) of IP from the result set, and instruct the pool to evict all the entries that have resolved to that particular IP. I don't immediately see a way to get at the Http*Pool which is private within ConnectionManager.ConnQueue.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/ede5c3a4-3d90-486f-a347-1f7c01fc5b9e%40googlegroups.com.
HttpClientOptions does have setIdleTimeout(), which can be used to clean up connections if they aren't used for a period of time, but if the connection is constantly being used, it won't get cleared out. I don't really see any kind of setMaxLiftime() type options, either. I also don't see an easy way to know how long a connection has been opened. If you could identify how long it was opened, you could close the connection and obtain a new one, that would effectively allow you to do the maxLifetime() thing.you can maintain it using the underlying HttpConnection obtained from the HttpClientRequest that shall remain the same object and put that in a map that you evict with the HttpConnection closeHandler
It would be interesting to see some glue between a resolver implementation and the http pool under the HttpClient stuff, such that the resolver would identify changes (removal) of IP from the result set, and instruct the pool to evict all the entries that have resolved to that particular IP. I don't immediately see a way to get at the Http*Pool which is private within ConnectionManager.ConnQueue.imho we should first identify the real issue, if the ELB is supposed to close the connection that should solve the problem (anyway the connection become unusable and will be evicted from the pool at some point), so if there is an issue it’s more a caching issue in the actual resolver ?
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/b8b17ef2-dd9b-4d9e-b53f-c0f070e00133%40googlegroups.com.