682 karma · joined June 7, 2012
Amazon 1997-2004 (supply chain, product catalog, website engine, service frameworks, image processing and serving)
Apple 2005-2006 (product catalog, image rendering)
Facebook 2006-2015, 2020-2021 (storage, networking, incident management, site performance & investigation, internal & external threats)
If anyone is considering using Rust and is nervous about lifetimes and bare metal, check out that article and try its guidance. I learned these things on my own the hard way and would have loved to read this article 18 months ago. It's really quite good.
Sounds like someone was tapping cables with submarines?
I'd also like to echo what spicyj said about the UI, it is very usable. It was common for managers, PMs, and even people in completely non-technical business roles to use Scuba. It was my favorite internal product at FB and the one I miss the most.
Regarding building a datacenter, that's much higher risk since it's a $100M-1B capital investment. I'm guessing both Facebook and Google see too much volatility to make the risk worth it. It could be an expensive paperweight if the Indian government changed their minds.
There were definitely large benefits to the open floor plan back then since we were working on so many things and each person was wearing so many hats. It made staying in touch with people's progress really easy. We were also working 80-100 hours a week back then, so it was good to constantly stay in touch since there was so little structure and process back then.
I have mixed feelings about FB being held up as one of the models for open floor plans today though. While I think it was definitely useful at the time, I think the open floor plan has become less important as tools have gotten better. We didn't have tools like FB Groups, Phabricator, etc, so you had to be within earshot of your collaborators in order to make sure everyone was in sync.
My sweet spot would be team sized rooms if I was starting a company today. I used to be so jealous of teams that had to grab war rooms and ensconce themselves in there with a bunch of laptops and displays. Even though they were working super hard to meet deadlines, they looked happy as can be.
So I'll reframe my question and ask: Why isn't TLS a base extension?
I didn't interpret their tone as trying to be hard-edged or snarky; I felt it was just them honestly showing the process of someone returning home to a place that was incredibly isolated 25 years ago, and then trying to rectify what it's like for these kids in that same town who now have access to so much more information and avenues of communication.
I liked the different asides where they mentioned what was popular in the town 25 years ago versus what the kids like now, and how the kids interests today compare to bigger city tastes. I grew up in a town that's 5x larger than Napoleon but still pretty small, and I see many parallels with this story that match my experiences.
That said, there are a number of systems at FB where deleting a crypto key loses the linked data forever--but they still crunch the hard drives just to be really sure. The drive crunching is an incredibly tiny expenditure compared to the massive CapEx and OpEx required to build, stock, and run the datacenters. It's worth it if only for the peace of mind.
I started in October 1997 and did Perl work on backend systems, but I had a few friends who worked on the frontend. They used to talk about how Catsubst had a very small set of verbs and that everything was a function, even arithmetic, and that prefix notation was used for all macro calls. They thought it was Lisp-inspired, but they were also pretty junior programmers too. I never worked with Catsubst myself, so my information is second-hand, while yours is zero-hand since you wrote it. :-)
Thanks for all the work you did on Amazon's infra!
The template language for Amazon's website at the time (catsubst) was a Lisp-inspired prefix notation language with a relatively small number of functions. For example, there was an add macro but not a subtract macro, so to do A-B, you had to say ${add A -B}. I might have the exact syntax wrong since it's been 20 years.
However, I'm quite surprised Netflix went with Intel's ISA-L library for AES-GCM given Intel's perf gains were so very marginal compared to BoringSSL. I would have gone with the library that had more eyeballs on it, and in general I'd give Google the edge over writing solid, secure code than I would Intel.
* Most ISPs don't mangle UDP, and if you care enough about perf to be using UDP in the first place, you can afford to figure out who mangles UDP and fall back to TCP for those networks. It's a very small number of networks.
* Any TCP/SCTP/etc inspired protocol you can think of can be implemented on top of UDP. Its header is only eight bytes long and it adds minimal overhead. UDP socket semantics are simple enough that you can treat them as a slightly smarter IP socket and build your protocol as if you were running directly on top of IPv6.
* There's a huge advantage to being able to implement your protocol in userland since you get fine grained control over congestion and connection logic. There's a huge disadvantage too, since it's actually hard to implement that stuff yourself. But for the people who are large enough to build their own protocols (FB, Google, etc), it's worth it.
* You can even encapsulate SCTP inside UDP to punch through middleware firewalls if you want to. I don't know of anyone doing that for real in the wild, but there's a RFC for it (RFC 6951).
At Facebook, we had clients talk http2 to edge nodes near the users, which then edge terminated TLS and opened up the request to figure out which upstream was best to forward the request to. We kept http2 conn pools to each upstream from a given edge location. We also had tunable amounts of domain sharding so that the client could open N http2 conns at once to a given edge hostname (cdn[1-4].facebook.com vs just api.facebook.com or www.facebook.com). This helped with head of line blocking, assuming that your ISP wasn't hopelessly over-congested. In that case, no amount of sharding will help you, and sometimes it even works against you depending on what tcp middleware your mobile ISP is using.
We did different TCP settings for edge<->origin conns than edge<->user which let us balance between latency and throughput for origin traffic as needed, and we did some interesting work tuning edge tcp settings differently for different user networks too. Things like determining the best congestion window for a given ISP's users, how large to set the send buffers, etc.
Admittedly, this work was much easier since we had good http and tcp instrumentation, and we had high quality links between edge and origin. I just wanted people reading your comment to understand the tradeoffs. We saw a measurable difference in perf with a full http2 stack that made up for the extra complexity of running http2 top to bottom.
However, scaling and/or capacity is not the reason E2E encryption isn't applied on all messages. The crypto operations are relatively trivial in terms of cpu.
This comment summarizes what FB's CSO said about why they are not launching E2E broadly yet. It boils down to usability concerns. Sounds like they are working on it:
The two main reasons I remember are A) it was hard to maintain a group of engineers with acceptable competency in Erlang over time and B) the C++ code offered faster and more consistent performance albeit with somewhat less scalability in terms of sessions per host. We just added X% more servers to the channel pools and were happy to have the chat services in a language where more FB engineers could contribute. There's been a lot more changes in the architecture than just moving to C++ though, so it's hard to do a direct comparison between the products.
This doesn't take anything away from WhatsApp though, who has built a strong product and infrastructure on top of Erlang.
My policy as a tech lead (and then manager) was to spread the mundane tasks across the team equally. This let everyone experience the pain points and usually led to faster elimination of technical debt, since the senior developers would see patterns in the pain and find ways to address it. (Junior engineers often don't have the experience to recognize bad patterns or bad smells and would happily plow through a bunch of mundane tasks that could be done better with a higher level solution.)
It helped that we had a Tech Debt Week every 8-10 weeks where we took a week to fix problematic code and harden our deployment and automation processes. It was hugely popular with the engineers, we gave out trophies for the best fixes based on team vote.
The "share the love, share the hate" approach also meant that new junior developers were given challenging tasks as soon as they joined the team (and were paired with a senior developer for support). If they excelled, we gave them even harder things to work on. If they struggled, we found easier projects for them to work on and coached them through it so they didn't feel bad about their struggle--we always said it was better to try challenging problems and fail than attempt something safe and easy. Either way, we started new team members with the hard stuff instead of ramping them up slowly on the easy stuff.
The same policy applied to interns. They got challenging and impactful projects, no busy work or work the team didn't want to do. This meant we had a huge return rate on our interns and most of them joined our team when they came to work full-time.