Hi All.
I have a Question regarding the need to update D1 Data every few Seconds.
The Upstash Database as written in the cloudflare documentation allows me to continuously fetch every second/s fresh data from 3rd party API Providers and store it in a distributed low latency database with the possibility to avoid make same call to the api endpoint while a api call is allready processing aka possibility to discard further parallel calls till the ongoing call is finished.
That way i am able and have the possibility when a visitor hit my cloudflare worker website to deliver the data like real time cache without to be exposed to a bottleneck becouse of bad 3rd party API Provider performance.
https://qstash-examples-periodic-data-updates.vercel.app/
My Question is How can i update D1 Database Data every few Seconds from a 3rd party API Provider with the D1 Distributed Database and cloudflare workers ?
The Workers Cron Triggers don’t allow to call a Worker every few seconds.
At the Moment the shortest period is 60 Seconds aka every 1 Minute.
If Workers Cron Triggers could be executed every second this could help a lot but at the moment this is not possible sadly with Cloudflare Workers Cron Triggers.
Is there a SERVERLESS Cloudflare possibility to periodical call workers every few seconds for fetching fresh data from 3rd party API Providers and store it in the D1 distributed database ready for when the visitor hit the cloudflare workers to deliver the data to him to avoid bottleneck problems at the 3rd party API Provider ?
Thanks in Advance for the helpful Answers and Tips.