my Workers KV have very high latency

is it normal? is altime 800ms ~ 1100ms with postman and more than 1000ms with python i'm using Api with bearer auth https://developers.cloudflare.com/api/operations/workers-kv-namespace-read-key-value-pair
Cloudflare API Documentation
Interact with Cloudflare's products and services via the Cloudflare API
4 Replies
DaniFoldi
DaniFoldi16mo ago
Short answer: yes, that feels about right for the API Long answer: if you build your own worker, it'll be considerably faster than via the Cloudflare API, as the API takes a longer path, whereas the worker can run in the colo closest to you
jj8822
jj8822OP16mo ago
thank you for your help, So, to read a kv value, is it inevitable to use a workers request?I had thought that reading directly on the client side would save me a lot of workers requests, economically better
DaniFoldi
DaniFoldi16mo ago
the API is also rate limited to 1200/5 minutes, whereas with Workers there isn't such a limit* - I recommend going with a Worker, you should be fine with bundled, which is a fixed cost, independent of the wall time of the request *there are some, that depend on your plan, DDoS protection, etc etc
jj8822
jj8822OP16mo ago
OK, the reason it's called Workers KV is because we need to go through Workers to use KV. I tried with workers and is so much much faster only 12ms+workers latency
Want results from more Discord servers?
Add your server