# Fly-Instance-Id header alternative for websockets

**URL:** <https://community.fly.io/t/fly-instance-id-header-alternative-for-websockets/7536>\
**Category:** Questions / Help\
**Created:** [September 29, 2022, 5:12pm UTC](https://community.fly.io/t/fly-instance-id-header-alternative-for-websockets/7536 "2022-09-29T17:12:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ignoramous](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@ignoramous](https://community.fly.io/u/ignoramous)\
**Post date:** [September 29, 2022, 5:36pm UTC](https://community.fly.io/t/fly-instance-id-header-alternative-for-websockets/7536/2 "2022-09-29T17:36:16Z")

</div>

> [@mdj](#):
>
> It’s a bit a stretch, but is there a way to target a specific instance using DNS

One could create multiple apps (each get their own IP), and plonk the IPs in any number of DNS `A`/`AAAA`/`HTTPS`/`SVCB` records as you see fit ([1](https://community.fly.io/t/machines-not-responding-to-non-standard-ports/6937/23)).

One could run one server per region, assign them regional IPs, and map those to DNS records ([2](https://community.fly.io/t/multi-region-application-where-users-sessions-are-pinned-to-one-region/7020/5)).

One can run app over multiple Machines (which, for now, each get a fixed public IPv6 address) ([3](https://community.fly.io/t/leftover-dns-records/6319/2)).

Anchor scaling also helps keep public IPv6 stable for _regular_ Fly app instances, but I see references to it have been removed from docs. Anyways, ref: ([4](https://community.fly.io/t/is-it-possible-to-make-scaling-more-deterministic/4117)).

One could route traffic to a set of front-end app instances that then forward it to appropriate back-end app instance:

1. Either connect back-end and front-end instances over `6pn` ([5](https://community.fly.io/t/fly-io-newbie-making-internal-requests-between-apps/5307/3), [6](https://community.fly.io/t/multi-region-application-where-users-sessions-are-pinned-to-one-region/7020/3)).
2. Or, relay traffic with Fly’s HTTP handlers (unlikely to work with websockets, I’d assume) ([7](https://community.fly.io/t/session-affinity-sticky-sessions/638/29)).

---

_[View the full topic](https://community.fly.io/t/fly-instance-id-header-alternative-for-websockets/7536)._
