Does Cloudflare enforce size limits on subrequest responses?
I'm currently deciding between sending all necessary data in the worker request payload or only sending an identifier and retrieving the data via a subrequest from an external API.
I'm not overly concerned about the additional latency, so I'd prefer to avoid the request size limit even if it means a slight delay. However, I need to understand if there are any size limitations on the responses from subrequests.
The documentation mentions that Cloudflare doesn't enforce response size limits, but it's unclear if this applies solely to worker responses or also includes the responses from worker subrequests. Can anyone clarify this?
1 Reply
oh I see, so then the only way to ensure I don't hit it is ensuring each subrequest response uses less than the available memory and maybe even serializing requests and avoid concurrency if possible. But then of course, I'd increase the risk of hitting the time limits of the worker 🤔