dubbo
dubbo copied to clipboard
FailbackClusterInvoker should limit the size of failed invocations
Currently in FailbackClusterInvoker there is a map to store the failed invocations, however the size is unlimited.
In a high throughput application, It is possible that the failed invocations will fill up the memory and exhaust the memory.
I think it is better to:
- limit the size of the map
- choose the strategy to discard the failed invocations. e.g. FIFO, LIFO, etc.
- retry period should be configurable
- shutdown the ExecutorService when destroyed
Agreed, this maybe cause a risk of memory leak.
This issue has been prevented for some time and I will start to solve this problem in the near future.
Close via https://github.com/apache/incubator-dubbo/pull/2822