Using Workers as Reverse Proxy

Hello,

We have to host a Node.js app, static HTML pages and a wordpress blog on same domain in following fashion:

www.domain.com/xyz.html > fetch static website from a webserver like Apache.
www.doimain.com/blog/* > use Wordpress hosted on Apache
www.domain.com/* > Use node.js app

Would you recommend using Cloudflare Workers to implement reverse proxy to achieve above? Is it reliable and scalable with heavy traffic?

Thanks

Yes - this is the most often used application of Workers. And the reason JS (note that Workers do not run node - it’s effectively vanilla JS) was chosen is so that it scales with the scale CF already operates at - see

For your use case, a good starting point is this “conditional routing” recipe https://developers.cloudflare.com/workers/recipes/conditional-routing/ - your if statement doesn’t have to be based on the user agent, it can be based on the URI being /blog or /xyz.html.

1 Like