aws / aws/aws-lambda-rust-runtime

Consider documenting AWS_LC_SYS_NO_JITTER_ENTROPY

Đang mở
#1,101 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
3.6k
Fork
396
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với issue AWS LC được liên kết và phần cấu hình entropy trong tài liệu về tài nguyên, sau đó xác định xem hướng dẫn này có thuộc tài liệu Lambda hay không. Ghi lại workaround AWS_LC_SYS_NO_JITTER_ENTROPY, động lực liên quan đến cold start của nó và sự đánh đổi về nguồn entropy; cần bao gồm ví dụ .cargo/config.toml tương ứng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, rust
Lĩnh vực
cloud, documentation
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.