https://discord.cloudflare.com logo
Join Discord
Powered by
# r2
  • j

    jb

    03/24/2023, 4:13 AM
    if the server responds with a 499, it's because the client has disconnected. how that client is disconnecting is another thing.
  • d

    digitalpoint

    03/24/2023, 4:13 AM
    If the client disconnected, would they still get the response though?
  • j

    jb

    03/24/2023, 4:14 AM
    to my knowledge, yes it is possible when you have multiple hops involved.
  • j

    jb

    03/24/2023, 4:14 AM
    in a client a <> client b <> origin sort of setup
  • j

    jb

    03/24/2023, 4:15 AM
    client a may still be connected to client b however client b is no longer connected to the origin
  • j

    jb

    03/24/2023, 4:16 AM
    generally happens when the timeouts are not correct overlapping and you have a short timeout somewhere in the chain but the others are longer and still connecting.
  • d

    digitalpoint

    03/24/2023, 4:16 AM
    I guess that makes sense, maybe some of my users just have really craptastic networks. Internally I'm already handling 5xx errors and doing a retry transparently... Probably just make sense to treat a 499 as a 5xx in that regard.
  • j

    jb

    03/24/2023, 4:18 AM
    depending on the nature of the 499, retrying won't fix the other clients.
  • d

    digitalpoint

    03/24/2023, 4:20 AM
    Ya, but just like retrying on a 5xx doesn't fix the server, it usually goes through successfully. It's not an issue of the request being malformed or anything, rather a network issue between the client and Cloudflare, so wouldn't a retry make sense?
  • d

    digitalpoint

    03/24/2023, 4:22 AM
    Also not talking about continuous retrying or anything. When Cloudflare API or R2 returns a 5xx error, it's s single retry before it fails and logs it to their error log that it failed. So a single retry on a 499 doesn't seem too terrible. The other option is to just let them keep bugging me about why they are getting 499 errors in their logs. "Talk to your network guys or hosting company, not me." hah
  • j

    jb

    03/24/2023, 4:27 AM
    it's up to you but if you're streaming data, you're gonna have a bad time.
  • d

    digitalpoint

    03/24/2023, 4:29 AM
    It's no streaming happening... nor any range requests of any sort. The use case for this is the server fetches a single object in its entirety... it's not split across multiple requests and reassembled and the buckets are private (there's no browsers accessing anything)
  • d

    digitalpoint

    03/24/2023, 4:30 AM
    So the request for the object is boolean... it either was a success or a failure and no processing or splitting is happening.
  • k

    Karew

    03/24/2023, 4:40 AM
    Yep, just make sure you set the correct
    Content-Type
    header when you upload it to R2
  • g

    galileoflatneo

    03/24/2023, 5:25 AM
    Does anyone know how to quickly download the entire bucket and all its contents in R2 in one go, locally to the computer ?
  • k

    Karew

    03/24/2023, 5:34 AM
    Tools like Rclone or s3cmd can do this.
  • k

    Karew

    03/24/2023, 5:34 AM
    You choose the key/URL of the file when you upload it, it's static
  • n

    NewbieDev

    03/24/2023, 5:34 AM
    Got it. Thanks
  • g

    galileoflatneo

    03/24/2023, 5:34 AM
    thanks, checking into this.
  • g

    galileoflatneo

    03/24/2023, 6:15 AM
    Thank you for pointing me to the rclone. Got the downloading done using rclone. Just amazing.
  • m

    morpig

    03/24/2023, 9:55 AM
    Copy code
    {
          "Expiration": {
            "Days": 1
          },
          "ID": "delete all files after one day",
          "Filter": {
            "Prefix": "/master"
          },
          "Status": "Enabled",
          "Transitions": [],
          "NoncurrentVersionTransitions": []
        },
    can anyone confirm that this lifecycle config means that all files under the folder master will be deleted after one day?
  • h

    HardAtWork

    03/24/2023, 10:01 AM
    Deletions may take up to one day to process. So, deletion may take from 1-2 days to process.
  • h

    HardAtWork

    03/24/2023, 10:07 AM
    Ok, that was worded very badly
  • h

    HardAtWork

    03/24/2023, 10:08 AM
    Basically, once an expiration is triggered via a Lifecycle Rule, it can take up to 24 hours to process.
  • h

    HardAtWork

    03/24/2023, 10:08 AM
    Which, in your case, means that the object may take from 1-2 days to be removed, once the rule is applied.
  • m

    morpig

    03/24/2023, 10:41 AM
    ``master/20230321/a/b/c/d/file.txt`` does this file path qualify for the above policy?
  • a

    Ambyjkl

    03/24/2023, 10:49 AM
    i see, thanks for sharing, i guess my current provider allows breaking spec, and since my data is never larger than a few MB, i'm just getting away with it by chance. I guess i'll just buffer my data before uploading since it's small, and for larger stuff i'll just use multipart upload
  • h

    HardAtWork

    03/24/2023, 11:14 AM
    Looks like it, yes
  • l

    levifig

    03/24/2023, 11:48 AM
    Is there a way to create a user in Cloudflare that only has permissions to R2?
  • t

    Thanatos

    03/24/2023, 1:48 PM
    Is r2 suitable for around 300k users downloading around 15GB each? Not all at once, but probably within a month. Or would we run into issues with potentially being marked as abusive?
1...960961962...1050Latest