← Google Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

Google system design round for a software engineering role. The whole session was basically one big question about designing a server pool manager at scale, and it went deep fast.

Questions Asked (1)

Q1

Design a service to manage a large pool of roughly 100,000 server nodes, where each node can satisfy multiple instance types. The service needs a getServer(reqNumOfServer, instanceTypes[]) API to allocate servers matching the requested types, and a returnServer(ids[]) API to release them. Walk through your data structures, indexing strategy, how you'd minimize fragmentation, handle concurrency and starvation, and what happens when nodes fail.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

This one sprawled in every direction.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose an inverted index mapping instance types to available servers, using a greedy allocation strategy to minimize fragmentation. Discuss concurrency with fine-grained locking or sharding, and fault tolerance with health checks and reallocation.

Pro tip: Emphasize that the system should be designed for observability and graceful degradation—e.g., if a node fails, the service should automatically mark it unhealthy and trigger reallocation without impacting ongoing allocations.

1. Clarify Requirements and Scale

Ask about request patterns, instance type diversity, latency SLAs, and consistency needs. Confirm that nodes can satisfy multiple instance types and that allocation should be atomic.

2. Design Data Structures and Indexing

Propose an inverted index from instance type to a set of available server IDs, plus a server metadata store. Consider using a distributed key-value store or in-memory sharded maps for scalability.

3. Allocation and Fragmentation Strategy

Use a greedy algorithm that picks servers with the fewest remaining compatible types to reduce fragmentation. For multiple instance types, solve as a bipartite matching or flow problem if needed.

4. Concurrency and Starvation Handling

Implement fine-grained locking per instance type or use optimistic concurrency with versioning. Ensure fairness by using queues or time-based priorities to prevent starvation.

5. Failure Handling and Recovery

Use heartbeats and health checks to detect node failures. On failure, mark node unavailable, release its allocations, and trigger reallocation for affected requests.

Key Points to Mention

  • Inverted index for efficient lookup of servers by instance type
  • Greedy allocation to minimize fragmentation (e.g., best-fit decreasing)
  • Sharding or partitioning to handle 100k nodes and concurrency
  • Optimistic locking or fine-grained locks to avoid contention
  • Fair queuing or aging to prevent starvation
  • Health checks, heartbeats, and automatic failover for node failures

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