[Licensing plugin] Reduce startup time by applying a more aggresive retry strategy #197074
Labels
good first issue
low hanging fruit
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Our current licensing plugin polls the licensing information periodically (default: every 30s).
Relevant pieces of code:
kibana/x-pack/plugins/licensing/server/plugin.ts
Lines 116 to 122 in f3f53e0
kibana/x-pack/plugins/licensing/common/license_update.ts
Lines 32 to 36 in 47a497c
When the license fails to be fetched, Kibana waits for the next polling trigger to kick in, which leads to Kibana taking 30s for the next retry to occur. The main issue here is that network issues or ES starting up might lead to Kibana taking extra 30s to be ready to address authenticated HTTP traffic after startup.
We could improve this situation by applying a retry with back-off strategy that can retry the license fetch on failure, after a progressively increasing interval until we reach the actual polling interval (1s, 2s, 4s, 8s, 16s, 30s, 30s, ...).
The text was updated successfully, but these errors were encountered: