aws / aws/aws-lambda-rust-runtime
Consider documenting AWS_LC_SYS_NO_JITTER_ENTROPY
- Langage dominant
- Rust
- Étoiles
- 3.6k
- Forks
- 396
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Context: https://github.com/aws/aws-lc-rs/issues/899
Docs: https://aws.github.io/aws-lc-rs/resources.html#entropy-configuration
Recent versions of `AWS_LC` enable a new entropy source, CPU jitter, which is somewhat expensive to initialize. It adds ~50ms of latency to startup in their testing, though I've seen signs of a decent amount higher on small instance sizes. CPU jitter is enabled by default, but can be opted out of.
Since lambdas are frequently cold-start latency sensitive, this might be relevant to our userbase. For context, java lambdas using snapstart, have it disabled by default, based on a built in AWS LC check.
We don't directly use AWS_LC, but it is widely used by lambda applications as aws-sdks default to using it as the TLS backend (along with reqwest and much of the rest of the async ecosystem). So, we can expect most lambdas to be impacted by this behavior.
The workaround is to inject an environment variable via eg your `.cargo/config.toml`:
```
[env]
AWS_LC_SYS_NO_JITTER_ENTROPY=1
```
The implication of disabling this is, you would only have 1-2 other entropy sources (OS source + CPU source). CPU source availability varies based on environment. You generally want >= 2 entropy sources, hence the new default.
However, on casual examination, I think pretty much any hardware that aws lambda runs on, should anyway have cpu source? (I have not looked deeply though, some might not, this needs more research).
It seems like this is something our users would appreciate knowing about. Not sure exactly where though. Perhaps it belongs in the aws-side lambda docs instead?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par l’issue AWS LC liée et la section sur la configuration de l’entropie dans la documentation des ressources, puis déterminez si ces indications doivent figurer dans la documentation de Lambda. Documentez le workaround AWS_LC_SYS_NO_JITTER_ENTROPY, sa motivation liée aux démarrages à froid et le compromis concernant la source d’entropie ; l’exemple .cargo/config.toml correspondant doit être inclus.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- aws, rust
- Domaine
- cloud, documentation
- Type d'issue
- Documentation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100