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

    Tom Sherman

    02/28/2023, 3:53 PM
    i don't think it's too far, distributed nanoservices are what cloudflare workers are designed around
  • t

    Tom Sherman

    02/28/2023, 3:53 PM
    it's just a shame that remix has a monolithic approach, which makes things difficult
  • h

    HardAtWork

    02/28/2023, 3:54 PM
    I mean, Workers do perform measurably better in a monolith structure, rather than as nanoservices(as evidenced by Service Binding cold starts).
  • s

    Skye

    02/28/2023, 3:54 PM
    service binding cold starts shouldn't be any different to normal workers?
  • h

    HardAtWork

    02/28/2023, 3:55 PM
    That's what I mean. Once a script is warm, it is warm. If you have to dive into a service binding, then you are subject to a second/third/fourth set of cold starts.
  • h

    HardAtWork

    02/28/2023, 3:55 PM
    If your script is a monolith, you only cold start once.
  • k

    kian

    02/28/2023, 3:56 PM
    now I want to benchmark svc binding startup
  • u

    Unsmart | Tech debt

    02/28/2023, 3:56 PM
    Another issue with that approach is eventually you hit the limit of workers granted it is pretty large 😛 and deployment when you have many workers is much harder because cloudflare doesnt have targetable versions like AWS does on lambda so you might get in a weird state where some workers are updated and others arent
  • h

    HardAtWork

    02/28/2023, 3:56 PM
    Like, break a script up when it gets too large, but until then, try to keep it in as few as possible.
  • k

    kian

    02/28/2023, 3:56 PM
    service environments would fix that when they come back
  • k

    kian

    02/28/2023, 3:56 PM
    w.r.e targetable
  • k

    kian

    02/28/2023, 3:56 PM
    but... I have no idea when they'll come back
  • k

    kian

    02/28/2023, 3:57 PM
    I kinda miss them already
  • u

    Unsmart | Tech debt

    02/28/2023, 3:57 PM
    If service environments do fix that it would be nice yeah but not here rn 😛
  • k

    kian

    02/28/2023, 3:57 PM
    more specific to this scenario, service bindings can target a specific service environment on the bound worker
  • t

    Tom Sherman

    02/28/2023, 3:57 PM
    they're very critical for deploying microfrontends
  • k

    kian

    02/28/2023, 3:58 PM
    but i don't know if the API validates that at publish time
  • k

    kian

    02/28/2023, 3:58 PM
    i.e can you depend on Worker A Env A in Worker B Env A if Worker B is published before Worker A?
  • k

    kian

    02/28/2023, 3:58 PM
    probably not
  • u

    Unsmart | Tech debt

    02/28/2023, 3:58 PM
    Im talking about not only targeting a specific environment but a very specific deploy version inside the env
  • t

    Tom Sherman

    02/28/2023, 3:58 PM
    you only need two environments tho: green and blue 😅
  • u

    Unsmart | Tech debt

    02/28/2023, 3:59 PM
    environments for CF im pretty sure is more dev staging prod not for blue/green
  • u

    Unsmart | Tech debt

    02/28/2023, 3:59 PM
    but not sure as I never used them
  • u

    Unsmart | Tech debt

    02/28/2023, 3:59 PM
    Maybe you could create a new environment for every different deploy and retarget but that is a lot
  • a

    albert

    02/28/2023, 3:59 PM
    You could use WfP to target a specific version.
  • u

    Unsmart | Tech debt

    02/28/2023, 4:00 PM
    if you have WfP you could but that also adds more to cold starts
  • t

    Tom Sherman

    02/28/2023, 4:01 PM
    cold starts here really means very little, shouldn't focus too much on them
  • t

    Tom Sherman

    02/28/2023, 4:01 PM
    on a remix app it's likely going to be 1-5% of the page load time
  • u

    Unsmart | Tech debt

    02/28/2023, 4:01 PM
    the whole point of the github issue you linked said cold starts to be fair 😛
  • k

    kian

    02/28/2023, 4:02 PM
    time to benchmark svc binding cold starts
1...230823092310...2509Latest