News for hackers. Stuff that matters.
Re:Facebook Operations Chief Reveals Open Networking Plan by fb_phoose on Friday October 04, 2013 @08:12PM (#6498847)
Hi pm90, I work on the facebook network engineering team, I can explain at a high-level some of the reasons we made this change.

You're correct BGP was originally intended for inter-AS routing, however, those AS's don't necessarily have to be different ISPs. They could be different divisions in a company, or different racks in a data-center. They can be any grouping where you might want different policies applied. You can also use BGP between devices in the same AS where a common policy makes sense. There's no technical limitation stopping you from using BGP inside the data-center, so it comes down to pros and cons of the various options out there.

Our main goals were scalability, reliability and simplicity. When it comes to scalability BGP is essentially the best, this is because, and why it's used between AS's where the routing tables can grow quite large. When it comes to reliability, we previously had a layer2 architecture, but there are a lot of challenges with that at scale, some examples:

* Split brain: In a layer2 world, you still typically have a layer3 protocol running between your upper layers. We were using BGP and VRRP at the time, and issues in one wouldn't always be communicated to the other, in some cases that's not possible. So VRRP may think everything is fine, while BGP is down, the result is black-holed trafic.

* Scale: Running an all layer2 network requires devices that have large enough CAM tables to support all connected devices, many vendors newer full line rate cards were coming out with smaller CAM tables, as such layer2 simply wasn't an option in some cases. Additionally, many of the other protocols that were options are computationally expensive to deploy at a large size, you either end up slowing them down, or deploying relatively complex designs.

One of the many significant benefits BGP brought us came in the form of ECMP. In a layer2/VRRP world, balancing traffic is hacky with two destinations, if you want to do more, which we did, it becomes increasingly complex. With BGP it's built in, we can consistently and easily balance the load to 8, 16, 32 or more destinations depending on the hardware and software in use.

BGP is also readily available in the software from the major network vendors, as well as within OpenSource solutions for the servers. This means we can use a common protocol everywhere. Which in turns makes sourcing and deploying new equipment much easier and simplifies the configs, policies and tooling needed to support the deployment.

There are many other reasons that layer2 wasn't a good choice for us, and that layer3 makes a lot of sense. I'd be happy to discuss more of these as well.

Hopefully this helps to answer your question.

Re:Facebook Operations Chief Reveals Open Networking Plan by pkj on Friday October 04, 2013 @10:55PM (#6499191)
>Running an all layer2 network requires devices that have large enough CAM tables to support all connected devices, many vendors newer full line rate cards were coming out with smaller CAM tables, as such layer2 simply wasn't an option in some cases.

Does this imply that mac forwarding tables(on switch) and arp cache(on hosts) need to have entries only for their immediate neighbours ?

Curious to know how much modified the host network stack is. Also, how do you provision a new server with the right IP ? Is this mechanism in L2 ?

>There are many other reasons that layer2 wasn't a good choice for us, and that layer3 makes a lot of sense. I'd be happy to discuss more of these as well.

I am sure people would find that very useful. Thanks for the excellent writeup !

Re:Facebook Operations Chief Reveals Open Networking Plan by jimB0 on Monday October 07, 2013 @09:55AM (#6508217)
The last-hop switches facing the servers are layer 3 in the direction of the aggregation switches and layer 2 in the direction of the servers so ARP is handled normally and DHCP can be handled with standard DHCP-helper mechanisms. This allows the host networking stack to be vanilla (if you want it to be).
Re:Facebook Operations Chief Reveals Open Networking Plan by donavanm on Saturday October 05, 2013 @06:15AM (#6500200)
> Scale: Running an all layer2 network requires devices that have large enough CAM tables to support all connected devices

... in the broadcast domain. Maybe you save on CAM, but now youre buying more TCAM/SRAM for your route table. You're going to get what, a couple thousand prefixes on your trident boxes? And burn a bunch on all the /32s and ECMP'd routes you have?

I'm quite curious why more routing looked better than label based switching in a meshed network.

Re:Facebook Operations Chief Reveals Open Networking Plan by jimB0 on Monday October 07, 2013 @09:23AM (#6508025)
To run BGP, you would not have to run /32s everywhere. You could have multiple tiers of aggregation that keep your routing tables manageable. It would look something like this.

hosts (/32) -> rack-sw -> (/26) -> aggregation-sw -> (/17)

If you need some specifics to be advertised, scale would be dependent on the number of specifics that you desire to be advertised out of rack in the case above, so it would look something like this.

hosts (/32) -> rack-sw -> (/26 + N * /32_external) -> aggregation-sw -> (/17)

On the note about label switching versus ip forwarding, I would not think of it as either/or but rather both could be used since you need to eventually serve pages to users.

Re:Facebook Operations Chief Reveals Open Networking Plan by donavanm on Wednesday October 09, 2013 @04:53AM (#6520114)
Yeah, i was specifically thinking of the prefixes jn the tor and agg layer. I read it as having all the vips in the rack as next hop /32s. Add a bunch of intra rack ecmp groups and its not insignificant. Im not sure i buy the feasability of /27 per rack or a simple /17 supernet at the agg layer long term. Rack address counts will not be uniform, id expect everything from /29s to /23s depending on host types. Assuming uniform allocation at the pod/dc level also seems like a stretch. Renumbering and super/subnetting is going to fragment the ip locality over time. Ecmping through the core eats yet more prefixes, and (Id guess) forces hot ones to be deagg'd.

All that said, you do get a couple thousand prefixes on your $10,000 trident box. And im obviously not an NE. So maybe it would work inside a small cluster.