the fly request header is quite useful, and I’ve been testing it for some gateway-like methods.
One thing I would consider useful is request modification. A good example would be rewriting the target URL of an HTTP request. This way, one could use the entry point app to assemble different apps using namespaces. Before replaying the request to the target instance or app, and the gateway could remove the namespace or add add headers for authentication etc.
Do you think that would be useful as well? Is it technically feasible?
Machine A receives a request. Checks which machine to route to and apply state=foo to the Fly Replay header.
Fly proxy replays to Machine B with Fly-Replay-Src containing state=foo.
By verifying the Fly-Replay-Src header state (which was really a Phoenix.Token) we verified auth was correct and applied it to our Machine B like any other header.
Not really. I know you can hide information in fly-replay-src, but that only works if you are in full control over the receiver processing. Most HTTP headers, some also used for authentication, are standardized and the corresponding programs and libraries use them. For instance, even if I could, I would not modify the URL path handlers in my web framework to search a fly.io specific header, for many reasons (portability, effort, …). Binary, not open source, programs usually can’t be adjusted that way either.