Throughput varies dramatically in different regions

For Workes & Pages, what is the name of the domain?

https://exchange.xiaoxin-wang.workers.dev/cdn-cgi/trace

What is the error number?

N/A

What is the error message?

N/A

What is the issue or error you’re encountering

throughput in Japan is 20mbps, which it is 120mbps in US

What steps have you taken to resolve the issue?

N/A

What are the steps to reproduce the issue?

I have deployed a trivial websocket server to CF. It just receives messages and discards them.

I have a web socket client, which sends 1024 messages to the worker each time and then calculates the throughput. The message size is 100KB

I have done tests in windows desktops from both the US and Japan regions of AWS. The throughput varies a lot.

in the US region, the throughput is 122 Mbps
in the Japan region, the throughput is 23 Mbps
Can anyone tell why the throughput varies dramatically? I expect the clients could connect the nearest workers and get the same throughput.

Thanks

Does anyone encounter this kind of issue? I am using durable object

A durable object only runs in the location it was created so if you are using the same DO, that would likely be the reason.

See…

1 Like

Thank you. I did do another test. I deploy another web socket server in CF without Durable Object, which does the same thing to the DO one (receive message and discard). The throughput is quite good, about 200+ Mbps while the DO one is 20+ Mbps. So, I think the DO is the one to downgrade the throughput. let me check your document first.

Hi Sjr: As you said, it is the DO location. I tried to set the DO location to APAC, and then JP performance improved while US performance was downgraded.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.