admin管理员组文章数量:1277317
I am using workers to automate geo load balancing between RPC servers running on bare metals behind my domain. I need to load balance between different ports so workers look like to be more flexible option than native load balancing on Cloudflare. The worker code seems to work fine except for the last part which is a forwarding call to one of our bare metal servers by its IP address.
This is what I've done
- I set up my worker to get the region from the request headers and according to that redirect the request to either our US or EU server
- I have a DNS record for the subdomain (
fuel-mainnet.rubynodes.io
) set with Cloudflare Proxy allowed - Servers are being accessed by their IP and port like :123
- I have set Flexible TLS/SSL within a Page rule for our subdomain as our servers are not running on SSL internally (which is fine, the application is a simple RPC server working with public data only)
- The worker is connected to my subdomain (), otherwise I guess I wouldn’t see the error page
- I tried to set the DNS record for
fuel-mainnet.rubynodes.io
pointing either to dummy IP address or with multiple records for the same domain pointing to our backend servers
This is the problematic part of the worker`s code
const newUrl = `http://${backendIP}:${port}${url.pathname}${url.search}`;
// for instance :123/status
const response = await fetch(newUrl, {
method: request.method,
headers: request.headers,
body: request.body
});
// here it fails with 1003
return response;
After this call, I am getting 1003 error which you can verify by either going to or by
curl
.
I tried disabling WAF and tweak other security settings but that didn't solve the issue unfortunately. So the question is how to work with external servers (to Cloudflare) by their IP addresses so I don't have to run any proxy like nginx in front of them.
本文标签: cloudflareGetting 1003 error while using Clouflare Workers for load balancingStack Overflow
版权声明:本文标题:cloudflare - Getting 1003 error while using Clouflare Workers for load balancing - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741251666a2365906.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论