TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How Fastly coded their own routing layer for scaling CDN

149 pointsby kickdaddyabout 9 years ago

13 comments

amazon_notabout 9 years ago
TL;DR: Fastly needs full routing tables on all CDN nodes in order to determine which is the best transit path to push out content through. In order to save money, they used a programmable Arista switch instead of a traditional router. Their solution is to reflect BGP routes via the switch to the nodes and and fake direct connectivity between the nodes and the transit provides, so that nodes can directly push out content to whichever transit provider they determine is best on a per packet basis.<p>Please correct me if I&#x27;m wrong.<p>Maybe I&#x27;m just obtuse, but I found the blog post confusing about what it really is about and long winded, taking a very long time to come to the point. There is a severe lack of context in the beginning, it would have tremendously benefited from the what and the why of what they are trying to do.
评论 #11680643 未加载
评论 #11680960 未加载
评论 #11680118 未加载
jjoeabout 9 years ago
Interesting approach. So Fastly is offloading the full routing table to their carriers&#x27; router(s). That&#x27;s because routers that can hold full BGP tables are expensive to purchase and maintain. But to retain some form of control, they&#x27;re terminating eBGP at the switch and using iBGP to disseminate (inject) the providers&#x27; route (next hop).<p>I feel (I don&#x27;t have direct experience with this setup) like they&#x27;re just offloading some compute power (therefore cost) to the hosts. So the cost is automatically spread out across their relatively massive edge nodes. A line showing a router plus support costing $100,000 looks bad in expenditures vs showing a server plus integrated routing showing $2500.<p>I&#x27;m curious about how this impacts Varnish considering how table look ups can be bus-expensive during odd route changes&#x2F;flaps (storms). %sys must go through the roof as a result.
评论 #11678563 未加载
评论 #11680966 未加载
评论 #11678695 未加载
francoisLabonteabout 9 years ago
Also note Spotify published their own stuff also on Arista hardware<p><a href="https:&#x2F;&#x2F;labs.spotify.com&#x2F;2016&#x2F;01&#x2F;26&#x2F;sdn-internet-router-part-1&#x2F;" rel="nofollow">https:&#x2F;&#x2F;labs.spotify.com&#x2F;2016&#x2F;01&#x2F;26&#x2F;sdn-internet-router-part...</a><p>Podcast where David Barroso talks about it:<p><a href="http:&#x2F;&#x2F;blog.ipspace.net&#x2F;2015&#x2F;01&#x2F;sdn-router-spotify-on-software-gone-wild.html" rel="nofollow">http:&#x2F;&#x2F;blog.ipspace.net&#x2F;2015&#x2F;01&#x2F;sdn-router-spotify-on-softwa...</a><p>Arista blog post:<p><a href="https:&#x2F;&#x2F;eos.arista.com&#x2F;spotifys-sdn-internet-router&#x2F;" rel="nofollow">https:&#x2F;&#x2F;eos.arista.com&#x2F;spotifys-sdn-internet-router&#x2F;</a><p>Disclaimer I work at Arista
评论 #11678503 未加载
评论 #11679880 未加载
ChuckMcMabout 9 years ago
Great read, love the &quot;hey what does it need?&quot; approach rather than the &quot;how is this done?&quot; approach. Tut Systems had bought one of the first &quot;hotel internet&quot; companies back in the 90&#x27;s which used a similar approach by subverting the ARP protocol, when you connected any thing you tried to ARP for it would respond &quot;Yup, that&#x27;s me! Send me your packets&quot; and you would end up at the &quot;Give us your credit card&quot; signup.<p>The nice thing is that at this level networking is really simple. And if you can get access to the internals of switches to craft behaviors at that level, it is a pretty good way to go.
评论 #11678264 未加载
d33about 9 years ago
That&#x27;s pretty impressive! As a side note, a writeup on BGP security: <a href="https:&#x2F;&#x2F;security.stackexchange.com&#x2F;questions&#x2F;56069&#x2F;what-security-mechanisms-are-used-in-bgp-and-why-do-they-fail" rel="nofollow">https:&#x2F;&#x2F;security.stackexchange.com&#x2F;questions&#x2F;56069&#x2F;what-secu...</a>
jssjrabout 9 years ago
This is really great work. Do you have any plans to open source some (or all) of the code behind Silverton?
mikecbabout 9 years ago
If you like this, you&#x27;ll like the ONS youtube channel.[1] In particular, the keynotes by Vahdat are pretty amazing.<p>[1] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCHo2uqQqpmE_Cg5b4qiUpUg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCHo2uqQqpmE_Cg5b4qiUpUg</a>
Twirrimabout 9 years ago
Amazon, Google, etc. etc. all these companies building their own custom network devices, and so much of it coming back to both &quot;It does too much, most of which we don&#x27;t need&quot; and &quot;We want to do our own thing at that layer&quot;.<p>As James Hamilton noted at the AWS Re:Invent convention, not only is there they overhead and development expense of these unneeded components, just the sheer complexity of the application running is inevitably leading to bugs and unexpected behaviour. By simplifying the device to just do the few things you actually need it to do, you end up more performant, and more reliable.<p>I wonder if the entrenched network appliance providers will wake up?
erentzabout 9 years ago
They&#x27;ll want to be looking at using MPLS and EPE techniques now that there&#x27;s support for it on their Arista platforms. This L2 technique is arcane, going to be painful to scale and reapply generally to other areas.
评论 #11682073 未加载
评论 #11680309 未加载
aram26about 9 years ago
<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TLbzvbfWmfY" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TLbzvbfWmfY</a>
pyvpxabout 9 years ago
I hope Arista pushes other vendors to open up their hardware and provide more APIs
评论 #11680828 未加载
评论 #11681008 未加载
daviduabout 9 years ago
This is awesomely clever. Not surprised to see from the Fastly team.
al_fountain24about 9 years ago
extremely cool stuff