Workers(Unbound isn't really a thing anymore), while not a dedicated "heavy-compute" solution, gives
Workers(Unbound isn't really a thing anymore), while not a dedicated "heavy-compute" solution, gives you 30 seconds of CPU Time for HTTP(S) requests
-c will do the trick.~91ms by setting the edge config worker to smart placement I guess? But the binding latency is still not 10ms< which I expect since service bindings should run on the same thread / isolate right? In the docs it states:
KV returned error: ${err})worker, workers or workerdworker then browser if there is no workerd key.
-c~91ms10ms<KV returned error: ${err}workerworkerworkersworkerdworkerdbrowserexport const getEdgeCacheVersion = () => {
const startMs = Date.now();
const edgeCv = await getRequestContext().env.EDGE_CONFIG.getEnvironmentVariable("CACHE_VERSION"); // EDGE_CONFIG reads env variable.
// Average durationMs: ~100ms, very rarely actually hits 0, but docs says it should run in the same thread mostly?
const durationMs = Date.now() - startMs;
if (!edgeCv) {
return null;
}
logger.debug("Fetched cache key from EDGE_CONFIG", {
cacheKey: globalThis.__cacheKey,
durationMs: durationMs,
}); //
return Number(edgeCv);
}