licitdev / directus-cf-cache

Cache and limit direct access to the data managed on your Directus instance, powered by Cloudflare Workers, Workers KV and Cloudflare Pages.
http://directus-cf-cache.pages.dev
MIT License
29 stars 5 forks source link

Host directus without database on cloudflare? #1

Closed hermesalvesbr closed 2 years ago

hermesalvesbr commented 2 years ago

Would it be possible to host directus inside cloudflare? Using pages or workers? I already use workers with nuxt app. And directus always run in docker on my server.

But hosting directus inside cloudflare would give me a lot of latency gain and it would be quite separate from the database.

Cloudflare pages offers is its dynamic functionality through its integration with Cloudflare [workers.](https://workers.cloudflare.com/) Unlike in Netlify, serverless functions are called workers in Cloudflare.

licitdev commented 2 years ago

Nope, it's currently not possible to host Directus on serverless computing environments like Cloudflare Workers. This project serves to be a cache and does not replace the Directus instance.

In terms of latency gain, the cache reduces the latency for users located far from the Directus instance. These users only have to connect to their nearest Cloudflare PoP. Note: Selecting cache-mode to be cache_priority should speed things up.