When the instance ID you return in a Fly-Replay header is valid, but the instance doesn’t exist, the connection hangs. It would be great if the connection would either close immediately, or return an HTTP error, so it can be handled client-side.
My personal use case: if the instance is not found, either because it’s been replaced or because it never existed in the first place, I want to communicate it to the user and propose to connect to another (random) instance.
Sidenote: through experimentation, I found that 3 types of IDs are considered valid (or at least, these can hang silently, other strings give you errors in the logs):
- 8 digits hex strings (what you can find in the dashboard, aka the beginning of
$FLY_ALLOC_ID- which is not explicited in the docs)
- 12 digits hex strings (which correspond to machine IDs, as in this official blog post)
- UUIDs (but you cannot send
$FLY_ALLOC_ID, you really need to trim it to the first 8 characters. That confused me for a good while)