← Revolut Interview Insights

Revolut·Backend Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026

Summary

Revolut backend interview, got a load balancer design question that looked straightforward but had enough edge cases to trip you up if you weren't careful. Pretty standard technical screen format.

Questions Asked (1)

Q1

Design and implement a fixed-capacity load balancer that supports registering nodes, deregistering nodes, and randomly selecting a live node to route a request to. Make sure to handle edge cases like an empty pool, a full pool, and duplicate node registrations.

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

The random selection part is easy enough, but I underestimated how much time the edge cases would eat up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (fixed capacity, random selection, thread safety) and then design a data structure that supports O(1) registration, deregistration, and random selection. Use a dynamic array with a hash map for index tracking, and handle edge cases explicitly. Discuss trade-offs and potential improvements.

Pro tip: Mention thread safety early and propose using a read-write lock or concurrent data structures, as this is critical for a load balancer in production. Also, consider whether random selection should be uniform or weighted, and discuss the implications.

1. Clarify Requirements and Constraints

Ask about expected load, thread safety needs, and whether nodes have weights. Confirm that random selection should be uniform and that capacity is fixed.

2. Design Data Structures

Propose using a dynamic array (list) to store live nodes for O(1) random access, and a hash map to map node IDs to their indices for O(1) registration and deregistration.

3. Implement Core Operations

Detail register: check capacity and duplicates, add to array and map. Deregister: swap with last element, update map, remove last. Select: generate random index and return node.

4. Handle Edge Cases

Explicitly address empty pool (return null or throw exception), full pool (reject registration), and duplicate registration (ignore or throw).

5. Discuss Trade-offs and Extensions

Talk about thread safety (locks vs. concurrent structures), alternative approaches (e.g., linked list, tree), and potential improvements like weighted random selection or health checks.

Key Points to Mention

  • O(1) time complexity for all operations using array + hash map
  • Thread safety considerations: read-write lock or concurrent data structures
  • Edge case handling: empty pool, full pool, duplicate registration
  • Random selection uniformity and potential need for weighted selection
  • Memory and performance trade-offs of chosen data structures
  • Possible extensions: health checks, dynamic capacity, distributed coordination

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