Finally found a MongoDB ORM that works in Cloudflare Workers

Yep, you’re reading it correctly. Mondel caches the MongoClient at module scope to maximize reuse within the same Worker isolate. Once the isolate gets recycled (cold start / eviction), a new MongoClient (and pool) will be created again — there’s no way around that with plain in-memory caching.

I haven’t benchmarked this yet. It’s open source, so I’d actually love help to validate it - if you’re interested in running a quick benchmark, or sharing your DO-based approach/results, I’m happy to collaborate and document the findings.

1 Like