← rippling Interview Insights

rippling·Software Engineer·Take-home Assignment·Senior

SeniorPrefer not to say
May 2026

Summary

Rippling gave me a take-home that was basically 'build a production-grade HTTP server from scratch, no libraries.' More scope than I expected for a single assignment, and it took way longer than the instructions implied it would.

Questions Asked (1)

Q1

Build a minimal HTTP/1.1 server from scratch without using any frameworks. It should listen on a configurable port, parse GET and POST requests, support a /health and /echo endpoint, serve static files with correct Content-Type headers, handle concurrent connections, enforce request timeouts, shut down gracefully, and log requests in a structured format. Return 400, 404, and 405 errors where appropriate. Include unit tests and instructions to run it locally.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This looked manageable at first glance and then I actually read the full requirements.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (language, libraries, concurrency model) to show you think before coding. Then walk through a layered architecture: socket handling, HTTP parsing, routing, and response generation, highlighting trade-offs at each layer. Finish with testing, error handling, and operational concerns like graceful shutdown and structured logging.

Pro tip: Emphasize that you'd use the standard library's HTTP server as a reference but implement your own to demonstrate understanding of the protocol; mention that you'd avoid premature optimization and focus on correctness first, then concurrency and timeouts.

1. Clarify requirements and constraints

Ask about language preference, allowed dependencies, expected load, and whether HTTP/1.1 keep-alive is required. Confirm the scope of 'from scratch' (e.g., can you use standard library sockets?).

2. Design the architecture

Outline components: a TCP listener, a connection handler with timeouts, an HTTP parser, a router, and handlers for /health, /echo, and static files. Discuss concurrency model (thread-per-connection vs. event loop) and trade-offs.

3. Implement core HTTP handling

Describe parsing request line, headers, and body (for POST). Explain routing logic, status codes (400, 404, 405), and response formatting with correct Content-Type headers.

4. Add operational features

Cover request timeouts (read/write deadlines), graceful shutdown (signal handling, closing listener, waiting for active connections), and structured logging (e.g., JSON with method, path, status, duration).

5. Testing and validation

Propose unit tests for parser, router, and handlers; integration tests using a test client. Include instructions to run locally (e.g., go run main.go --port 8080) and example curl commands.

Key Points to Mention

  • Concurrency model: thread-per-connection with a bounded pool or goroutines, and how to avoid resource exhaustion.
  • Request timeouts: setting read/write deadlines on the connection to prevent slowloris attacks.
  • Graceful shutdown: catching SIGINT/SIGTERM, stopping the listener, and draining active connections with a timeout.
  • Structured logging: JSON format with fields like timestamp, method, path, status, duration, and client IP.
  • Error handling: returning 400 for malformed requests, 404 for unknown paths, 405 for unsupported methods, and appropriate headers.
  • Static file serving: mapping URL paths to filesystem, preventing path traversal, and setting Content-Type based on file extension.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.