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

    Isaac McFadyen | YYZ01

    05/21/2023, 11:27 PM
    Not "I hope it's not deprecated"
  • k

    kian

    05/21/2023, 11:28 PM
  • k

    kian

    05/21/2023, 11:28 PM
    I wonder how far along
    aws-sdk-rs
    is - I only really think about it for S3 (because of R2)
  • i

    Isaac McFadyen | YYZ01

    05/21/2023, 11:28 PM
    To add onto what @kian said above: I'd strongly recommend against doing SigV4 manually if you can at all help it, it's painful.
  • k

    kian

    05/21/2023, 11:30 PM
    aws-sigv4
    has a
    from(request: &'a Request<B>) -> SignableRequest<'a>
    so it's a lot like
    aws4fetch
    I suppose
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:40 PM
    messing around with rust-s3 now
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:41 PM
    hey, that worked!
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:41 PM
    ty folks!
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:42 PM
    one step closer to a functioning personal private crate registry
  • k

    kian

    05/21/2023, 11:43 PM
    Ooo, that's cool
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:43 PM
    now i just need to clean up the code before I open-source it
  • k

    kian

    05/21/2023, 11:43 PM
    I've never looked into what APIs that a crate registry exposes, I think a few people have done Docker registries on R2
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:44 PM
    It's pretty simple actually. If you ignore the default git registry and only support sparse, it's not hard to write one
  • k

    kian

    05/21/2023, 11:44 PM
    Does
    cargo
    checksum the tarball locally?
  • k

    kian

    05/21/2023, 11:45 PM
    R2 has some funky behaviour with large files (aka multipart upload) and how their checksums are stored, but I imagine if it's checksum'd locally then that isn't an issue
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:45 PM
    it verifies it on pull, you need to generate a checksum server-side on upload
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:45 PM
    and store it in the index
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:45 PM
    which in my case is a postgres db
  • k

    kian

    05/21/2023, 11:46 PM
    Sounds like it'll work pretty nicely
  • k

    kian

    05/21/2023, 11:46 PM
    Next step is using #882757739019911219 and #992060581832032316 instead /s
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:46 PM
    the other nice thing is that sparse goes well with cdn
  • k

    kian

    05/21/2023, 11:47 PM
    > The sparse protocol downloads each index file using an individual HTTP request. Since this results in a large number of small HTTP requests, performance is significantly improved with a server that supports pipelining and HTTP/2.
  • k

    kian

    05/21/2023, 11:47 PM
    Oh yeah, that sounds like it'll be cache's best friend.
  • k

    kian

    05/21/2023, 11:48 PM
    I don't think I've tried sparse yet but I have stared at the updating index bar every now and then so I probably should
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:48 PM
    yea
  • n

    Noah Kennedy | Oxy

    05/21/2023, 11:48 PM
    sparse is especially nice in ci
  • l

    Lone Wolf

    05/22/2023, 5:15 AM
    I'm a bit worried about the billing - I can't see any charges or anything and when I go to billing there's no estimated prices or anything does that mean i've not used enough R2 to bill?
  • p

    peachananr

    05/22/2023, 8:04 AM
    Hey guys, I just switched from Wasabi to R2 and I've been seeing a significant drop on my cache hit rate. It used to hover around 80% with tiered caching on but now with R2, it seems to be around 20%. Looks like assets are getting evicted faster than when I was using other storage. I have page rule set to cache everything and it was working fine before I switch to R2. Any one seeing this?

    https://cdn.discordapp.com/attachments/940663374377783388/1110115986029420604/Screenshot_2023-05-21_at_22.31.49.png▾

  • p

    peachananr

    05/22/2023, 8:07 AM
    FYI, I'm using a custom domain with R2 so Cloudflare cache should work as it was before.
  • m

    miguelff

    05/22/2023, 8:28 AM
    I'm trying to delete a bucket, but I need to empty it first. I´m inferring from https://discord.com/channels/595317990191398933/940663374377783388/1064259479857807390 that the --recursive s3 rm api it isn't implemented? The command below does not seem to work in R2, it works in S3, tho.
    aws s3 rm s3://bucket_name/ --endpoint-url https://xxx.r2.cloudflarestorage.com/bucket_name --recursive --dryrun
1...103710381039...1050Latest