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

    adaptive

    11/22/2020, 1:42 PM
    This is network team fault. 😫 You already saw my "MVP" theory: Free: worker script is pushed to two, or three core location, and when is run for the first time on a specific colo it is copied to that colo, after that run latency becomes low. the worker can be evicted as many times needed for whatever reason, but the script is there. Bundled: worker script is pushed globally, therefore latency is low. Once again workers are spawned and evicted as per colo needs.
  • i

    itsmatteomanf

    11/22/2020, 1:44 PM
    Yeah. I feel like it's going out of India adding more latency. The thing I am not sure about in that post is: "to test without Workers is he disabling Cloudflare altogether?". If he is then it's the POP's location at fault, especially mentioning India.
  • a

    adaptive

    11/22/2020, 2:12 PM
    We are back at the start, using Durable Objects, and having inefficient routing for the client, creates inertia.
  • i

    itsmatteomanf

    11/22/2020, 2:28 PM
    Yeah... I am not sure of the actual latency due to Durable Objects, but he seems to be using KV only, should be relatively fast though.
  • a

    adaptive

    11/22/2020, 2:49 PM
    India is always the same debate, also a massive market for CF. If KV Core stores are in Europe and US, and on the two locations that CF has capacity. Mumbai will return a KV in 110ms πŸ‡ͺπŸ‡Ί and 180ms πŸ‡ΊπŸ‡Έ, and from Bangalore 130ms πŸ‡ͺπŸ‡Ί and 220ms πŸ‡ΊπŸ‡Έ. Now, where the workers are spawned based on user location: Mumbai Free SIN Pro SIN Business SIN Enterprise BOM Bangalore Free BOM Pro LHR Business MAA Enterprise SIN
  • i

    itsmatteomanf

    11/22/2020, 2:51 PM
    Mumbai does make sense, it's expensive, so it's Enterprise-only. But Bangalore? BOM for Free (which isn't active for Free in Mumbai) and SIN for Enterprise?
  • a

    adaptive

    11/22/2020, 2:54 PM
    this is what the probes are showing for the last hour.
  • i

    itsmatteomanf

    11/22/2020, 2:55 PM
    Oh, you have probes! I trust you, just doesn't make much sense... Cloudflare's team is the only one that can shed a light on that.
  • a

    adaptive

    11/22/2020, 3:01 PM
    It is a Network Team issue, but last I reported to Support, I got the famous canned report, so I will not waste energy reporting it again. The probes also monitor on Fastly, Akamai, Stackpath.
  • i

    itsmatteomanf

    11/22/2020, 3:03 PM
    Maybe @User or someone here can work it internally. That probe data would be interesting to see.
  • c

    catgirl

    11/22/2020, 4:17 PM
    Define managed. I would be using MongoDB Atlas where they host for me.
  • a

    adaptive

    11/22/2020, 4:21 PM
    Answered with MongoDB Atlas. I never used MongoDB Atlas, but if you managed your own instance of MongoDB, you could created a Node.js REST Proxy then with Cloudflare Argo Tunnel connect your worker to your instance.
  • c

    catgirl

    11/22/2020, 4:21 PM
    Atlas is doing this for you well it's a work in progress between them and cloudflare to support workers
  • c

    catgirl

    11/22/2020, 4:22 PM
    I'm hoping more databases add an automatic HTTP API in the future
  • c

    catgirl

    11/22/2020, 4:22 PM
    Custom TCP Protocols are harder to work with and it'll be a long time before Node Isolates support it
  • a

    adaptive

    11/22/2020, 4:27 PM
    I used MongoDB until 2015 then there was a shift to more $$$ so I migrated to Redis and CouchDB what I had in MongoDB. CouchDB could give agility to you project.
  • c

    catgirl

    11/22/2020, 4:27 PM
    Either mongo or postgres is desirable for my projects
  • c

    catgirl

    11/23/2020, 5:05 AM
    I'm feeling optimistic about the future Mongo Atlas support being added into CF Workers although meanwhile it'd frustrating I have to write a separate proxy api that runs elsewhere
  • c

    catgirl

    11/23/2020, 5:05 AM
    You lose the scaling benefits of workers once you have to manage scaling of an external API on your own
  • k

    kristian

    11/23/2020, 3:12 PM
    good morning πŸ‘‹
  • r

    rita

    11/23/2020, 5:58 PM
    hi!!
  • i

    itsmatteomanf

    11/23/2020, 6:38 PM
    Going to have dinner, bye ahah πŸ˜›
  • s

    stewart

    11/23/2020, 6:56 PM
    curl uploading scripts with
    --upload-file
    works, but when I use
    -F "script=@file
    I get
    Copy code
    "code": 10021,
          "message": "could not read content for part metadata"
  • d

    dangilkerson

    11/23/2020, 7:07 PM
    try creating a metadata.json file with
    Copy code
    {
      "body_part": "script"
    }
    then add this parameter to curl along with your script -F "script=@file
    Copy code
    -F "metadata=@metadata.json"
  • s

    stewart

    11/23/2020, 7:10 PM
    that worked. thanks!
  • k

    kristian

    11/23/2020, 9:57 PM
    i think i'm finally code complete on this, phew https://deals.bytesized.xyz/
  • k

    kristian

    11/23/2020, 9:57 PM
    very big monorepo with workers, sanity.io, nuxt.js, all kinds of fun stuff https://github.com/signalnerve/deals
  • k

    kristian

    11/23/2020, 9:57 PM
    need to go through and actually document everything, that's the project for the rest of the week before two black friday deals go live πŸ‘
  • k

    kristian

    11/23/2020, 9:57 PM
    if anyone ever wants help w/ stripe + workers stuff though.... πŸ‘€ πŸ‘€ πŸ‘€
  • i

    itsmatteomanf

    11/23/2020, 9:59 PM
    That looks epic @User! What kind of Stripe and Workers stuff?
12345...2509Latest