rufi
rufi
CDCloudflare Developers
Created by rufi on 4/5/2024 in #workers-help
Reverse Proxy syncing config database
Hello! My goal is to keep the internal (in memory) config up-to-date across all workers and propagate the remote db changes effectively. So, I have one Worker acting as a reverse proxy that process requests with fetch. It also includes a scheduled method that makes a call to an external GCloud API and save the response in edge storage (I tried KV, and D1 so far) from time to time. When processing requests, I read from storage (KV, D1...) and check if new config data is available. If so, I replace the config in memory. Then i go on with the request handling (using this latest config data). So far it seems KV provided good results but D1 fails to deliver. I am not sure why but it appears too slow (so the Round trip time increases a lot with D1 because of the wall time). Should D1 work fine? Am i using the right approach? Thanks!
1 replies
CDCloudflare Developers
Created by rufi on 11/25/2023 in #workers-help
wranger 3.15.0+ I get getaddrinfo ENOTFOUND using unstable_dev
Hi! I am using unstable_dev with local = false to do end to end tests. I have been testing, and although it works fine with wranger 3.14.0 and earlier, I get a weird DNS issue with 3.15.0+ and latest versions (including the beta one). FYI it works with local = true. I tried with very minimal wrangler.toml file and it always fail with the same error (even with unnamed worker). It works if I deploy manually using the CLI, however i.e. the published URL works. The domain it is mentioned is existing on the Cloudflare dashboard (it's managed by cloudflare as well).
3 replies