https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • z

    zszszsz

    02/24/2023, 10:13 AM
    I cannot literal get what that "rollover" mean
  • a

    anurag

    02/24/2023, 10:17 AM
    Pushed a fix, I'll monitor the errors now. Thanks @zszszsz
  • z

    zszszsz

    02/24/2023, 10:17 AM
    I never thought it could be like an infinite loop.
  • z

    zszszsz

    02/24/2023, 10:18 AM
    I was guess it could be scientific 🙂
  • a

    anurag

    02/24/2023, 10:19 AM
    I ran into that issue earlier today but I thought this condition will never hit so added a check. Let's see
  • u

    8bitsquid

    02/24/2023, 10:21 AM
    Don't think I've seen this asked, I have a zone that I want to have a Worker on, apart from one subdomain where I plan to use Pages. I think I've figured out 2 ways of doing it, but is there any reason to choose one or the other? Custom Domain:
    Copy code
    worker.example.tld -> worker
    *.example.tld CNAME worker.example.tld
    except.example.tld CNAME project.pages.dev
    Routes: in worker config
    Copy code
    except.example.tld/* -> no worker selected
    *.example.tld/* -> worker
  • a

    anurag

    02/24/2023, 10:21 AM
    BTW, I absolutely love DX of Workers ❤️ Props to the entire team 👏 Going from fix to production is <5s.
  • h

    HardAtWork

    02/24/2023, 10:25 AM
    Second option will probably work best. Two things to note,
    except.example.tld/*
    has to be set from the dash, since it doesn't pertain to any specific Worker. Secondly, you need some kind of DNS record to actually cover
    *.example.tld
    . I recommend an
    AAAA
    record pointing toward
    100::
  • z

    zszszsz

    02/24/2023, 10:26 AM
    I don't think you can do a wildcard cname
  • u

    8bitsquid

    02/24/2023, 10:48 AM
    I've been using wildcard CNAMEs since I switched to CF :D it's super helpful
  • u

    8bitsquid

    02/24/2023, 11:04 AM
    sweet tysm, I have
    *.example.tld CNAME example.tld
    and it's proxied, everything seems to work including the bypass
  • r

    Rishabh Kumar

    02/24/2023, 6:01 PM
    Hello all
  • r

    Rishabh Kumar

    02/24/2023, 6:03 PM
    I am trying to implement a reverse proxy of WebSocket in cloudflare worker. What I want : Client (https://) => Worker (As wss:// request) => My Origin (As ws:// request). How to achieve this?
  • b

    Bouahaza

    02/24/2023, 7:32 PM
    Hello everyone. We'll structure our architectural rework trough workers. To avoid code splitting, is it common to have only one worker handle all (graphql, rest api, ui serving, cache via r2 or d1, etc..) or really better to segment one service = one worker and let them communicate on edge ?
  • h

    HardAtWork

    02/24/2023, 7:35 PM
    In general, I'd recommend cramming as much into a single Worker as possible, as once it is warm, every route is warm, while if you split it up, only the gateway will be warm.
  • b

    Bouahaza

    02/24/2023, 7:42 PM
    Thank you for the answer. It makes sense. We'll see if we can fit it all into 5MB... And having one worker ping the others every minute, is that a bad practice?
  • h

    HardAtWork

    02/24/2023, 7:43 PM
    If you are paying for it, they don't care, but it is kind of wasteful
  • d

    dave

    02/24/2023, 9:58 PM
    enable minifying too
  • w

    wedtm

    02/25/2023, 7:38 PM
    Are analytics engine datasets limited to one per account during beta?
  • w

    wedtm

    02/25/2023, 7:40 PM
    Can you expand on this? I thought cloudflare workers didn't need to be "warmed" because of the custom runtime environment?
  • h

    HardAtWork

    02/25/2023, 7:50 PM
    There is the no cold start system, but that only works on the first Worker triggered
  • h

    HardAtWork

    02/25/2023, 7:50 PM
    If you need to trigger multiple Workers, then it might still need to cold start
  • w

    wedtm

    02/25/2023, 7:51 PM
    Woah! Didn't know that, thank you!
  • v

    violet

    02/25/2023, 11:20 PM
    is there a way workers can pass data to each other via service bindings that can't be spoofed by normal http clients? specifically, could i set some secret
    isFromWorker: true
    property that allows me to skip the normal authentication steps i have on another worker? is there a security reason i shouldn't do this?
  • h

    HardAtWork

    02/25/2023, 11:22 PM
    You can add some kind of flag to the request.cf object, which can then be passed around service bindings.
  • v

    violet

    02/25/2023, 11:23 PM
    awesome. and this can't be spoofed by someone calling https://myworker.example.workers.dev directly?
  • h

    HardAtWork

    02/25/2023, 11:23 PM
    Nope
  • v

    violet

    02/25/2023, 11:23 PM
    i love cloudflare
  • v

    Vadim

    02/26/2023, 6:54 AM
    im working on an app where I connect to a remote server over ws and stream certain updates back to the client. I assume the worker gets evicted After the CPU time limit, but how would I go about having it open for longer periods (hours)? Do I use a DO or can I ping my worker (if so what is preferrable?)
  • h

    HardAtWork

    02/26/2023, 7:38 AM
    A Durable Object would probably be best, since you aren’t always guaranteed to hit the same Worker when you ping
1...230423052306...2509Latest