https://discord.cloudflare.com logo
Join Discord
Powered by
# durable-objects
  • h

    HardAtWork

    08/06/2021, 2:02 AM
    The change?
  • v

    Vanessa🦩

    08/06/2021, 2:02 AM
    to "jump back" from SJC to LAX
  • v

    Vanessa🦩

    08/06/2021, 2:02 AM
    ... but maybe SJC is now the "authoritative copy"
  • h

    HardAtWork

    08/06/2021, 2:03 AM
    How many times was it triggered in those 13 hours?
  • v

    Vanessa🦩

    08/06/2021, 2:03 AM
    Never. This is the complete log.
  • v

    Vanessa🦩

    08/06/2021, 2:04 AM
    I left out some detail but the last connection in SJC closed at 2021-08-05 03:22:52.283 PDT
  • h

    HardAtWork

    08/06/2021, 2:04 AM
    So, somewhere within those 13 hours, the SJC Instance was terminated. Then, after 13 hours had passed, someone sent a request, initializing a new instance at LAX
  • h

    HardAtWork

    08/06/2021, 2:05 AM
    Not me then.
  • v

    Vanessa🦩

    08/06/2021, 2:05 AM
    no it's in SJC now
  • h

    HardAtWork

    08/06/2021, 2:05 AM
    Sorry, meant the other way around.
    v
    • 2
    • 10
  • i

    ItsWendell

    08/06/2021, 7:17 AM
    Do console logs show up in
    wranger tail
    for durable workers? Doesn't look like it 🤔
  • e

    Erwin

    08/06/2021, 7:25 AM
    DOs that do not have any external state (used the storage API) can be garbage collected and restarted at some other point. But if I am not mistaken we did have an issue in LAX recently, so it may have been a fail-over indeed. And SJC being the copy with the data now. And you are correct in that a DO will not leave the cluster it is currently part of, so it won't move from the US to the EU etc.
  • e

    Erwin

    08/06/2021, 7:35 AM
    No, they do not unfortunately..
  • i

    ItsWendell

    08/06/2021, 7:46 AM
    Is websocket to websocket communication possible from Durable Workers to Workers?
  • h

    HardAtWork

    08/06/2021, 8:16 AM
    Will DO's be able to migrate themselves at some point?
  • e

    Erwin

    08/06/2021, 8:17 AM
    That is certainly part of the vision for DOs, but that won't be part of the first release I would imagine..
  • h

    HardAtWork

    08/06/2021, 8:17 AM
    Probably a bit of finagling to get it GDPR-Compliant...
  • i

    ItsWendell

    08/06/2021, 8:30 AM
    I've tried this in multiple ways now but can't get it to work. In short, I have a worker which manages incoming websocket connections for GraphQL subscriptions. Once a subscription comes in for a specific chatroom, a connection needs to be opened (or forwarded) to that durable object of that specific chatroom. - The fetch method of stubs don't seem to return a webSocket, created and passed down as response on the durable object. - I can't seem to pass a websocket to the durable object Any tips? Is this at all possible?
  • e

    Erwin

    08/06/2021, 8:32 AM
    It is already possible to restrict DOs only to EU colos.. https://developers.cloudflare.com/workers/runtime-apis/durable-objects#restricting-objects-to-a-jurisdiction It isn't possible to automatically migrate a DO after it is created, especially if it has stored data already.
  • e

    Erwin

    08/06/2021, 8:33 AM
    I don't have a lot of experience with the websocket side of things @User, but I feel it should absolutely be possible?
  • h

    HardAtWork

    08/06/2021, 8:33 AM
    On the finagling, I meant getting the auto-migration to be GDPR-Compliant.
  • e

    Erwin

    08/06/2021, 8:34 AM
    Oh no.. that is the easy part for a change 😄 .. the technical challenges are way harder tbh..
  • h

    HardAtWork

    08/06/2021, 8:34 AM
    My brain hurts just thinking about it.
  • e

    Erwin

    08/06/2021, 8:35 AM
    So does mine, so I am glad we have an amazing team working on that tbh.. 😉
  • h

    HardAtWork

    08/06/2021, 8:36 AM
    So when you say it can't auto-migrate, does that mean that if a DO is initialize spawned in the US, but later terminated(Not Wiped), it can never be recreated in Europe?
  • i

    ItsWendell

    08/06/2021, 9:20 AM
    I'm not so sure about that, I think the tricky thing is is that the connection comes starts in the Worker. The Worker creates and start's listening to WebSocket events with the client. Once a websocket event comes in that subscribes to a specific chatroom channel, I need to somehow communicate from the Worker to the Durable Object in real-time. - I can't start a client / server from the Worker since there is no way I can pass the client in a Fetch request to the Durable Object. - I can't start a client / server from the Durable Object, since the response of the durable object with fetch, doesn't include the webSocket.
  • e

    Erwin

    08/06/2021, 9:21 AM
    That is correct. (Assuming it saved something to storage). If it didn’t save something to storage I believe it could.
  • i

    ItsWendell

    08/06/2021, 11:03 AM
    Actually, I think I just made it work 😮
  • i

    ItsWendell

    08/06/2021, 11:52 AM
    Is there are a package / endpoint to make the
    colo
    field more human readable?
  • j

    john.spurlock

    08/06/2021, 12:08 PM
    I believe they are standard IATA airport codes (https://en.wikipedia.org/wiki/IATA_airport_code) but that list posted yesterday (https://speed.cloudflare.com/locations) would be a nice cf-specific endpoint to use, for as long as it's around
1...140141142...567Latest