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

    andrew

    04/02/2022, 1:07 AM
    multi ranges per request are interesting, i wasn't even aware of that existing in the wild
  • j

    john.spurlock

    04/02/2022, 1:07 AM
    ah gotcha
  • v

    Vitali

    04/02/2022, 1:07 AM
    It doesn't
  • j

    john.spurlock

    04/02/2022, 1:08 AM
    this is amazing info, thanks for the detail!
  • v

    Vitali

    04/02/2022, 1:08 AM
    Actually, I think I've blanket assumed we won't support multi range
  • v

    Vitali

    04/02/2022, 1:08 AM
    I'll have to talk to the PM about it. It's technically very easy but there are potential billing implications
  • a

    andrew

    04/02/2022, 1:08 AM
    personally i'm not sure how useful it would be for us
  • v

    Vitali

    04/02/2022, 1:08 AM
    Otherwise I would have done it when I implemented ranges
  • v

    Vitali

    04/02/2022, 1:09 AM
    It's niche
  • v

    Vitali

    04/02/2022, 1:09 AM
    But a popular feature & really weird other providers don't do it
  • a

    andrew

    04/02/2022, 1:09 AM
    sounds like more for reducing request load
  • a

    andrew

    04/02/2022, 1:09 AM
    when you're doing a lot of random access
  • v

    Vitali

    04/02/2022, 1:09 AM
    You can do some interesting things (e.g. random access to several files within a zip file efficiently)
  • a

    andrew

    04/02/2022, 1:10 AM
    that is predictable in advance
  • j

    john.spurlock

    04/02/2022, 1:10 AM
    exactly and those crazy backends for sqlite etc
  • v

    Vitali

    04/02/2022, 1:10 AM
    And yeah, reducing charges for request load if you know you have a bunch of random accesses known at once
  • a

    andrew

    04/02/2022, 1:10 AM
    ah yeah, if you have the zip file offset index available or you fetch that first, i see
  • j

    john.spurlock

    04/02/2022, 1:11 AM
    but i agree, for most cases like media especially a single range is sufficient
  • v

    Vitali

    04/02/2022, 1:11 AM
    zip has a central directory. so you fetch that and then you have all the offsets of all files
  • j

    john.spurlock

    04/02/2022, 1:12 AM
    actually mp4 containers are like that too, i take it back - it would be great to have multi-range requests! : )
  • v

    Vitali

    04/02/2022, 1:13 AM
    On my very long list of features I want to add, transparent zip and tar support is one of them. Upload a tar/zip file and it expands automatically on our end - you still pay for each file but it's a more efficient upload if you have lots of small files. Same on the download side
  • v

    Vitali

    04/02/2022, 1:13 AM
    Is it OK if each range gets billed as a read?
  • v

    Vitali

    04/02/2022, 1:13 AM
    I think you're asking for free multi range reads, right?
  • v

    Vitali

    04/02/2022, 1:13 AM
    err not free but the cost of 1 GET
  • j

    john.spurlock

    04/02/2022, 1:14 AM
    i mean free is best, but yea, latency win would be worth it in many cases (fewer larger ranges)
  • a

    andrew

    04/02/2022, 1:14 AM
    this actually isn't a problem for us because we already do our own sharding into folders, but i'm curious: with R2, is it best to balance objects randomly into different folders to get the best distribution across different nodes/servers/etc?
  • v

    Vitali

    04/02/2022, 1:14 AM
    Really? Couldn't you just issue those ranged reads in parallel?
  • a

    andrew

    04/02/2022, 1:14 AM
    (rather than dumping everything into a single folder at the top level of the bucket)
  • v

    Vitali

    04/02/2022, 1:14 AM
    Hmm... I guess you're right - there would maybe be a latency win
  • j

    john.spurlock

    04/02/2022, 1:14 AM
    depends on the client connection
1...161718...1050Latest