Using Workers to ingest WebSocket data

Hi all.

I’ve been playing around with Workers for a few weeks and been enjoying my experience immensely. However, I’ve recently encountered a use-case which I can’t find a solution to in the documentation.

I’d like to ingest data from an external websocket server and make requests to external webhooks based on the content. The operations I’m doing on this are quite simple and I’ve gotten it somewhat working using a Durable Object. However, it seems like I’m running into CPU time limits, since this only works for a few requests before eventually stopping.

I’ve seen documentation for workers that tout their (experimental) websocket capabilities; however, all of the documentation is focused on incoming websocket connections, and I am trying to achieve the opposite here. There is some rudimentary documentation on establishing a websocket connection, but details are light about limitations.

If Workers support receiving websockets and do not timeout, it seems reasonable to expect that I can do the reverse.

Is this a supported use-case for Workers/Durable Objects? If so, how can I make this happen?

Thanks!