top | item 9523803

CloudFlare “Interview Questions”

150 points| jgrahamc | 10 years ago |blog.cloudflare.com

73 comments

order
[+] tptacek|10 years ago|reply
I think TCP SYN segments have always been able to carry payloads; they're not delivered until the 3WH completes.

A fun set of trivia questions involves inconsistent retransmission: in out-of-order delivery, with some data buffered --- IP fragments or TCP segments --- what happens when the packet that allows reassembly to proceed (a) overlaps data already sent and (b) that overlapping data isn't the same as what was already buffered? (When we wrote the IDS paper, Vern Paxson told us he'd been observing this happening in the wild, which blows my mind).

Another fun set of interview questions pertains to how you'd design the fastest possible "traceroute" program. You can do better than parallelizing/pipelining. :)

I used to like asking people what the utility of discard, chargen, and echo were.

[+] throwawaykf05|10 years ago|reply
My first reaction to the "fastest traceroute" question would be, is this a trick question? This is because many routers rate-limit the number of ICMP packets they forward. Causing a lot of ICMP replies could easily exceed this limit and result in missing hops. This requires being deliberately slow. A lot of the early Internet measurement studies had to deal with these problems, though ideally a single traceroute is less likely to trigger this behavior.

However, your hint indicates that there's something other than inducing a number of TTL exceeded packets. Can't verify as I'm on mobile, but are you thinking of the TCP Record Route option?

[+] nitinics|10 years ago|reply
I'd think sending multiple packets (parallelism) with varying TTLs (1,2,3..n) without waiting for responses from each hops to increment the TTL, would probably give us faster traceroute. n being the number of hops you "expect" the destination subnet to be.
[+] zorked|10 years ago|reply
Everybody is taking these questions too seriously. These are not interview questions, and these are quite fun actually - I know the answer to a few of them (not because I know RFCs by heart but because I had to deal with them in the past), and the others are just intriguing enough that I may actually go look for answers.
[+] edcastro|10 years ago|reply
I actually just did interviews with Cloudflare and found it to be quite compreehensive, from the tech and personal stand point. People seems to know that they are doing and they all seem very chill and nice. Probably one of the best overall interviews I've done to date. The only problem was the delay between the interviews, they are huge! All in all, seems like a really nice company to work at.
[+] _pmf_|10 years ago|reply
> These are not interview questions

These should become interview questions when somebody declares himself/herself an expert in TCP/IP.

[+] bjterry|10 years ago|reply
This is almost unrelated to the post, but the question on the MD5 checksum was the inspiration. It seems like we could have a DoS mitigation strategy with a protocol extension that required the packets to be checksummed with a key stretching algorithm (similar to bcrypt). The worse the DoS got, the higher the number of iterations that could be required. If routers at the network edge could verify the checksums somehow then the traffic would be dropped at distributed nodes rather than at a central node. Ideally you'd want something easy to verify but hard to calculate for the client. Of course, I know nothing about DoS attacks, so this is probably trivially wrong in some way.
[+] kocsenc|10 years ago|reply
So, for those interested in learning could we possibly have a quick short answer for each one of them?

K

[+] BinaryIdiot|10 years ago|reply
This is what I was looking forward to but never saw a list of answers.
[+] dedalus|10 years ago|reply
>13) Can a SYN packet have a payload? (hint: new RFC proposals)

Hint is ok but RFC 1379 and RFC 1644 predate your hint. I have personally seen this happen as I implemented it :-)

[+] iDemonix|10 years ago|reply
I've always thought a job at CloudFlare would be awesome, so much so that I took their list of requirements for a SRE role and set them as goals to work towards. After reading this list of questions, however, maybe I should lower my expectations, I could barely answer 25%.
[+] jgrahamc|10 years ago|reply
You should apply.
[+] iMark|10 years ago|reply
I start at CloudFlare in a week. I was fortunate in that I came via a recommendation.

Still, for whatever it's worth, I was genuinely impressed with everyone I spoke with throughout the chain.

[+] jtchang|10 years ago|reply
I love these questions. I wouldn't expect any interviewee to know all of them. But I'd expect them to be able to talk intelligently about some of them.

For a software candidate a simple question like "tell me what you know about TCP/IP" is a great start to just probe what they know about networking.

[+] joeblau|10 years ago|reply
Ah... this bring back memories! When I was doing dev ops I had to know a lot more about the nitty gritty details of networking. Still know a few of these, but most have been forgotten.
[+] Raed667|10 years ago|reply
I do CS (software mainly) graduating next year And I only know a couple of these .. Should I be worried ?
[+] jerf|10 years ago|reply
No. Even if you applied to a new job that related to all this it would generally be understood that as a new grad you're not going to know this stuff, and either A: the job would never have been posted in such a way as to lead you to apply or B: they understand there's going to be on-the-job training.

That said, if you're specifically applying to CloudFlare, you just got handed a great study sheet to differentiate yourself very handily from your peers. You'd think that "everyone" looks for this sort of thing, but given the ongoing streams of reports of "people who fail FizzBuzz", no, seriously, few people look at this sort of thing before interviews!

[+] georgemcbay|10 years ago|reply
Only if you plan on becoming a low-level TCP/IP implementation engineer or some other such niche field in the very immediate future.

The vast majority of working programmers can be extremely effective without knowing much more than basic socket usage and perhaps the basics of how NAT setups can work against you if you're doing something other than just pure web-browser networking.

Having said that, knowing how in-the-wild network protocols work in general is one of those things (like knowing how compilers work) that can broaden your horizons and are probably worth learning for that reason, just don't worry too much about retaining minutia about them that you can easily look up should the need arise.

[+] kabdib|10 years ago|reply
No. And if you run into a company where they do ask these questions (and others like them) and take them seriously, then try really hard not to work there because it will probably suck.
[+] shampine|10 years ago|reply
I think it's just confirmation that we can't know everything and there is always room to learn more.
[+] xorcist|10 years ago|reply
Why should you? These are tricky domain specific questions that a network engineer with intimate knowledge of TCP/IP could answer some of. I certainly wouldn't expect a fresh CS graduate to know these things unless you did a lot of work in that area for some reason.
[+] lmm|10 years ago|reply
No. If you can't figure them out from reading the relevant RFCs, then maybe (reading specs is a vital skill), but this is absolutely not stuff that's worth memorizing (at least for most CS jobs).
[+] rasz_pl|10 years ago|reply
Do you have any projects outside of school? or work experience? if answer is no then yes, you should be worried.
[+] snooc|10 years ago|reply
Nice blog post CloudFlare SEO team!
[+] jgrahamc|10 years ago|reply
Every single member of the CloudFlare team is part of our marketing effort.
[+] dominotw|10 years ago|reply
Can't someone learn these in a couple of months.

Why does a candidate have to know all these already?

[+] mankyd|10 years ago|reply

    For quite some time we've been grilling our candidates
    about dirty corners of TCP/IP stack. 
    [...]
    I'm joking of course, [...]
They don't need know these. These aren't interview questions, they're just TCP/UDP trivia.
[+] JustSomeNobody|10 years ago|reply
The article was joking about the interview questions. But let's say they weren't. I'd answer your question thusly: Interest. If someone interviewed and had an answer to most of these questions, it would at least show that they had an interest in the material and weren't just looking for a job.
[+] Rapzid|10 years ago|reply
Days. The article pretty quickly diverts away from the subject of interview questions.

"The goal is to encourage our readers to review the dusty RFCs, get interested in the inner workings of the network stack and generally spread the knowledge about the protocols we rely on so much."

[+] Kenji|10 years ago|reply
"For quite some time we've been grilling our candidates about dirty corners of TCP/IP stack. Every engineer here must prove his/her comprehensive understanding of the full network stack. For example: what are the differences in checksumming algorithms between IPv4 and IPv6 stacks?"

I read that and was blown away, uttering "Bloody hell." I would have never known that from the top of my head. Good joke, well played, sir.

[+] mauricemir|10 years ago|reply
What you really need to know the dirty little secrets of the various implementations of the stacks and the short cuts (or blatant ignoring of standards).

My Boss at BT could do this from a x.400 packet trace and point to the offending dword and say that is XXX's POS stack.

There is also the story of a guy (at BT Labs) who took the CCIE and only scored 98% he then wrote a personal letter to John Chambers explaining why he was right and Cisco was not.

...

Turns out he was one of the 3 inventors of Ethernet

[+] brlewis|10 years ago|reply
2/3 top-level comments are confusion re. the title. Can we have a different title for HN in this case?

EDIT: Title as I write this: CloudFlare “Interview Questions”

[+] spoiler|10 years ago|reply
It's etiquette to use the original title that you're linking to, unless it's a bit older (then you can include a year), or if the original title is too ambiguous. I think it's reasonable as it is right now.
[+] outworlder|10 years ago|reply
The quotes are there for a reason.
[+] agonzalezro|10 years ago|reply
I've mentioned it on the blogpost but: Do you have some metrics about the success of your candidates replying to those questions?
[+] ajkjk|10 years ago|reply
These are not actually interview questions.
[+] Animats|10 years ago|reply
Cloudflare needs people who understand this, since they're a man-in-the-middle security hole/backdoor. Note that they're not asking questions about security. This shows their priorities.
[+] jgrahamc|10 years ago|reply
Oh, please.