Global anycast IP addresses allow traffic to be routed to the nearest StackPath Edge Computing Edge Location, reducing latency and response times for application users.
What is Anycast?
Traffic directed to the anycast IP will enter the StackPath Network at the closest Edge Location, and will then be routed to the nearest location where the workload has instances running. Traffic will be balanced across all instances running in that location but there is no guarantee that this will be even across all instances. This means the anycast IP acts as a pseudo-load balancer, considering both the regional latency of the closest edge to the traffic source as well as spreading traffic across all running instances. At present, this routing logic is non-configurable, has no balance guarantee and there is no advanced balancing logic involved. Future plans include more advanced load balancing functionality.
Example 1: If a Workload is deployed with instances running in Dallas and London, and a visitor makes a request to the anycast IP from London, their traffic will enter the StackPath network in London and hit the instances running in London.
Example 2: If a Workload is deployed with instances running in Dallas only, and a visitor makes a request to the anycast IP from London, their traffic will enter the StackPath Network in London and will then be routed over the StackPath private backbone to hit the instances running in Dallas.
Anycast IPs are billable resources, charged for the duration that they are allocated to a workload.
The IP will be released when the workload is deleted. It is not currently possible to reserve IPs which means that deleting and recreating a workload will usually mean a different IP address will be allocated.
Adding an Anycast IP address
When creating a new Workload, there is an option to add a global anycast IP address.
Ticking this option will allocate an anycast IP address to the workload. All instances will still have their own individual ephemeral IPs allocated but in addition, the anycast IP can be used to route traffic to the entire workload. Anycast IPs can currently only be allocated when a workload is created, not afterward - this will change in the future. The IP will be static for the lifetime of the workload.
If you have any additional question or concerns please feel free to reach out to our 24x7 Support team via chat and we will be happy to help.