Latency in simple hello world worker of 150ms?

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

https://service-workers.worker-svc.workers.dev/. https://workers-d1.worker-svc.workers.dev/

What is the issue or error you’re encountering

high latency on a simple hello world worker 150ms even after successufll smart placement , and 450ms on workers connected with d1 on an user example app with 4 entries, to fetch

What steps have you taken to resolve the issue?

how can i reduce these latency ?

What are the steps to reproduce the issue?

click the link and check the response time

I cannot reproduce now. It loads fine and fast for me.
Might be temporary or due to some maintenance/incident in the meantime

What do the Metrics from the Dashboard say? :thinking:

[quote=“fritex, post:2, topic:763628”]
Might be temporary or due to some maintenance/incident in the meantime

here is the smart placement request response

{
    "result": {
        "id": "workers-d1",
        "default_environment": {
            "environment": "production",
            "created_on": "2025-01-28T18:06:10.716495Z",
            "modified_on": "2025-01-30T03:46:47.12291Z",
            "script": {
                "created_on": "2025-01-28T18:06:10.716495Z",
                "modified_on": "2025-01-30T03:46:47.12291Z",
                "id": "workers-d1",
                "tag": "16e9bf5fcf30464b8afb68e2ca19b67f",
                "tags": [],
                "deployment_id": "",
                "tail_consumers": null,
                "logpush": false,
                "observability": {
                    "enabled": true,
                    "head_sampling_rate": null
                },
                "has_assets": false,
                "has_modules": true,
                "etag": "db97df85f1e0558c974a35f04416b1e0936ae0c008595d68ce8d36b71507a3ad",
                "handlers": [
                    "fetch"
                ],
                "placement_mode": "smart",
                "placement_status": "SUCCESS",
                "placement": {
                    "mode": "smart",
                    "status": "SUCCESS"
                },
                "last_deployed_from": "dash",
                "compatibility_date": "2025-01-24",
                "usage_model": "standard"
            }
        },
        "created_on": "2025-01-28T18:06:10.716495Z",
        "modified_on": "2025-01-30T03:46:47.12291Z",
        "usage_model": "",
        "environments": [
            {
                "environment": "production",
                "created_on": "2025-01-28T18:06:10.716495Z",
                "modified_on": "2025-01-30T03:46:47.12291Z"
            }
        ]
    },
    "success": true,
    "errors": [],
    "messages": []
}

im from banglore, India, it shows partially rerouted
can can see the headers remote-NRT and its takes 650ms for d1 query

Several ISP’s from India have very bad routing, and takes the traffic from their customers all the way to e.g. Europe, or other continents, before passing the traffic on to other networks, such as e.g. to Cloudflare.

Mind if I ask, …

What “colo=” do you see on “/cdn-cgi/trace”, from one of these places where you experience the issue?

https://service-workers.worker-svc.workers.dev/cdn-cgi/trace

https://workers-d1.worker-svc.workers.dev/cdn-cgi/trace

1 Like
fl=985f30
h=workers-d1.worker-svc.workers.dev
ip=106.51.92.236
ts=1738224092.818
visit_scheme=https
uag=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
colo=LHR
sliver=none
http=http/2
loc=IN
tls=TLSv1.3
sni=encrypted
warp=off
gateway=off
rbi=off
kex=X25519MLKEM768
fl=985f30
h=service-workers.worker-svc.workers.dev
ip=106.51.92.236
ts=1738224087.604
visit_scheme=https
uag=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
colo=LHR
sliver=none
http=http/2
loc=IN
tls=TLSv1.3
sni=encrypted
warp=off
gateway=off
rbi=off
kex=X25519MLKEM768

im getting colo=LHR

Getting “colo=LHR” means that your ISP is taking your traffic to Europe, where LHR is the airport code for London, United Kingdom.

From what I typically see, such kind of intercontinental routing from India will often guarantee you a minimum of around 140 - 150 ms on the network side alone.

On top of that, you will need to add all the stuff that e.g. your Worker needs to do, such as e.g. fetching from D1, and so forth, which will “delay” it even further.

is there any way that i can take from my side to reduce the latency, like purchasing a paid plan or any other solution which will it reduce the latency ?

i have used Cloudflare WARP, it redused my response time for hello world app from 150ms to 30ms