aws / aws/aws-lambda-rust-runtime

Consider documenting AWS_LC_SYS_NO_JITTER_ENTROPY

オープン
#1,101 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
3.6k
フォーク
396
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされている AWS LC issue と、リソースドキュメントのエントロピー設定セクションから始め、次にこのガイダンスを Lambda ドキュメントに含めるべきかどうかを判断してください。AWS_LC_SYS_NO_JITTER_ENTROPY workaround、その cold start に関する動機、およびエントロピーソースのトレードオフを文書化してください。該当する .cargo/config.toml の例を含める必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, rust
領域
cloud, documentation
issue の種類
ドキュメント
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。