Sharing IP addresses for IP space efficiency

This is not a support request but more something that occurred to me.

It’s no secret IPv4 addresses are limited, but if I were to spin up 50 small apps on, I think I’d end up using 50 IPv4 addresses. As someone with modest entirely HTTP oriented needs, I would be quite happy to bundle all of my apps together and have them share a single IPv4 endpoint, since handles the HTTP endpoint anyway… This wouldn’t benefit me exactly, but would mean could use far fewer addresses.

Is this at all desirable or even possible?

One “workaround” for this, if I wanted to do the work myself, might be to spin up a single IPv4 backed app that acts as a proxy to a lot of IPv6-only backend services, but that feels like duplicating the work that fly’s HTTP middleware is already doing. Or maybe it’s not such a bad idea? (Especially if I wanted to centralize logging or something…)

1 Like

you’re 100% right that it’d be quite feasible to build a shared IP feature like you describe. And also on-point about the relative advantages of setting up a load balancer.

It’s a good idea, and it’s something we might do someday. But at the moment, we have ample IPv4 for everyone’s apps, so we haven’t built it yet :slightly_smiling_face:

As an aside, if you haven’t seen it, and are interested in our long-form thoughts about IPv4 scarcity, I’d recommend checking out our “32-bit real-estate” blogpost-- it’s fascinating stuff!


Acknowledged! I wasn’t aware of that post but it made for good reading - thanks! I think I’m just a bit cautious with IPv4 addresses after years of being made to justify them, so I’m keen to keep my usage reasonable but maybe I’ll stop worrying about it until I have tens of apps running :wink: