Websockets, Workers, and CPU millis question
I was reading about the Websocket Hibernation on Durable Objects [1] as a way to reduce workload and costs. The note there says that this is for server only, not WS clients, which makes sense.
Are there similar strategies for a WS client using something else in the CF product portfolio? If I have an always on WS client, will I be charged for all the CPU milliseconds in a month? Does CF account for how much work my actual worker does vs being idle waiting for a message on a WS connection?
My goal is to have a WS client connect to a remote stream [2] and listen forever, but I don't expect a lot of messages. The remote server is outside of my control and only offers WS streams of events.
[1] https://developers.cloudflare.com/durable-objects/best-practices/websockets/#websocket-hibernation-api
[2] https://developers.cloudflare.com/workers/examples/websockets/#write-a-websocket-client
0 Replies