Fly-Replay Headers Completely Ignored

I am trying to implement an HTTP service and leverage the “fly-replay” header, to select a specific machine to process the request.

When I run the following command:

curl -H "Fly-Replay: instance=e824510b7025a9"

I receive a response from the server, but the machine selection is not performed:

I have checked the incoming headers to the service, and it correctly receives the header. However, comparing the FLY_MACHINE_ID in the environment variables, sometimes it matches, and sometimes it does not, proving that no machine selection request is being handled. I tried entering incorrect values, e.g., non-existent machines, and I do not receive any error.

I have tried with lowercase “fly-replay” with the same result

Here is the fly.toml:

app = 'my-service'
primary_region = 'iad'


auto_start_machines = true
auto_stop_machines = true
force_https = true
internal_port = 3000
min_machines_running = 0
processes = ['app']

cpu_kind = 'shared'
cpus = 1
memory_mb = 1024

Try fly-force-instance-id instead.

Fly-Replay is looked for in responses, not requests.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.