← Google Interview Insights

Google·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Apr 2026

Summary

Google system design screen for a System Development Engineer role. One big infrastructure question that sprawled into like five different topics. Felt like I was holding on for dear life by the end.

Questions Asked (1)

Q1

You have one server with one public IP and need to host three separate business websites, each on its own domain. Walk through how you'd make that work, covering DNS, virtual hosting, HTTPS with per-domain certificates, reverse proxying, and the trade-offs between port-based and name-based approaches.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This question sounds almost too simple until you actually try to explain all the moving parts in sequence.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then walk through the full stack from DNS to HTTPS, explaining how name-based virtual hosting with a reverse proxy (e.g., Nginx) solves the problem. Compare port-based vs. name-based approaches, highlighting trade-offs in scalability, user experience, and certificate management.

Pro tip: Emphasize that name-based virtual hosting is the industry standard because it allows unlimited domains on a single IP and port, and mention that SNI (Server Name Indication) is essential for per-domain HTTPS certificates without dedicated IPs.

1. Clarify Requirements and Constraints

Confirm that each site needs its own domain, HTTPS, and that only one public IP is available. Ask about expected traffic, scalability, and whether the sites are independent or related.

2. Configure DNS

Create A records for each domain pointing to the single public IP. Optionally, use CNAME records for subdomains or aliases.

3. Set Up Virtual Hosting and Reverse Proxy

Install a reverse proxy like Nginx or Apache. Configure name-based virtual hosts: each server block matches the incoming Host header and forwards requests to the appropriate backend application (e.g., Node.js, Python) running on different local ports.

4. Enable HTTPS with Per-Domain Certificates

Obtain TLS certificates for each domain (e.g., via Let's Encrypt). Configure the reverse proxy to use SNI to present the correct certificate based on the requested hostname. Redirect HTTP to HTTPS.

5. Discuss Trade-offs and Alternatives

Compare name-based vs. port-based virtual hosting: name-based is transparent to users (standard ports) and scales well, but relies on Host header/SNI; port-based requires users to specify ports and is less user-friendly, but can work without SNI. Mention that name-based is preferred for production.

Key Points to Mention

  • DNS A records pointing multiple domains to one IP
  • Name-based virtual hosting using the Host header (HTTP) and SNI (HTTPS)
  • Reverse proxy (e.g., Nginx) to route requests to backend services on different local ports
  • Per-domain TLS certificates with SNI for HTTPS
  • Trade-offs: name-based is seamless for users and scalable; port-based exposes non-standard ports and is less practical
  • Automation of certificate management (e.g., Certbot) and HTTP-to-HTTPS redirection

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