The proxying works fine.
Unfortunately, the proxy returns a 502 when the payload (POSTing a big file) is bigger than 1mb. Accordings to the docs, a workaround is telling the proxy where to route the request by using the fly-prefer-region header, which I do. Still, the request does not reach the target machine and my browser shows the 502 response from the fly proxy.
How can I make this work? Or is it simply not possible to combine instance=XXXX with fly-prefer-region?
the docs for fly-replay explicitly detail a 1-MB limit when using that header, and they specifically mention using fly-prefer-region if you need larger requests handled in a specific region (though for large requests you won’t be able to pick a particular instance).
Did you try using only fly-prefer-region without fly-replay?
Unfortunately, I do need to route the request to a specific machine. My setup / use case is managing lots of differently configured copies of a django app with user storages and I think keeping them all in one fly app is the most reasonable approach.
I am now investigating the complexity of writing my own gateway/proxy application with openresty because the fly-proxy replaying the requests is slow (adds 700ms to each single request, like assets and navigation) and I need more flexibility at the proxy level (fail-over strategy for when a machine won’t auto-start due to insufficient available host memory).