possible blog post: Caching TUF metadata
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- content, documentation
Hướng nghiên cứu
Không có tệp, bài kiểm thử hay điểm vào mã nào được nêu. Trước tiên, hãy xem xét bản nháp được dán vào và quy trình của repository đối với các đóng góp cho blog hoặc tài liệu, sau đó làm rõ liệu nội dung này có nên trở thành một bài viết được xuất bản hay không, cũng như cần định dạng hoặc quy trình đánh giá nào. Công việc được xem là hoàn tất khi có một bài viết đã được thống nhất, đánh giá và sẵn sàng xuất bản, hoặc có một quyết định được ghi lại về việc không tiếp tục thực hiện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I've spent far too long in the past week looking at CDN logs... I collected some notes from this, and wrote a first draft of a blog post or something. copy-pasting here so I don't lose it
TUF implementation details: Caching and content delivery networks
TUF metadata can be cached at various places during its lifetime, this post aims to describe the useful
methods of caching. The write-up assumes that the "consistent snapshot" feature of TUF is used:
this should be true for all reasonable implementations.
Client metadata cache
A TUF client stores downloaded metadata in an application cache as part of the
TUF Client Workflow. Note that caching metadata is subtly different from caching
artifacts: An artifact cache is a "pure" cache and can be purged at any time without
side-effects (other than possibly having to re-download). Purging the metadata cache
is also possible without service loss but does have minor security implications as
some rollback attack protection is lost.
Client HTTP cache
In addition to the actual metadata, a client could cache the ETag information
included in a timestamp.json response and use the If-None-Match header in
subsequent requests. This is not useful for other metadata or artifacts as they
should never change.
There is a minor information leak if this is done (as the server could now respond
maliciously to only some clients based on the content of the If-None-Match
header). Current client implementations are not known to cache ETag.
Content Delivery Network caching
One could imagine that caching something as simple as TUF metadata in a Content
Delivery Network (CDN) is a trivial feat but it turns out there are several pitfalls.
These are some of the lessons that have been learned while maintaining TUF repositories:
- Uploading a new repository version to backend storage should be atomic (the metadata
versions on the storage backend should always be consistent). If this is not technically possible,
snapshot and all targets metadata should be uploaded before root and timestamp: this
minimizes the window of potentially inconsistent metadata. - "Old" metadata (or artifact) versions should not be removed from backend storage immediately: this can break clients that are in the middle of an update process
- CDN frontends should avoid serving any stale responses: 404 responses to root requests are part of the normal usage of the API and cannot be allowed to be stale, otherwise the repository state may be inconsistent.
- CDN frontends may cache versioned positive metadata responses (root, snapshot, targets) with
long lifetimes. - There are two valid alternatives to caching other responses:
- CDN frontend may use "negative cache" (caching failure codes) and may cache
timestamp metadata responses, if it is able to invalidate the cache immediately on
upload of new repository versions to storage backend. - CDN frontend should not cache timestamp metadata responses or use "negative caching"
if it is unable to invalidate the cache on upload of new data
- CDN frontend may use "negative cache" (caching failure codes) and may cache
At first glance it may seem like the above advice is overly cautious, and that failures
would be rare. In practice especially testing and alerting systems have managed to
consistently find failing combinations of mistakenly cached content.
- Ngôn ngữ chính
- Python
- Star
- 1.7k
- Fork
- 304
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của theupdateframework/python-tuf
-
switch to main branch?Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
theupdateframework/python-tuf#3001 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
theupdateframework/python-tuf#2979 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Use Immutable ReleasesĐang mởenhancement github_actions
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
theupdateframework/python-tuf#2920 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Investigate/test fetcher retriesĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
theupdateframework/python-tuf#2842 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
theupdateframework/python-tuf#2836 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của theupdateframework/python-tuf
Issue tương tự
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
vllm-project/vllm-metal#822 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vector-store
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
mem0ai/mem0#7461 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFileĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
BasedHardware/omi#19047 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày