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

    albert

    04/27/2022, 5:04 PM
    Is there any difference between how Workers bindings and the S3-compatible API is handled that could affect performance?
  • v

    Vitali

    04/27/2022, 5:06 PM
    I think Workers bindings have less auth overhead in front of it. I don't know if that'll actually matter though because it wouldn't be an IOPS bottleneck, just a latency one
  • i

    itsmatteomanf

    04/27/2022, 5:07 PM
    Those are basically DDoS machines under a different name 😛
  • a

    albert

    04/27/2022, 5:09 PM
    Gotcha. Can I assume a read/write is successful if the `.get()`/`.put()` promise resolves?
  • v

    Vitali

    04/27/2022, 5:14 PM
    Yup
  • j

    john.spurlock

    04/27/2022, 5:28 PM
    curious: any reason why the
    R2Object.version
    seen from the binding is not returned as the
    x-amz-version-id
    header in
    Get/HeadObject
    ?
  • a

    albert

    04/27/2022, 5:40 PM
    Well, the Workers logstream clearly can't handle this. I'll need to find a better way to count 😂
  • i

    itsmatteomanf

    04/27/2022, 5:41 PM
    Barely anything can handle that 🤪 I’m gonna watch the status page, you are gonna break Cloudflare 🤣🤣
  • k

    kian

    04/27/2022, 5:41 PM
    won't be the first incident he's caused
  • k

    kian

    04/27/2022, 5:42 PM
  • a

    albert

    04/27/2022, 5:44 PM
    I would usually set up an atomic counter with DOs for something like this, but I don't think that'll work...
  • i

    itsmatteomanf

    04/27/2022, 5:55 PM
    The latency, yeah…
  • i

    itsmatteomanf

    04/27/2022, 5:55 PM
    And DOs are write limited.
  • a

    albert

    04/27/2022, 5:55 PM
    Copy code
    mjs
    export class Counter {
        constructor() {
            this.value = 0
        }
    
        async fetch() {
            return new Response(this.value++)
        }
    }
  • a

    albert

    04/27/2022, 5:55 PM
    this should work
  • a

    albert

    04/27/2022, 5:56 PM
    it'll be kept alive by the constant requests
  • i

    Isaac McFadyen | YYZ01

    04/27/2022, 5:56 PM
    Yeah, but you're not gonna hit over about 100 req/s with that, right?
  • a

    albert

    04/27/2022, 5:56 PM
    No idea - I'll try
  • s

    stupefied | AS204829

    04/27/2022, 5:56 PM
    workers uses javascript right?
  • i

    Isaac McFadyen | YYZ01

    04/27/2022, 5:56 PM
    Yup.
  • i

    itsmatteomanf

    04/27/2022, 5:57 PM
    Was thinking about the same limit, but maybe they are only to storage writes.
  • i

    Isaac McFadyen | YYZ01

    04/27/2022, 5:57 PM
    Was pretty sure it was throughput but who knows?
  • s

    stupefied | AS204829

    04/27/2022, 5:57 PM
    i feel like im learning fake JS in school now
  • i

    Isaac McFadyen | YYZ01

    04/27/2022, 5:57 PM
    "Durable Objects scale well across Objects, but each object is inherently single-threaded. A baseline of 100 req/sec is a good floor estimate of the request rate an individual Object can handle, though this will vary with workload."
  • i

    Isaac McFadyen | YYZ01

    04/27/2022, 5:57 PM
    Sounds like any requests, not just storage writes.
  • a

    albert

    04/27/2022, 5:58 PM
    a few hundred requests a second so far - not seeing any slowdowns yet
  • i

    itsmatteomanf

    04/27/2022, 5:58 PM
    Then yeah, not gonna work very much.
  • e

    eidam | SuperSaaS

    04/27/2022, 5:59 PM
    the GQL analytics api expose health checks metrics, so you can pull the stats you need 👀
  • a

    albert

    04/27/2022, 6:00 PM
    https://r2-perf.asp.gg/read
  • a

    albert

    04/27/2022, 6:00 PM
    (count is total number of reads)
1...666768...1050Latest