Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Batch bulk upload limits #465

Closed
ashleymichal opened this issue Aug 22, 2019 · 3 comments
Closed

Batch bulk upload limits #465

ashleymichal opened this issue Aug 22, 2019 · 3 comments
Labels
design feature Feature requests and suggestions regression Something is broken, but works in previous releases

Comments

@ashleymichal
Copy link
Contributor

ashleymichal commented Aug 22, 2019

As much as possible we should analyze payloads before sending them to prevent wrangler spinning on impossible loads for no reason. In the case of a bulk upload using a json file (the basic bulk write method), this means the following:

The entire request size must be 100 megabytes or less.

Wrangler should check that the payload is less than 100MB, and bail with a message if it is not. Future optimizations would include streaming a file and chunking it appropriately, but this is really stupid hard with json.

Body should be an array of up to 10,000 key-value pairs

If the first parameter is satisfied, Wrangler should batch requests to meet the 10,000 key limit.

(Bonus)

(keys) The name may be at most 512 bytes

Assert that all keys are 512B maximum

(values) A UTF-8 encoded string to be stored, up to 2 MB in length.

Assert that all values are 2MB maximum

https://api.cloudflare.com/#workers-kv-namespace-write-multiple-key-value-pairs

(separate issue to be filed for "bucket" behavior)

@ashleymichal ashleymichal added this to the Add KV Subcommands milestone Aug 22, 2019
@ashleymichal ashleymichal added feature Feature requests and suggestions regression Something is broken, but works in previous releases design subject - kv labels Aug 22, 2019
@gabbifish
Copy link
Contributor

We still are dependent on cloudflare/cloudflare-rs#32 before we can close this issue.

@ashleymichal
Copy link
Contributor Author

should probably split out the parts of this issue that are dependent on cloudflare-rs to their own issue and track them separately.

@ashleymichal
Copy link
Contributor Author

opening new issue to track overall size: #476

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design feature Feature requests and suggestions regression Something is broken, but works in previous releases
Projects
None yet
Development

No branches or pull requests

2 participants