You can make requests from servers that you have explicitly declared in your configuration beforehand. In other words, what you request can be dynamic, but not from where.
If a request comes in for
/something you can send the request to help fulfil it to any one of your pre-configured backend hosts, but it doesn’t have to be for the same path. In VCL you can make the request be sent to
my-origin-server2.example.com/something-different. As long as you were careful not to stomp on the cache key (so you didn’t end up storing different things for the same request, which would also make purging difficult) it’d be OK.
And that takes me to a related subject: if you are really making dynamic choices as to what to serve a user based on something, and different responses could be cached for the same cache key (usually
Host header + path/query string) you should be using the
Vary header to signal to the cache that a particular header should also be taken into account when storing content for that Host/path combination. See here for more on this.
So, if I’m understanding you correctly, the answer is ‘yes’, but I’d add ‘be careful!’.