Hi, just looking into Fly.io for the first time and it looks awesome! Hoping to move our app over.
I was wondering if it was possible to restrict regions that an app gets served from (at least from an API standpoint). A requirement is that all the data stays in Canada and flows only through Canadian servers, even if users access it from the USA/overseas/vpn.
One thing to note is that traffic will usually flow through the nearest fly.io edge when using anycast IPs.
This means that even if you only have servers configured in Canada, if a user from Los Angeles accesses your service their traffic will most likely be directed to fly.io’s lax region where the edge will then tunnel the traffic to your servers in Canada.
Once you do this and re-deploy your app, the fly regions config will become obsolete. If you try to add a new region, you’ll get a message that regions are being controlled with volumes.
I don’t think so-- our network uses Anycast at its edge, which means that all our IPs are announced at all of our PoPs/regions, and will generally respond to requests from a client to the nearest region. You can read a little more about this behavior in this wonderful blog post:
That said, traffic from abroad has to get to your Canadian servers via the Internet one way or another, so I’d guess this really depends on how you’re interpreting ‘flows only through Canadian servers’.
We have another great blog post on how our proxying works that could come in handy here: