RFC 4786
Operation of Anycast Services
RFC 4786 ๐โจ (BCP 126) โ Operation of Anycast Services, part 1 of 5 ๐
- Title: Operation of Anycast Services ๐ฆ
- Authors: J. Abley (Afilias Canada) and K. Lindqvist (Netnod Internet Exchange) ๐งโ๐ป๐ฉโ๐ป
- Category: Best Current Practice (BCP: 126) ๐
- Date: December 2006 ๐
- Obsoletes / Updates: the title block doesn't list anything it obsoletes or updates ๐
Status of This Memo ๐๏ธ
okay bestie, this one is a Best Current Practice for the Internet Community ๐ธ It's basically a "here's how we do it well right now" guide, and it's open for discussion and suggestions for improvements ๐ฌ Anyone can share it freely, no cap ๐ซถ
Copyright Notice ยฉ๏ธ
The IETF Trust owns the copyright on this one, and the year is 2006 ๐
Abstract ๐
So the internet keeps getting bigger, and more systems and services inside companies are becoming super common too ๐ That means a lot of services now need to be really available, like always-on available ๐ญ Those demands make the infrastructure underneath them need to be more reliable, which is a lot of pressure ๐
People have tried all kinds of tricks to keep services available on the internet ๐ฅ This document is a sort of commentary-and-recommendations piece about spreading services out using anycast ๐
Table of Contents ๐
1. Introduction ....................................................3
2. Terminology .....................................................4
3. Anycast Service Distribution ....................................5
3.1. General Description ........................................5
3.2. Goals ......................................................5
4. Design ..........................................................6
4.1. Protocol Suitability .......................................6
4.2. Node Placement .............................................7
4.3. Routing Systems ............................................8
4.3.1. Anycast within an IGP ...............................8
4.3.2. Anycast within the Global Internet ..................9
4.4. Routing Considerations .....................................9
4.4.1. Signalling Service Availability .....................9
4.4.2. Covering Prefix ....................................10
4.4.3. Equal-Cost Paths ...................................10
4.4.4. Route Dampening ....................................12
4.4.5. Reverse Path Forwarding Checks .....................13
4.4.6. Propagation Scope ..................................13
4.4.7. Other Peoples' Networks ............................14
4.4.8. Aggregation Risks ..................................14
4.5. Addressing Considerations .................................15
4.6. Data Synchronisation ......................................15
4.7. Node Autonomy .............................................16
4.8. Multi-Service Nodes .......................................17
4.8.1. Multiple Covering Prefixes .........................17
4.8.2. Pessimistic Withdrawal .............................17
4.8.3. Intra-Node Interior Connectivity ...................18
4.9. Node Identification by Clients ............................18
5. Service Management .............................................19
5.1. Monitoring ................................................19
6. Security Considerations ........................................19
6.1. Denial-of-Service Attack Mitigation .......................19
6.2. Service Compromise ........................................20
6.3. Service Hijacking .........................................20
7. Acknowledgements ...............................................21
8. References .....................................................21
8.1. Normative References ......................................21
8.2. Informative References ....................................21
1. Introduction ๐
This doc is written for network operators who are thinking about deploying or running a distributed service with anycast ๐ It explains the best current practice for doing that, but it does not say whether any particular service should or should not use anycast ๐คทโโ๏ธ That part is on you, bestie ๐
So here's the basic idea ๐ฆ To distribute a service with anycast, you first tie the service to a stable set of IP addresses. Then you advertise reachability to those addresses in a routing system from several independent service nodes ๐ธ There are a few different techniques for this, and they're covered in [RFC1546], [ISC-TN-2003-1], and [ISC-TN-2004-1] โจ
The techniques and considerations in this doc apply to services reachable over both IPv4 and IPv6 ๐
Anycast has been getting super popular for adding redundancy to DNS servers ๐ฅ It works alongside the redundancy the DNS architecture already has built in ๐ Several root DNS server operators have spread their servers all over the internet, and both resolver and authority servers are often distributed inside service provider networks ๐ฐ๏ธ Commercial DNS authority server operators have been using anycast distribution for several years now ๐ Anycast isn't limited to DNS, though. Using it does put some extra limits on the service being distributed, like transaction longevity, transaction state held on servers, and data synchronisation capabilities ๐
Okay, the scary part: anycast is conceptually simple, but actually running it comes with some pitfalls ๐ญ For example, monitoring whether the service is up gets harder. The availability you see depends on where the client is in the network, and which clients end up at which anycast nodes is neither static nor reliably deterministic ๐
This document covers using anycast for both local scope distribution of services, using an Interior Gateway Protocol (IGP), and global distribution, using the Border Gateway Protocol (BGP) [RFC4271] ๐ Monitoring and data synchronisation issues are mostly shared between the two, but the deployment issues are pretty different ๐ซถ
2. Terminology ๐
Service Address: an IP address tied to a particular service (for example, the destination address DNS resolvers use to reach a particular authority server) ๐ท๏ธ
Anycast: the practice of making a particular Service Address available in multiple, discrete, autonomous locations, so that datagrams sent to it get routed to one of the several available locations ๐ฆ
Anycast Node: an internally-connected collection of hosts and routers that together provide service for an anycast Service Address ๐ง An Anycast Node could be as simple as one host taking part in a routing system with adjacent routers, or it could be a bunch of hosts connected in a fancier way. Either way, to the routing system carrying the anycast, each Anycast Node presents a unique path to the Service Address โจ The whole anycast system for a service is made up of two or more separate Anycast Nodes ๐ฏ
Catchment: in physical geography, this is an area drained by a river, also called a drainage basin ๐ By analogy, in this document it means the topological region of a network where packets aimed at an Anycast Address get routed to one particular node ๐
Local-Scope Anycast: reachability information for the anycast Service Address is propagated through a routing system in such a way that a particular anycast node is only visible to a subset of the whole routing system ๐
Local Node: an Anycast Node providing service using a Local-Scope Anycast Address ๐ก
Global-Scope Anycast: reachability information for the anycast Service Address is propagated through a routing system in such a way that a particular anycast node is potentially visible to the whole routing system ๐
Global Node: an Anycast Node providing service using a Global-Scope Anycast Address ๐
3. Anycast Service Distribution ๐
3.1. General Description ๐ซ
Anycast is the name for making a Service Address available to a routing system at Anycast Nodes in two or more discrete locations ๐ The service each node provides is usually consistent no matter which node the routing system picks for a given request. Some services might benefit from deliberate differences in how individual nodes behave, so they can do locality-specific stuff, but that's an exception (see Section 4.6) ๐ง
For services distributed with anycast, there's no inherent need for referrals to other servers, or for name-based distribution ("round-robin DNS") ๐ Those techniques could be combined with anycast if an application really needed them ๐ The routing system decides which node handles each request, based on how the routing system is designed and where in the network the request starts ๐บ๏ธ
The Anycast Node that ends up handling a particular query can be influenced by the traffic engineering features of the routing protocols that make up the routing system ๐๏ธ How much control the node's operator has depends on how big the routing system is that the Service Address is anycast through ๐
Load-balancing between Anycast Nodes is typically hard to pull off, since load between nodes is usually unbalanced in terms of requests and traffic ๐ฉ Spreading load between nodes for reliability can often be done, though, and so can coarse-grained load spreading to help popular services scale ๐
The routing system a service is anycast through can be anything from a small Interior Gateway Protocol (IGP) connecting a handful of components, all the way up to the Border Gateway Protocol (BGP) [RFC4271] connecting the global internet ๐ Which one you use depends on what kind of service distribution you need ๐ฆ
โฏ to be continued in part 2 ๐
3.2. Goals โจ
okay so a service can be anycast for a bunch of different reasons ๐ Here are the common goals people go for:
- Coarse ("unbalanced") distribution of load across nodes ๐ธ This lets the infrastructure grow to handle more queries and survive sudden spikes in traffic ๐
- Mitigating non-distributed denial-of-service attacks by keeping the damage contained to single Anycast Nodes ๐ก๏ธ
- Constraining distributed denial-of-service attacks or flash crowds so they stay local to the regions around Anycast Nodes ๐ Anycast also means traffic can get handled closer to where it came from, maybe over high-performance peering links instead of oversubscribed, paid transit circuits ๐ธ
- Getting extra info about where traffic is coming from when attack (or query) traffic uses spoofed source addresses ๐ต๏ธโโ๏ธ This works because of a property of anycast: which Anycast Node picks up a given query can be tied to where the request topologically came from ๐งญ
- Improving query response time by cutting the network distance between client and server with a local Anycast Node โก How much faster things get depends on how the routing system picks nodes for clients. Being topologically close inside the routing system doesn't generally line up with round-trip performance across the network, so in some cases response times see no reduction, and they may even go up ๐ญ
- Turning a list of servers into one distributed address ๐ For example, a huge number of authoritative nameservers for a zone can be deployed behind a small set of anycast Service Addresses. This makes zone data easier to reach in the DNS without making the referral response from the parent zone's nameserver any bigger ๐ง
4. Design ๐
4.1. Protocol Suitability ๐ฆ
When a service is anycast between two or more nodes, the routing system is the one making the node selection decision on the client's behalf ๐ค A single client-server interaction is usually required to happen between a client and the same server node for the whole transaction. So the routing system's node selection ought to stay stable for a lot longer than the transaction takes, if the service is going to be reliable ๐ซถ
Some services have super short transactions, and they might even be done with one request packet and one reply packet (think DNS transactions over UDP transport) โก Other services have way longer-lived transactions, like bulk file downloads and audio-visual media streaming ๐ฌ
Services can be anycast inside very predictable routing systems that stay stable for long stretches, like anycast within a well-managed and topologically-simple IGP, where node selection only changes when a node fails ๐ Other deployments are way less predictable (see Section 4.4.7) ๐ฌ
The stability of the routing system and the transaction time of the service should be carefully compared when you're deciding whether a service is suitable for anycast distribution ๐ In some cases, for new protocols, it might be practical to split a large transaction into an initialisation phase handled by anycast servers, and a sustained phase handled by non-anycast servers, maybe picked during that initialisation phase ๐งฉ
This document deliberately avoids prescribing which protocols or services are suitable for anycast distribution. Trying to do that would be presumptuous ๐
Operators should be aware that, especially for long running flows, anycast can have potential failure modes that are more complex than a simple 'destination unreachable' failure with unicast ๐
4.2. Node Placement ๐
Where Anycast Nodes should be placed depends a lot on what the service distribution is trying to achieve ๐ฏ For example:
- A DNS recursive resolver service might be distributed within an ISP's network, with one Anycast Node per site ๐
- A root DNS server service might be distributed throughout the Internet. Anycast Nodes could be put in regions with poor external connectivity, so DNS keeps working well enough within the region during external network failures ๐ง๏ธ
- An FTP mirror service might include local nodes at exchange points, so ISPs connected to that exchange point can download bulk data more cheaply than if they had to use expensive transit circuits ๐ฐ
In general, node placement decisions should take into account the likely traffic requirements, the potential for flash crowds or denial-of-service traffic, the stability of the local routing system, and the failure modes around node failure or local routing system failure ๐ง
4.3. Routing Systems ๐ค๏ธ
4.3.1. Anycast within an IGP ๐ก
There are several common reasons to distribute a Service Address within the scope of an IGP:
- to improve service response times by hosting a service close to other users of the network;
- to improve service reliability by providing automatic fail-over to backup nodes; and
- to keep service traffic local so it doesn't congest wide-area links ๐ฆ
In each case, network engineers can make the decisions about where and how services are provisioned without needing operational complexities like regional variances in the configuration of client computers, or deliberate DNS incoherence (where DNS queries return different answers depending on where they came from) ๐ โโ๏ธ
When a service is anycast within an IGP, the same organisation that provides the service typically controls the routing system ๐ So the relationship between service transaction characteristics and network stability is likely to be well-understood. This technique is therefore usable for a larger number of applications than Internet-wide anycast service distribution (see Section 4.1) โจ
An IGP generally has no inherent restriction on the length of prefix that can be introduced to it. So there's no need to build a covering prefix for particular Service Addresses. Host routes corresponding to the Service Address can be introduced to the routing system instead ๐งโโ๏ธ See Section 4.4.2 for more discussion of the requirement for a covering prefix.
IGPs often have little or no aggregation of routes, partly because of the algorithmic complexity of supporting aggregation. In many networks' IGPs there's little motivation for aggregation, since the amount of routing information carried in the IGP is small enough that scaling concerns in routers don't come up ๐คทโโ๏ธ For a discussion of aggregation risks in other routing systems, see Section 4.4.8.
By reducing the scope of the IGP to just the hosts providing the service (together with one or more gateway routers), this technique can be applied to building server clusters ๐ฅ๏ธ This application is discussed in some detail in [ISC-TN-2004-1].
4.3.2. Anycast within the Global Internet ๐
Service Addresses may be anycast within the global Internet routing system to spread services across the entire network ๐ The main differences between this and the IGP-scope distribution discussed in Section 4.3.1 are:
- the routing system is, in general, controlled by other people; and
- the routing protocol concerned (BGP), along with commonly-accepted practices in its deployment, imposes some additional constraints (see Section 4.4) ๐ง
4.4. Routing Considerations ๐งญ
4.4.1. Signalling Service Availability ๐ฃ
When a routing system gets reachability information for a Service Address from an individual node, packets addressed to that Service Address will start arriving at the node ๐ฆ Since it's essential for the node to be ready to accept requests before they start arriving, it's desirable to couple the routing information to the availability of the service at a particular node ๐
When a routing advertisement from a node corresponds to a single Service Address, this coupling might look like this: the service becoming available triggers the route advertisement, and the service becoming unavailable triggers a route withdrawal ๐ This can be done with routing protocol implementations on the same server. These implementations provide the service being distributed, and they're configured to advertise and withdraw the route in step with the availability (and health) of the software on the host that processes service requests ๐ซง An example of this arrangement for a DNS service is included in [ISC-TN-2004-1].
When a routing advertisement from a node corresponds to two or more Service Addresses, it may not be appropriate to trigger a route withdrawal just because one service is unavailable ๐ค Another approach, when the service is down at one Anycast Node, is to route requests to a different Anycast Node where the service is working normally ๐ This approach is discussed in Section 4.8.
Rapid advertisement/withdrawal oscillations can cause operational problems ๐ตโ๐ซ So nodes should be configured to avoid rapid oscillations (for example, by implementing a minimum delay after a withdrawal before the service can be re-advertised) โณ See Section 4.4.4 for a discussion of route oscillations in BGP.
4.4.2. Covering Prefix ๐ง
In some routing systems (like the BGP-based routing system of the global Internet), you generally can't propagate a host route and be confident it'll reach the whole network ๐ฅบ This comes down to operational policy, not a protocol restriction.
So in those cases you need to propagate a route that covers the Service Address, with a prefix short enough that it won't be thrown out by commonly-deployed import policies ๐ For IPv4 Service Addresses this is often a 24-bit prefix. There are other well-documented examples of IPv4 import policies that filter on Regional Internet Registry (RIR) allocation boundaries, so some experimentation may be prudent ๐งช Corresponding import policies for IPv6 prefixes also exist. See Section 4.5 for more discussion of IPv6 Service Addresses and corresponding anycast routes ๐ธ
Propagating a single route per service has some associated scaling issues, which are discussed in Section 4.4.8 ๐
When multiple Service Addresses are covered by the same covering route, there's no longer a tight coupling between advertising that route and the individual services behind the covered host routes ๐งต The resulting impact on signalling the availability of individual services is discussed in Section 4.4.1 and Section 4.8.
4.4.3. Equal-Cost Paths โจ
okay bestie, so some routing systems can send traffic to the same destination over equal-cost paths ๐ฃ๏ธ and that's where things get spicy. If those equal-cost paths lead to different Anycast Nodes, then different request packets from the same transaction could end up at more than one node ๐ญ. Services over TCP [RFC0793] are especially exposed to this, because the TCP setup handshake means a transaction is made up of multiple request packets from the start ๐ซถ.
For services spread across the global Internet using BGP, equal-cost paths are normally not a consideration ๐ . BGP's exit selection algorithm usually picks a single, consistent exit for a single destination, even when several candidate paths exist. Implementations of BGP do exist that support multi-path exit selection, though ๐ฆ.
Equal-cost paths are commonly supported in IGPs ๐ธ. Multi-node selection for a single transaction can be avoided in most cases by being careful with IGP link metrics, or by using equal-cost multi-path (ECMP) selection algorithms, which cause a single node to be selected for a single multi-packet transaction ๐. For an example of hash-based ECMP selection in anycast service distribution, check out [ISC-TN-2004-1] ๐ค.
Other ECMP selection algorithms are also commonly available, including ones where packets from the same flow are not guaranteed to go to the same destination ๐. ECMP algorithms that pick a route per packet instead of per flow are commonly called "Per Packet Load Balancing" (PPLB) โจ.
With respect to anycast service distribution, some uses of PPLB may cause different packets from a single multi-packet transaction sent by a client to land on different Anycast Nodes, which effectively makes the anycast service unavailable ๐. Whether this affects a specific anycast service depends on how and where Anycast Nodes are deployed in the routing system, and on where the PPLB is happening ๐:
- PPLB across multiple, parallel links between the same pair of routers should cause no node selection problems ๐;
- PPLB across diverse paths within a single autonomous system (AS), where the paths converge to a single exit as they leave the AS, should cause no node selection problems ๐;
- PPLB across links to different neighbour ASes, where the neighbour ASes have selected different nodes for a particular anycast destination will, in general, cause request packets to be distributed across multiple Anycast Nodes. This will have the effect that the anycast service is unavailable to clients downstream of the router performing PPLB ๐ญ.
The uses of PPLB that have the potential to interact badly with anycast service distribution can also cause persistent packet reordering ๐. A network path that persistently reorders segments will degrade the performance of traffic carried by TCP [Allman2000]. According to several documented measurements, TCP accounts for the bulk of traffic carried on the Internet ([McCreary2000], [Fomenkov2004]) ๐. So, in many cases, it's reasonable to consider networks making that kind of PPLB use to be pathological ๐ โโ๏ธ.
4.4.4. Route Dampening ๐
Frequent advertisements and withdrawals of individual prefixes in BGP are known as flaps ๐ฆ. Rapid flapping can lead to CPU exhaustion on routers quite far from the source of the instability, which is why rapid route oscillations are often "dampened", as described in [RFC2439] ๐ฉ.
A dampened path gets suppressed by routers for an interval that grows with how often the oscillation is observed, and a suppressed path will not propagate ๐ง. So a single router can stop a flapping prefix from spreading across an autonomous system, which protects the other routers in the network from the instability ๐ก๏ธ.
Some implementations of flap dampening penalise oscillating advertisements based on the observed AS_PATH, rather than on Network Layer Reachability Information (NLRI; see [RFC4271]) ๐ค. This means network instability that causes route flapping from a single Anycast Node will not generally cause advertisements from other nodes (which have different AS_PATH attributes) to be dampened by those implementations ๐.
To limit the chance of such implementations penalising advertisements from different Anycast Nodes because of oscillations from just one node, care should be taken to make the AS_PATH attributes on routes from different nodes as diverse as possible ๐. For example, Anycast Nodes should use the same origin AS for their advertisements, but might have different upstream ASes ๐ .
Where different implementations of flap dampening are common, one node's instability may cause stable nodes to become unavailable ๐ฑ. To help with that, the following measures may be useful:
- Carefully deploying Local Nodes alongside especially stable Global Nodes (with high inter-AS path splay, redundant hardware, power, etc.) may help keep oscillation problems inside the Local Nodes' limited regions of influence ๐ก;
- Aggressive flap-dampening of the service prefix close to the origin (e.g., within an Anycast Node, or in adjacent ASes of each Anycast Node) may also help reduce the chance that remote ASes see oscillations at all ๐ฅ.
4.4.5. Reverse Path Forwarding Checks ๐
Reverse Path Forwarding (RPF) checks, first described in [RFC2267], are commonly deployed as part of ingress interface packet filters on routers across the Internet, so that packets with spoofed source addresses get denied (see also RFC 2827 [RFC2827]) ๐ต๏ธโโ๏ธ. Deployed RPF implementations come with several modes of operation (e.g., "loose" and "strict") ๐๏ธ.
Some RPF modes can deny non-spoofed packets when they come from multi-homed sites, since the selected paths might legitimately not match the ingress interface of those non-spoofed packets ๐ฌ. This issue is discussed in [RFC3704] ๐.
A collection of Anycast Nodes spread across the Internet looks pretty much like a distributed, multi-homed site to the routing system ๐. So this risk also exists for Anycast Nodes, even when individual nodes aren't multi-homed ๐ซ . Care should be taken to make sure each Anycast Node is treated as a multi-homed network, and that the matching recommendations in [RFC3704] about RPF checks are followed ๐ซถ.
4.4.6. Propagation Scope ๐ฃ
In the context of anycast service distribution across the global Internet, Global Nodes are the ones that can provide service to clients anywhere in the network ๐. Reachability information for the service is propagated globally, without restriction, by advertising the routes covering the Service Addresses for global transit to one or more providers ๐.
More than one Global Node can exist for a single service (and honestly this is often the case, for redundancy and load-sharing) ๐.
On the other hand, sometimes it's desirable to deploy an Anycast Node that only serves a local catchment of autonomous systems, and that is deliberately not available to the entire Internet ๐๏ธ. Such nodes are called Local Nodes in this document ๐ง. One example of when a Local Node might be a good fit is a node designed to serve a region with rich internal connectivity but unreliable, congested, or expensive access to the rest of the Internet ๐ธ.
Local Nodes advertise covering routes for Service Addresses in a way that restricts their propagation ๐. This might be done using well-known community string attributes such as NO_EXPORT [RFC1997] or NOPEER [RFC3765], or by arranging with peers to apply a conventional "peering" import policy instead of a "transit" import policy, or some suitable combination of these measures ๐.
Advertising reachability to Service Addresses from Local Nodes should ideally be done using a routing policy that requires explicit attributes for propagation, rather than relying on implicit (default) policy ๐ . Accidentally letting a route leak beyond its intended horizon can cause capacity problems for Local Nodes, which might degrade service performance network-wide ๐ต.
4.4.7. Other Peoples' Networks ๐
When anycast services are deployed across networks run by others, their reachability depends on routing policies and topology changes (planned and unplanned) ๐ข. These are unpredictable and sometimes hard to identify ๐ซฃ. Since the routing system may include networks operated by multiple, unrelated organisations, unforeseen interactions can also happen when unrelated changes combine ๐คฏ.
The stability and predictability of such a routing system should be taken into consideration when assessing whether anycast is suitable as a distribution strategy for particular services and protocols (see also Section 4.1) ๐.
To help manage this, routing policies used by Anycast Nodes across such routing systems should be conservative ๐ง. Individual nodes' internal and external/connecting infrastructure should be scaled to support loads far in excess of the average ๐ช. And the service should be monitored proactively from many points, so you avoid unpleasant surprises (see Section 5.1) ๐.
4.4.8. Aggregation Risks ๐
Propagating a single route for each anycast service doesn't scale well in routing systems where carrying routing information is a concern, and where there are potentially many services to distribute ๐ฉ. For example, an autonomous system that provides services to the Internet with N Service Addresses covered by a single exported route would need to advertise (N+1) routes, if each of those services were distributed using anycast ๐งฎ.
The common practice of applying minimum prefix-length filters in import policies on the Internet (see Section 4.4.2) means that for a route covering a Service Address to be usefully propagated, the prefix length has to be substantially shorter than what would be needed to advertise just the host route ๐. Widespread advertisement of short prefixes for individual services therefore also hurts address conservation ๐ .
Both of these issues can be eased to some extent by using a single covering prefix to hold multiple Service Addresses, as described in Section 4.8 ๐งฉ. This does mean decoupling the route advertisement from individual service availability (see Section 4.4.1), though, which comes with risks to the stability of the service as a whole (see Section 4.7) โ ๏ธ.
In general, the scaling problems described here stop anycast from being a useful, general approach for service distribution on the global Internet ๐ซ. It's still a useful technique for distributing a limited number of Internet-critical services, and in smaller networks where these aggregation concerns don't apply ๐.
4.5. Addressing Considerations โจ
okay so first things first, bestie: a Service Address should be unique within the routing system that connects all Anycast Nodes to all possible clients of the service ๐ซถ It also has to be picked so that the matching routes are actually allowed to spread around inside that routing system. no routes, no service, no cap ๐ญ
For an IPv4-numbered service running across the Internet, you might grab an address from a block where the minimum RIR allocation size is 24 bits ๐ธ Then reachability can come from originating the covering 24-bit prefix. it's giving tidy, honestly ๐
For an IPv4-numbered service running inside a private network, you might pick a locally-unused [RFC1918] address ๐ Then you can signal reachability to it with a (32-bit) host route. very main character energy for a private setup ๐ฆ
For IPv6-numbered services, Anycast Addresses are not scoped any differently from unicast addresses ๐ So the address-suitability guidelines we just talked about for IPv4 also apply to IPv6. And get this, the old rules that banned anycast distribution of services over IPv6 were removed from the IPv6 addressing spec in [RFC4291]. the way that's been cleaned up is so iconic โจ
4.6. Data Synchronisation ๐
Some services have been rolled out in a localised form, where people in certain regions get regionally-relevant content ๐ But lots of services are meant to give consistent answers no matter where the request comes from ๐ For a service that's distributed with anycast, that means different Anycast Nodes have to behave in a consistent manner. And if that consistent behaviour depends on a data set, then that data has to be synchronised between the nodes ๐ซถ
How the data gets synchronised depends on what the service is. Some examples are zone transfers for authoritative DNS servers, and rsync for FTP archives ๐ง In general, synchronising data between Anycast Nodes involves transactions happening between non-anycast addresses. so the sync traffic is its own little side-quest ๐
Synchronising data across public networks should be done with proper authentication and encryption ๐ no skipping that step, bestie ๐
4.7. Node Autonomy ๐
If you're deploying anycast because you want better reliability through redundancy, you really want to make sure one defect can't take down many (or all) of your nodes ๐ญ You also don't want one node failing to cause a cascading failure that knocks out the next node, and the next, until the whole service is defeated ๐
The trick is to avoid co-dependencies by making each node as autonomous and self-sufficient as it can be โจ How well nodes can survive failures elsewhere depends on the service itself. But for services that can handle disconnected operation, like the timed propagation of changes between master and slave servers in the DNS, you can get a really high degree of autonomy ๐
Cascading failure from load can also get less likely if you deploy both Global and Local Nodes for a single service ๐ That's because the effective fail-over path for traffic is generally from Local Node to Global Node. Traffic that might sink one Local Node is unlikely to sink all of the Local Nodes, except in the most degenerate cases ๐
The chance of cascading failure from a software defect in an operating system or server can often be reduced by running different implementations of the operating system, server software, routing protocol software, and so on ๐ธ That way, a defect in one component doesn't take down the whole system. diversity is everything, periodt ๐ฆ
Just so you know, these approaches to node autonomy are, to different degrees, kind of at odds with the practical goal of making a deployed service easy to operate ๐ A service that's overly complex is more likely to suffer from operator error than one that's simpler to run. So give all of these aspects careful thought so you can strike an appropriate balance โ๏ธ
4.8. Multi-Service Nodes ๐
For a service distributed across a routing system where covering prefixes are required to announce reachability to a single Service Address (see Section 4.4.2), things get extra spicy when multiple services need to be distributed across one set of nodes ๐ถ๏ธ That's because you have to signal the availability of each individual service to the routing system, so requests don't land on nodes that can't process them (see Section 4.4.1). it's the whole vibe check ๐
Several approaches are described in the following sections ๐ง
4.8.1. Multiple Covering Prefixes
Each Service Address is chosen so that only one Service Address is covered by each advertised prefix ๐ Advertising and withdrawing a single covering prefix can then be tightly coupled to the availability of that one associated service ๐ซถ
This is the most straightforward approach ๐ธ But it makes very poor use of globally-unique addresses, so it's only suitable for a small number of critical, infrastructural services, like root DNS servers ๐ Deploying services Internet-wide with this approach will not scale. not me saying "it's not scaling" ๐
4.8.2. Pessimistic Withdrawal
Multiple Service Addresses are chosen so they're all covered by a single prefix ๐ฆ The advertisement and withdrawal of that single covering prefix is coupled to the availability of all the associated services. if any individual service goes unavailable, the covering prefix gets withdrawn ๐ญ
The tricky part is that all Service Addresses have to be available for this to work. The announcement needs to be triggered by the presence of all the component routes, not just a single covered route ๐งฉ
Here's the catch: one malfunctioning service takes every deployed service on that node offline ๐ That might make this approach unsuitable for lots of applications ๐
4.8.3. Intra-Node Interior Connectivity
Multiple Service Addresses are chosen so they're covered by a single prefix ๐ This time, the advertisement and withdrawal of the covering prefix is coupled to the availability of any one service. Nodes have interior connectivity, for example using tunnels ๐ Host routes for Service Addresses are distributed using an IGP that extends to include routers at all nodes ๐บ๏ธ
If a service is unavailable at one node but available at other nodes, a request may be routed over the interior network from the receiving node towards some other node for processing ๐
Now the spicy bit: if some local services in a node are down and the node is disconnected from other nodes, continuing to advertise the covering prefix might make requests get black-holed ๐ณ๏ธ yikes ๐ญ
This approach gives reasonable address utilisation of the netblock covered by the announced prefix. the cost is reduced autonomy for individual nodes, since the IGP that all nodes participate in can be viewed as a single point of failure ๐ฅฒ
4.9. Node Identification by Clients ๐
From time to time, all clients of deployed services run into problems, and those problems need diagnosing ๐ฉบ A service distributed using anycast adds one extra variable to that diagnostic process compared to a simple unicast service: which particular Anycast Node is handling the client's request ๐ค
Sometimes common network-level diagnostic tools, like traceroute, are enough to figure out which node a client is using ๐บ๏ธ But those tools can be beyond what users on the client side of a transaction are able to do. Plus, network conditions can change by the time anyone gets around to using the tools, so the evidence is gone ๐จ
Troubleshooting anycast services gets SO much easier if mechanisms for identifying a node are designed right into the protocol ๐ซถ Examples include the NSID option in DNS [NSID], and the common practice of including hostname information in an SMTP server's initial greeting at session initiation [RFC2821] ๐ฌ
Providing these kinds of in-band mechanisms for node identification is strongly recommended for services distributed using anycast ๐
5. Service Management ๐
5.1. Monitoring ๐
Monitoring a distributed service is more complex than monitoring a non-distributed one ๐ง The reason is that the observed accuracy and availability of the service can be different depending on which part of the network the clients are attached to. And when a problem pops up, it isn't always obvious which node served the request, and so which node is misbehaving ๐ต๏ธโโ๏ธ
It's recommended that distributed services are monitored from probes spread representatively across the routing system ๐ Wherever possible, record the identity of the node answering each request alongside the performance and availability statistics ๐ The RIPE NCC DNSMON service [DNSMON] is an example of this kind of monitoring for the DNS ๐ซถ
Monitoring the routing system can also give you useful diagnostics for troubleshooting service availability ๐ญ Where perspective matters, do it from a variety of places. You can use dedicated probes, or public route measurement facilities on the Internet, like the RIPE NCC Routing Information Service [RIS] and the University of Oregon Route Views Project [ROUTEVIEWS] ๐ฆ
Monitoring the health of the component devices in an anycast deployment (hosts, routers, and so on) is pretty straightforward โจ You can use the same tools and techniques you'd use for any other network-connected infrastructure, without the extra complexity of monitoring anycast Service Addresses ๐
6. Security Considerations ๐
6.1. Denial-of-Service Attack Mitigation ๐ก๏ธ
This document describes mechanisms for deploying services on the Internet that can help mitigate vulnerability to attack ๐ Here's how:
- An Anycast Node can act as a sink for attack traffic originating within its sphere of influence. That keeps nodes elsewhere from having to deal with that traffic ๐งฑ
- Dealing with attack traffic whose sources are widely distributed is itself spread across all the nodes that contribute to the service ๐ธ Since sorting legitimate traffic from attack traffic is distributed too, this may scale better than a service that isn't distributed ๐
6.2. Service Compromise ๐จ
Distributing a service across several (or many) autonomous nodes adds monitoring work and a bigger systems administration burden for the service operator ๐ฉ That extra load might reduce how effective host and router security is ๐ฌ
The upside is that you can take compromised servers offline without compromising the service. But that only works if you have working procedures to do it quickly and reliably โก no procedures, no save ๐
6.3. Service Hijacking ๐ฆ
okay bestie, so it's possible that some unauthorised party could advertise routes for anycast Service Addresses across a network ๐ณ. Then they could scoop up legit request traffic, or process requests in a way that wrecks the service (or both!!). A rogue Anycast Node can be super hard for clients or the operator of the service to spot ๐
The risk of service hijacking through messing with the routing system is there whether or not the service uses anycast ๐. BUT the fact that legit Anycast Nodes are visible in the routing system can make it harder to catch the rogue ones. ๐ฅ
Lots of protocols with authentication or integrity protection do it really robustly ๐ , like with periodic re-authentication within a single session, or integrity protection at the channel level (e.g., [RFC2845], [RFC3207]) or the message level (e.g., [RFC4033], [RFC2311]). Less robust protocols may be more open to session hijacking ๐ฌ. Since there's a bigger chance of undetected session hijacking with anycast services, using robust protocols is recommended for anycast services that need authentication or integrity protection ๐ซถ.
7. Acknowledgements ๐ธ
The authors gratefully acknowledge the contributions from various participants of the grow working group, and in particular Geoff Huston, Pekka Savola, Danny McPherson, Ben Black, and Alan Barrett ๐.
This work was supported by the US National Science Foundation (research grant SCI-0427144) and DNS-OARC ๐.
8. References โจ
8.1. Normative References
[RFC0793]Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981.[RFC1918]Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and E. Lear, "Address Allocation for Private Internets", BCP 5, RFC 1918, February 1996.[RFC1997]Chandrasekeran, R., Traina, P., and T. Li, "BGP Communities Attribute", RFC 1997, August 1996.[RFC2439]Villamizar, C., Chandra, R., and R. Govindan, "BGP Route Flap Damping", RFC 2439, November 1998.[RFC2827]Ferguson, P. and D. Senie, "Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing", BCP 38, RFC 2827, May 2000.[RFC3704]Baker, F. and P. Savola, "Ingress Filtering for Multihomed Networks", BCP 84, RFC 3704, March 2004.[RFC4271]Rekhter, Y., Li, T., and S. Hares, "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, January 2006.[RFC4291]Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, February 2006.
8.2. Informative References
[Allman2000]Allman, M. and E. Blanton, "On Making TCP More Robust to Packet Reordering", January 2000,<http://www.icir.org/mallman/papers/tcp-reorder-ccr.ps>.[DNSMON]"RIPE NCC DNS Monitoring Services",<http://dnsmon.ripe.net/>.[Fomenkov2004]Fomenkov, M., Keys, K., Moore, D., and k. claffy, "Longitudinal Study of Internet Traffic from 1999-2003", January 2004,<http://www.caida.org/outreach/papers/2003/nlanr/nlanr_overview.pdf>.[ISC-TN-2003-1]Abley, J., "Hierarchical Anycast for Global Service Distribution", March 2003,<http://www.isc.org/pubs/tn/isc-tn-2003-1.html>.[ISC-TN-2004-1]Abley, J., "A Software Approach to Distributing Requests for DNS Service using GNU Zebra, ISC BIND 9 and FreeBSD", March 2004,<http://www.isc.org/pubs/tn/isc-tn-2004-1.html>.[McCreary2000]McCreary, S. and k. claffy, "Trends in Wide Area IP Traffic Patterns: A View from Ames Internet Exchange", September 2000,<http://www.caida.org/outreach/papers/2000/AIX0005/AIX0005.pdf>.[NSID]Austein, R., "DNS Name Server Identifier Option (NSID)", Work in Progress, June 2006.[RFC1546]Partridge, C., Mendez, T., and W. Milliken, "Host Anycasting Service", RFC 1546, November 1993.[RFC2267]Ferguson, P. and D. Senie, "Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing", RFC 2267, January 1998.[RFC2311]Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L., and L. Repka, "S/MIME Version 2 Message Specification", RFC 2311, March 1998.[RFC2821]Klensin, J., "Simple Mail Transfer Protocol", RFC 2821, April 2001.[RFC2845]Vixie, P., Gudmundsson, O., Eastlake, D., and B. Wellington, "Secret Key Transaction Authentication for DNS (TSIG)", RFC 2845, May 2000.[RFC3207]Hoffman, P., "SMTP Service Extension for Secure SMTP over Transport Layer Security", RFC 3207, February 2002.[RFC3765]Huston, G., "NOPEER Community for Border Gateway Protocol (BGP) Route Scope Control", RFC 3765, April 2004.[RFC4033]Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "DNS Security Introduction and Requirements", RFC 4033, March 2005.[RIS]"RIPE NCC Routing Information Service (RIS)",<http://ris.ripe.net>.[ROUTEVIEWS]"University of Oregon Route Views Project",<http://www.routeviews.org/>.
Authors' Addresses ๐
Joe Abley
Afilias Canada, Corp.
204 - 4141 Yonge Street
Toronto, ON M2P 2A8
Canada
Phone: +1 416 673 4176
EMail: jabley@ca.afilias.info
URI: http://afilias.info/
Kurt Erik Lindqvist
Netnod Internet Exchange
Bellmansgatan 30
118 47 Stockholm
Sweden
EMail: kurtis@kurtis.pp.se
URI: http://www.netnod.se/
Full Copyright Statement ยฉ
Copyright (C) The IETF Trust (2006).
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST, AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property ๐ง
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
Acknowledgement ๐
Funding for the RFC Editor function is currently provided by the Internet Society. ๐ซถ
๐ฆ where this page comes from
- ietf: rfc4786 2006-12
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms