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

    Skye

    04/08/2023, 11:07 AM
    That code is fetching from another domain - if that domain takes a while to respond, your worker will take the same time
  • s

    Skye

    04/08/2023, 11:07 AM
    The worker itself will already be very fast
  • d

    Deleted Account

    04/08/2023, 11:07 AM
    is there any other way to fetch the another domain with faster response?
  • s

    Skye

    04/08/2023, 11:08 AM
    You could try caching the responses from that domain
  • s

    Skye

    04/08/2023, 11:08 AM
    But other than that, the only thing to do is to get the other domain to be faster
  • d

    Deleted Account

    04/08/2023, 11:10 AM
    how?
  • s

    Skye

    04/08/2023, 11:13 AM
    https://developers.cloudflare.com/workers/learning/how-the-cache-works/
  • p

    presently

    04/09/2023, 7:35 AM
    you can store json files in R2 super easily
  • p

    presently

    04/09/2023, 7:36 AM
    @ me or msg me if you need code for it I have a nearly identical worker which generates and saves text files 20+ times per minute in bursts without issue
  • x

    xHyroM

    04/09/2023, 8:39 AM
    hi, I need to save data for maximum 5 minutes - cache because I am making discord bot and /setup command has more stages - buttons, select menus, modals and I have to save somewhere things that user entered, I was thinking about Cache, but it is not right (at least I think so)
  • x

    xHyroM

    04/09/2023, 8:42 AM
    something like redis would be great
  • h

    HardAtWork

    04/09/2023, 9:52 AM
    Durable Objects would probably work fine
  • m

    metal

    04/09/2023, 8:13 PM
    question (please ping when replying): regarding smart placement beta, does the algorithm automatically separate between different URI path routes when deciding whether to place the worker edge server closer to the site's API server or to the actual user? I'll give 2 examples: #1 - I have a route on my worker that calls 3-4 requests from my API/DB server #2 - I have another route which just does a single request from my API/DB server Would it apply the placement globally for the worker or just for each URI path? I assume there's no real harm for #2 of placing it anywhere along the path since it's 1 request from both ends but I figured i'd ask anyway im honestly just curious
  • k

    kian

    04/09/2023, 8:16 PM
    Not currently, no
  • k

    kian

    04/09/2023, 8:17 PM
    It's done on a per-Worker basis
  • m

    metal

    04/09/2023, 8:21 PM
    ah right, different path would usually be a different worker
  • m

    metal

    04/09/2023, 8:21 PM
    I'm mainly asking for the purpose of stuff like pages functions, not actually sure how those are loaded up.
  • k

    kian

    04/09/2023, 8:33 PM
    They're all a single Worker
  • m

    metal

    04/09/2023, 8:34 PM
    right. so I think my question remains, if a different function is doing more requests than the other, how would that be handled?
  • c

    Cyb3r-Jok3

    04/09/2023, 8:36 PM
    All functions are combined into a single worker
  • k

    kian

    04/09/2023, 8:37 PM
    Then that'd be what placement prioritises
  • s

    SZAGLAM

    04/09/2023, 9:50 PM
    My custom domains are shown as inactive in the cloudflare dashboard, even though they work. Does someone else have the same issue?
  • c

    Chaika

    04/09/2023, 10:01 PM
    You are talking about Worker Custom Domains, I assume? Specifically, the certificates column showing inactive? If you've deleted the certificate (and don't need it, or made another Adv. one to replace it), it's expected. You don't need the certificates if the custom domain is already covered by your Universal SSL Cert (which covers first level subdomains, i.e *.yourwebsite.com). If you're not talking about that, please specify the exact product/menu you're talking about
  • s

    SZAGLAM

    04/09/2023, 10:03 PM
    Thanks for the response. Right, the certificate of the top level domain is shown as inactive.
  • c

    Chaika

    04/09/2023, 10:03 PM
    If you don't need it (already covered by your universal ssl), or manually deleted it, that's fine
  • c

    Chaika

    04/09/2023, 10:04 PM
    It's not saying the Custom Domain itself is inactive, it's just saying the Adv. Cert it issued for it is not active/was deleted
  • s

    SZAGLAM

    04/09/2023, 10:06 PM
    Thank you, just checked the edge certificates, and the "advanced" certificate is indeed shown as "Active" there but shadowed by the universal
  • s

    SZAGLAM

    04/09/2023, 10:08 PM
    On another note,
    wrangler publish
    started grepping text files inside
    build/
    and uploading them as modules.
    Copy code
    Uploading additional modules:
    - sitemap.txt (text)
    How can i stop this new behaviour?
  • c

    Chaika

    04/09/2023, 10:08 PM
    that's weird, it should still show as Active in the Custom Domains tab then as far as I know. It doesn't really matter too much though as long as it is renewing or not needed
  • s

    SZAGLAM

    04/09/2023, 10:20 PM
    Adding the line to wrangler.toml fixed this
    Copy code
    toml
    rules = [{ type = "Text", globs = [], fallthrough = false }]
1...238323842385...2509Latest