Why every request is making a new isolate?

I have a use case in which I need to warm up the worker with data from KV and setting it to Global variable.

When I am doing multiple curl request to the worker, every request is creating a new isolate and fetching data from KV, but when I hard refresh from browser its serving the request from the same isolate, so request is being served from data stored in Global Variable.

Q1: Is there any specific reason why I am observing a new isolate from curl?
Q2: Does creation of new isolate takes time? Because I am observing a delay of 100 ms between request served from same isolate and a new isolate. It hardly takes 12-20 ms for fetching data from KV. My script size is of around 500KB?

1 Like

You are probably not sending the cfuid cookie, making it go to a maybe different machine in the same POP.

The cold start time is a couple of milliseconds, that delay is not noticeable. Probably the delay depends on it going to a different machine, which adds latency. Maybe @KentonVarda can dig in?