Fastly Altitude - June 25, 2015. Fastly set out to build a highly performant, real-time CDN that is both reliable and scalable. This talk will cover how we chose to design our network and its unique routing and load balancing properties, as well as where we're going next.
Video of the talk: http://fastly.us/Altitude2015_Networking
João's bio: João Taveira is a network engineer at Fastly, where he is responsible for making dumb switches do clever things. In addition to writing software for network orchestration, João works on protocol design and performance, and holds a PhD from University College London or something to that effect.
34. networking at fastly | joão taveira araújo
A B C D
router
A
25%
25%
25%
25%
B
D
C
DNS
load balancing
35. networking at fastly | joão taveira araújo
A B C D
router
A
33%
33%
33%
0%
B
D
C
DNS
load balancing
36. networking at fastly | joão taveira araújo
A B C D
load balancer
State
Cost
Existingdemand
Projecteddemand
State
Cost
Existingdemand
State
Cost
load balancing
37. networking at fastly | joão taveira araújo
A B C D
ECMP
A B C D
ECMP
Destination network Next hop
10.0.0.0/24 A
10.0.0.0/24 B
10.0.0.0/24 C
10.0.0.0/24 D
Destination network Next hop
10.0.0.0/24 B
10.0.0.0/24 C
10.0.0.0/24 D
load balancing
39. networking at fastly | joão taveira araújo
Destination network Next hop
10.0.0.0/24 10.1.A.1
10.0.0.0/24 10.1.A.2
10.0.0.0/24 10.1.A.3
… …
A B C D
faild IP Address MAC
10.1.A.1 A:A
10.1.A.2 A:A
10.1.A.3 A:A
…
load balancing
41. networking at fastly | joão taveira araújo
Destination network Next hop
10.0.0.0/24 10.1.A.1
10.0.0.0/24 10.1.A.2
10.0.0.0/24 10.1.A.3
… …
A B C D
faild IP Address MAC
10.1.A.1 A:A
10.1.A.2 A:A
10.1.A.3 A:A
…
IP Address MAC
10.1.A.1 B:A
10.1.A.2 C:A
10.1.A.3 D:A
…
IP Address MAC
10.1.A.1 B:B
10.1.A.2 C:C
10.1.A.3 D:D
…
load balancing
42. networking at fastly | joão taveira araújo
Time
Activeflows
Time
Activeflows
ecmp
load balancing
TimeActiveflows
43. networking at fastly | joão taveira araújo
Time
ActiveflowsState
Time
load
balancer
load balancing
Time
ActiveflowsState
44. networking at fastly | joão taveira araújo
State
Time
Time
ActiveflowsActiveflowsState
Time
faild
load balancing
Time
ActiveflowsState
45. networking at fastly | joão taveira araújo
$200,000
F5 BIG-IP 10350v
load balancing
46. networking at fastly | joão taveira araújo
load balancing
mitigation
routing
how we do it
47. networking at fastly | joão taveira araújo
load balancing
mitigation
routing
how we do it
48. networking at fastly | joão taveira araújo
How to build a PoP
‣ buy a router
‣ get BGP table from each provider
‣ install routes to FIB
‣ servers use default gateway
router
vendor BGP
FIB
A B C D
routing
49. networking at fastly | joão taveira araújo
~$500,000
Juniper MX960 Router
routing
50. networking at fastly | joão taveira araújo
How to build a Fastly PoP
‣ buy switches
‣ reflect BGP down to servers
‣ inject multipath routes into FIB
server
FIB
BGP daemon
switch
userspace BGP
FIB
routing
51. networking at fastly | joão taveira araújo
distributedsystem
server
FIB
BGP daemon
switch
userspace BGP
FIB
How packets egress Fastly
‣ switches emit nexthop IP and MAC
‣ servers configure p2p link / ARP
‣ send directly to provider nexthop!
routing
52. networking at fastly | joão taveira araújo
$29,995
Arista DCS-7150S switch family
routing
76. networking at fastly | joão taveira araújo
resource pooling1 |rɪˈsɔːs puːlːɪŋ|
make a collection of resources behave like a single pooled resource
load balancing: a pool of servers.
routing: a pool of providers.
mitigation: a pool of pops.
why it matters
77. networking at fastly | joão taveira araújo
why don’t other CDNs do this?
why it matters
78. networking at fastly | joão taveira araújo
because they can’t change
why it matters
79. networking at fastly | joão taveira araújo
packet switching
“unfeasible”
why it matters