Skip to main content
All Questions

Build a TCP key-value server in C++ supporting SET, GET and DEL.

Unlock detailed company stats for this questionUpgrade

Build a TCP key-value server in C++ that maintains an in-memory store and supports SET, GET and DEL commands, returning an appropriate error for invalid commands.

Example commands: SET user:32 alvida; GET user:32; DEL user:32. SET stores the value, GET retrieves it, DEL deletes the key.

Follow-ups: introduce a proxy between the client and the server that forwards requests and responses transparently; then replace the single backend server with multiple backend servers behind a load balancer that distributes requests among them.

Expect follow-ups like

  • Introduce a proxy between the client and the server that forwards requests and responses transparently.
  • Replace the single backend server with multiple backend servers and implement a load balancer that distributes requests among them.

Community answers

No answers contributed by the community yet.

Related courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

Behavioral Interviews: A Practical Guide for Engineers

Get offers at the level you deserve. Prep for senior+ behavioral interviews at FAANG and Tier-1 companies. Made with staff and principal engineers from Meta, Netflix, Google, and more. Avoid downleveling, elevate past projects, and stop sounding like a robot.