Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Running on Cloudflare Workers? #4418

Answered by davidmurdoch
faldonis asked this question in Q&A
Discussion options

You must be logged in to vote

I've done it, however the cold starts were a problem, as workers must load the ganache code from scratch every time, and this sometimes exceeded the amount of time workers are given to start up.

From Cloudflare docs:

A Worker must be able to be parsed and execute its global scope within 200 ms. Script size can impact startup because there’s more code to parse and evaluate.

But if you lazy load ganache (inside the worker handler) it still has problems because of CPU time limits:

A Worker may consume up to 10 milliseconds on the Free plan.

If Ganache can't be parsed and evaluate by Workers within 200ms we certainly won't be able to do it in 10ms!

So this means you'd need use the paid pl…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@faldonis
Comment options

@davidmurdoch
Comment options

@faldonis
Comment options

@davidmurdoch
Comment options

Answer selected by faldonis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants