18

I had a job interview today for a Job position as developer on an important site. They asked tonnes of programming language related questions, which I managed to answer without problems, but then they started asking question about how TCP/IP requests were made once I made a request on my PC to a web server. I did received those contents as a student, but I dont remember them well, because I'm working mostly in web development, my question is:

As a software developer, mainly working on web applications, do I need to have extensive knowledge of TCP/IP and how routers manage requests or it's just black box knowledge to me?

1
  • Did they want to know more about how TCP/IP requests are made at a conceptual level, or did they want to know specifics ? TCP/IP is used under the hoods every time we communicate on a network. I personally believe it is very important to understand how things work under the hoods at least at at a conceptual level. This will help you spot problems, and often even design better solutions.
    – Parag
    Jul 25, 2012 at 11:41

9 Answers 9

27

This kind of knowledge comes in very useful very infrequently.

For example, when your ops team sets up your production site behind a router/firewall/load balancer which is set up slightly differently from the one in your test environment and you get a problem related to that, it will serve you well to spot that quickly and talk to ops, rather than digging for some oddity in code. It will serve you even better to be able to understand their language when you have that conversation.

But I really don't understand why people put so much weight on this stuff in interviews, especially when it's for a junior programmer. It is certainly not essential knowledge for everyone on a team and you can be taught.

10
  • 2
    Good point re junior programmers, but I'm not sure what level position @forgotmynick is applying for :-) Apr 8, 2011 at 20:55
  • @Dean - Fair point. I tend to assume that people who refer to when they were a student have not been in dev 5+ years. But you're right, that isn't always the case.
    – pdr
    Apr 8, 2011 at 21:00
  • 1
    At least knowing what happens when routers silently drop connections, are really nice in a production setting. Been bitten by that more than once.
    – user1249
    Apr 9, 2011 at 7:41
  • @pdr - I disagree. This type of knowledge is useful when you want to know why things take so long or why the updates you made to your site don't show up in your users' browsers. Anyone with a modicum of network knowledge would know the answer: caching. Personally, as a consultant, I've made a sh*load fixing stupidly simple (and very costly for the company) things that people would have avoided if they had known these things. It's not like if this rocket science or quantum mechanics either. I mean c'mon, no excuse for a jr dev not to know about this (specially if of a CS background). May 5, 2011 at 21:51
  • @luis.espinal - In honesty, I don't think I would have lumped caching in the same category at all. It's not a networking thing, it's a browser thing. I agree with you that caching (browser or server) is something everyone needs to understand because it is simple but has a lot of gotchas. But TCP/IP?
    – pdr
    May 5, 2011 at 21:57
18

My personal opinion is that a web developer should know how the low-level protocols works. Particularly HTTP, but also (at least the basics) of TCP/IP. Depending on the complexity of your site, you may find yourself having to look at HTTP trace dumps or even tcpdump logs in which case you will need at least a passing knowledge of TCP/IP.

Now, whether you'll ever actually have to look at a tcpdump depends a lot on the particulars of your site. For example, if you have a large site with a lot of users and servers spread out over multiple data centres, making a relatively large number of requests (e.g. Ajax, especially Comet-style requests as well), then tcpdumps may be something you'll need to look at.

If all you're working on is some intranet site or something fairly simple, then the knowledge may not be so important, but I still think knowing the low-level stuff will always be a help.

4
  • 3
    lol...i wouldn't call http a low level protocol
    – Pemdas
    Apr 9, 2011 at 4:48
  • 2
    @Permdas: it's all relative. HTTP is higher level than TCP, but lower level than (say) SOAP. Apr 9, 2011 at 5:18
  • 1
    SOAP is more implementation-specific thing, than protocol. Unfortunately its implementations are so close to each other, that they call it a "protocol"
    – kagali-san
    May 30, 2011 at 18:52
  • HTTP: yes. TCP/IP: a rudimentary understanding of how & why it performs some higher level operations is probably fine. I doubt a deep knowledge is required (or too often useful) in a web development environment
    – Andy Hunt
    Feb 24, 2012 at 3:13
8

It's always useful to have an understanding of how the layers beneath the layer you're coding behave if only because it comes in terribly useful when you're trying to debug a relatively complex problem and you need to understand why your application has unexpected performance problems on a WAN or why it fails for users using NAT, etc. It can also be invaluable when you need to be in a room discussing a problem with the developers, the web server admins, the network admins, and the database admins to be able to speak and understand the language everyone else is speaking and to ask intelligent questions. And the more you understand various implementation details, the more likely you are to be able to build a scalable site by, for example, understanding how different features you might implement would generate network traffic that could introduce latency and understanding how different caching strategies for a large site might mitigate those latency issues.

That said, there is clearly a point of diminishing returns where learning more about some abstraction that is 6 layers of abstraction away from the code that you're writing is unlikely to make you a better web developer. So it will depend to some extent on what you mean by "extensive". Understanding the basics of how routers manage requests is something that could be quite useful but understanding how different routers can be configured to prioritize different sorts of traffic is probably not terribly useful unless you happen to be working on an application that network admins are likely to want to throttle.

But even if it isn't particularly practical, strong developers tend to be curious about different layers of the stack and tend to learn about them even if there is no clear benefit to doing so. I would tend to expect that a web developer that had a deep understanding of how relational databases work or how networking works would be stronger than a web developer that is restricted to knowing about web development technologies alone. Obviously, it's not a perfect correlation, but it's reasonable to ask.

