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

rfc(decision): Batch multiple files together into single large file to improve network throughput #98

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update questions section
  • Loading branch information
cmanallen committed Jun 8, 2023
commit f5fe8e8e248d6c01575fc4dd360b0b6812e0d54a
24 changes: 14 additions & 10 deletions text/0098-store-multiple-replay-segments-in-a-single-blob.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,20 @@ DEKs are more complicated to rotate as it requires modifying the blob. However,

# Drawbacks

# Unresolved Questions

1. How can we efficiently fetch a KEK?
- As currently specified we would need to reach out to a remote service.
- Can we cache the key in Redis or more permanently in a datastore like Postgres?
- This expands the area of attack for a potential intruder.
- Does KEK lookup efficiency matter on an endpoint where we're downloading KBs of blob data?
- Maybe?
- Does KEK lookup efficiency matter for ingest when it can be cached for the duration of the consumer's life?
- No.
# Questions

1. If KEKs are managed in a remote service how do we manage outages?
- We manage it in the same way we manage an outage of any other remote service.
- We will need to backlog or otherwise 400/404.
- KEKs have the benefit of _probably_ not blocking ingest as the key will be cached for long stretches of time (24 hours) and can be used for longer periods of time if a new key can not be fetched.
2. How will read efficiency be impacted if we rely on a remote service to decrypt blob data?
- It will have some cost but hopefully that cost is minimized by the constraints of your system.
- For example, Session Replay fetches multiple segment blobs in a single request. At most we will need to fetch two keys (and in the majority of cases a single key) to decrypt the segments.
- This key fetching latency is immaterial to the total latency of the request.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the self hosted open source implementation for this

Copy link
Member Author

@cmanallen cmanallen Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Environment variable named SECRET_KEY.

3. How will key rotation work in a production system?
- Hopefully it will be a rare event.
- KEK rotation will require re-encrypting every DEK encrypted with the KEK (typically everything in a ~24-hour period).
- DEK rotation will require re-encrypting a sequence of bytes in a blob.

# Extensions

Expand Down