A couple of example questions:
- Asynchronous I/O, one approach is to ask a question where different clients may query the server and may result in race conditions if implemented via multiple threads (e.g. caching of results). If the interviewee goes for multiple threads, bring up the race conditions and see whether they mention asynchronous I/O as an option.
- What is the difference between dead-lock and live-lock
- Prototype a web server
- Prototype a web client
- What are ephemeral ports; alternatively describe a load stress application that hits a server with 1000s of requests per second but after several seconds stops making requests to the server; after 2-4 minutes the application again starts hitting the server with 1000s of requests.
- Write a thread-safe producer/consumer buffer that can be accessed by one or more producer/consumers
- What is the difference between client/server and p2p
- This is more networking, but it is helpful to know what happens underneath the socket calls: describe the TCP 3-way handshake
- What is nagle's algorithm? When is it desirable? How would you turn this off?
- Linux variant: when writing a daemon what are the basic building blocks (i.e. forking a child and killing the parent, closing stdin/stdout/stderr etc.)
- Windows variant: when writing a windows service what are the basic building blocks.
- Design a protocol for communicating between a client and a server for sending audio/video. How do you extend it for the next latest/greatest feature.
- How does TCP windows work and what can I do to optimize performance for an application that performs lots of large reads across continents.