Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching in Env Injector #409

Open
mkoziel2000 opened this issue Sep 20, 2022 · 2 comments
Open

Caching in Env Injector #409

mkoziel2000 opened this issue Sep 20, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@mkoziel2000
Copy link

mkoziel2000 commented Sep 20, 2022

We noticed that when using the Env Injector, if we had a service deployment with 10 replicas and the service pulled 5 secrets from an AKV, we would see 50 calls made to the AKV during the scale up. Because the calls get the same 5 values for each replica, it would be great if there was a way for the env injector to know that it has already pulled the value within a certain sliding window and used the cache value instead.

This would help reduce the risk of AKV throttling that might occur when too many calls are made within a short time window (especially if there is a lot of secrets and a lot of replicas getting spawned).

It seems having a sliding window cache of 10 sec that aligns with Microsoft's own "2000 calls per 10 sec" throttling rule would allow us to scale horizontally as much as we want and not have to worry about socket exhaustion or throttling failures. Not to mention, the reduced number of HTTPS calls will positively impact the performance of POD startup.

We could solve this going the Kubernetes secrets route with the configuration module. The downside is that we have a 3rd party MSP managing our K8S, so exposing the AKV secrets as Kubernetes secrets might create compliance/security issues. It would require not only managing the access of AKV and the PODs environment, but also the access to Kubernetes secrets, which gets tricky when you have an MSP administrating your environment.

@mkoziel2000 mkoziel2000 added the enhancement New feature or request label Sep 20, 2022
@Speeddymon
Copy link

I wonder if this was fixed by #437

@tspearconquest
Copy link
Contributor

Voting to close due to lack of response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants