Added cache for get role secret (#6165)

## Problem

Currently if we are getting many consecutive connections to the same
user/ep we will send a lot of traffic to the console.

## Summary of changes

Cache with ttl=4min proxy_get_role_secret response.

Note: this is the temporary hack, notifier listener is WIP.
This commit is contained in:
Anna Khanova
2023-12-18 16:04:47 +01:00
committed by GitHub
parent 33cb9a68f7
commit 00d90ce76a
9 changed files with 55 additions and 28 deletions

View File

@@ -431,7 +431,6 @@ async fn connect_to_compute(
application_name: APP_NAME.to_string(),
options: console_options,
};
// TODO(anna): this is a bit hacky way, consider using console notification listener.
if !config.disable_ip_check_for_http {
let allowed_ips = backend.get_allowed_ips(&extra).await?;
if !check_peer_addr_is_in_list(&peer_addr, &allowed_ips) {