1
  • +1 for "It can also be invaluable when you need to be in a room discussing a problem with the developers, the web server admins, the network admins, and the database admins to be able to speak and understand the language everyone else is speaking and to ask intelligent questions"
    – Parag
    Jul 25, 2012 at 11:44
6

Depends on the website you're building. For small/medium websites, basic knowledge of TCP/IP is probably fine.

If you're working on a top website (in terms of traffic) a detailed knowledge of the underlying networking protocols and infrastructure is extremely important. It will guide you frequently in making good design decisions.

4

In my opinion you need to know generally how the bits get from your application to the server and back, especially for a web development position. There are no black boxes in programming; all abstractions leak.

3

As a software developer, mainly working on web applications, do i need to have extensive knowledge of TCP/IP and how routers manage requests or it's just black box knowledge to me?

IMO, the fact that you are a software developer (I assume with a CS background) should know about these things. In particular if you do web development. As I mentioned in one of my comments, I've made a sh*load in consulting fees just fixing really stupid errors done by people who do not know about the basics of network/Internet architecture.

ZOMG, the changes I made to my website aren't showing, plz teh help! *ZOMG, people's profiles are getting crossed because sessions are being cached somewhere, plz teh help!* ZOMG, we have secure content for authenticated users, but people can get to them with a bookmark and the bloody authentication screen nevers comes up, plz teh help!"

... and so on and so on... sadly...

There is a ton of stuff between your web app and the user's browser: your app, your app's NIC, a router and possibly a firewall, then your http server internal NIC, then your http server, then your http server outbound NIC, then another router and most certainly a firewall. Then a caching device, and possibly an SSL device. Then out to the internet with more routers and caching servers, then finally to your users' browser (and its internal cache.)

A zillion things can go wrong, and if you have not an iota of knowledge on networking, network protocols, operating systems/sysadmin, and internet architecture, you'll be at lost and at the mercy of your IT OPs department (since most devs neither have access to infrastructure nor know where to look for when troubleshooting things). At worst, it will make you a really crappy web developer.

The programming aspect of web development is just that, one aspect. Successful execution of it sits squarely on top of other skills (in particular networking and systems administration) that cannot be taken for granted nor blindly delegated to IT operations. It doesn't mean that you must be responsible for network/OS troubleshooting, but

a. You must know what can go wrong at the network/OS level so that you can cooperate and guide IT OPS who can never have intimate knowledge of your application. b. Such knowledge allows you to engineer your system so that it avoids, or at least ameliorates and gracefully cops with such errors.

Programming is just one aspect of engineering and development. It cannot be your primary skill, and do really be successful in the long run in enterprise development in general, and in web development in particular, these are things you need to know. And honestly, these are things that should have been learned (very firmly) either in school or through self-learning before graduation (or immediately upon entering the job market.)

Good luck.

1

It is important to understand TCP/IP and how routers manage requests. But you don't know need extensive knowledge on that at an interview. A less it was previously expressed. Otherwise you both wasted time. Sounds like a trap.

But for a Architect role I strongly believe that this knowledge is important at any instance. The guy will provide solutions that can take advantage of that by using or even replicating the architecture in custom solution. Have a weekend with Tanenbaum Networks and take easy!!

1

This is a tricky question. Yes, I think every developer should have a basic knowledge TCP/IP and how networks based upon that protocol are organized. However that leads to the question of how extensive a basic knowlodge is considered to be.

I think that without facing any specific problem (and therefore needing to know how things are really organized "down there") a developer should know what a packet is and how packets are distributed through the network (that includes knowing what types of machines that packet comes into contact with). However I think it's enough to know that a router distributes packets to all receivers and that a switch delivers packets to certain receivers. I also wouldn't require a devloper all that subnet stuff - I sure don't know all the details myself ;-) I should be known that subnets might be isolated and packets need to be routed from net A to net B but all the details are way to much for a typical developer.

I think it's a little like driving a car: You should know why you need an engine and why you need fuel but as an average driver you don't need to know how to compute the perfect mixture of fuel and air for the combustion process.

1

Few things are more frustrating than folks who don't understand the fundamentals of what is going on around them. It leads to asking the same questions over and over again (in slightly different form, of course.)

When you find yourself asking repeat questions, it's time to hit the books. Recent examples of questions I've received:

  • "How do I configure the network if xyz?"...
  • "How do I configure the network if abc?"...
  • Repeat...

In fact, I got so many repeat questions from folks who found it easier to ask again than learn, I started keeping track of them and making Powerpoint slides. Now, every six months or so, I run a hands-on class. Folks are then able to reference the slides I made. Later, when they ask something we covered in class, I gently refer to it, and they usually recall that we covered it and go re-read the slides for themselves. Those who do so actually learn the subject better and find it valuable. It has made a remarkable difference in the form of fewer interruptions to my workday.

One other thought: In the real world, real systems have so many quirks and issues, it's incredibly limiting to not know more than just your domain-specific knowledge. Any idea how the underlying fundamentals work can only help you.

Now, if it truly is out of scope for what you should know, then fine, don't worry about it. But if you find yourself asking the question more than once, learn it. You'll not regret it.

Bravo for asking the question. Never stop learning.