Files
coredns/plugin
Ruslan Drozhdzh 833e3ddaf0 plugin/forward: erase expired connections by timer (#1782)
* plugin/forward: erase expired connection by timer

 - in previous implementation, the expired connections resided in
   cache until new request to the same upstream/protocol came. In
   case if the upstream was unhealthy new request may come long time
   later or may not come at all. All this time expired connections
   held system resources (file descriptors, ephemeral ports). In my
   fix the expired connections and related resources are released
   by timer
 - decreased the complexity of taking connection from cache. The list
   of connections is treated as stack (LIFO queue), i.e. the connection
   is taken from the end of queue (the most fresh connection) and
   returned to the end (as it was implemented before). The remarkable
   thing is that all connections in the stack appear to be ordered by
   'used' field
 - the cleanup() method finds the first good (not expired) connection
   in stack with binary search, since all connections are ordered by
   'used' field

* fix race conditions

* minor enhancement

* add comments
2018-05-25 23:00:11 +01:00
..
2018-05-17 16:59:57 -04:00
2018-04-22 21:40:33 +01:00
2018-05-23 08:50:27 -04:00
2018-05-24 07:51:59 +01:00
2018-05-24 07:51:59 +01:00
2018-04-22 21:40:33 +01:00
2018-05-25 11:43:54 +01:00
2018-05-16 22:35:31 +01:00
2017-10-24 10:16:03 +01:00
2018-05-21 19:40:46 +01:00