← flipster Interview Insights

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

Senior
Jul 2026

Summary

Two system design questions back to back at Flipster for a software engineer role. One was the classic snowflake-style ID generator and the other was a parking lot OOP design. Pretty standard senior-level stuff but there's a lot of surface area to cover in a single session.

Questions Asked (2)

Q1

Design a distributed service that generates globally unique 64-bit integer IDs at very high throughput, with time-ordered output and support for sharding across many nodes.

System DesignTechnical Trade-offsData Modeling
Author's notes

I went straight to the bit layout: timestamp in the upper bits, worker ID in the middle, sequence counter at the bottom.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: 64-bit, time-ordered, high throughput, sharding. Then propose a Snowflake-like ID structure with timestamp, node ID, and sequence, and discuss trade-offs like clock synchronization and node ID assignment.

Pro tip: Mention that you can use a monotonic clock or a logical clock to avoid time going backwards, and consider using a coordination service like ZooKeeper for node ID assignment to ensure uniqueness.

1. Clarify Requirements

Confirm the need for 64-bit IDs, time-ordered, high throughput, and sharding. Ask about expected QPS, latency, and fault tolerance.

2. Design ID Structure

Propose a layout: e.g., 41-bit timestamp, 10-bit node ID, 12-bit sequence. Explain how this ensures uniqueness and time-ordering.

3. Handle Sharding and Node Coordination

Discuss how to assign unique node IDs, e.g., via configuration, ZooKeeper, or a central service. Mention that node ID bits limit the number of nodes.

4. Address Clock Synchronization

Explain the use of NTP and how to handle clock drift or backwards time, e.g., by waiting or using a logical clock.

5. Discuss Trade-offs and Scalability

Compare with alternatives like UUIDs, database auto-increment, or Twitter Snowflake. Discuss throughput limits and how to scale.

Key Points to Mention

  • Snowflake ID structure: timestamp, node ID, sequence
  • Clock synchronization and handling clock drift
  • Node ID assignment and coordination
  • Sequence number overflow and handling within the same millisecond
  • Throughput and scalability considerations
  • Comparison with other ID generation methods (UUID, database sequences)

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

Q2

Design a parking lot management system with multiple levels, different spot types, ticketing, fee calculation, and concurrent spot assignment.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

Started with the class hierarchy and that went fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (e.g., scale, spot types, payment methods) to scope the design. Then outline the core components (levels, spots, tickets, fee calculation, concurrency) and dive into the data model and APIs, highlighting trade-offs and concurrency strategies.

Pro tip: Emphasize concurrency control early: discuss optimistic vs. pessimistic locking and how you'd handle race conditions when multiple cars enter simultaneously. This shows you think about real-world reliability, not just happy paths.

1. Clarify Requirements

Ask questions to understand scale (number of levels, spots), spot types (compact, large, EV, handicapped), payment methods, and expected concurrency. This ensures you design for the right constraints.

2. Define Core Entities and APIs

Identify main objects: ParkingLot, Level, Spot, Vehicle, Ticket, Payment. Sketch key APIs: parkVehicle, unparkVehicle, calculateFee, assignSpot. This sets the foundation for the design.

3. Design Data Model and Storage

Choose a database (SQL vs NoSQL) and schema. Consider indexing for fast spot lookup. Discuss how to represent spot availability and ticket status.

4. Handle Concurrency and Spot Assignment

Explain strategies to avoid double-booking: database transactions, optimistic locking, or distributed locks. Describe the spot assignment algorithm (e.g., nearest available spot of correct type).

5. Fee Calculation and Payment Integration

Outline fee rules (hourly, flat, peak pricing). Describe how to compute fees on exit and integrate with payment gateways. Mention idempotency and error handling.

Key Points to Mention

  • Concurrency control mechanisms (e.g., optimistic locking, database transactions) to prevent double-booking.
  • Scalability considerations: partitioning by level or using a distributed cache for spot availability.
  • Flexible fee calculation with support for different pricing models and discounts.
  • API design for entry/exit, including idempotent operations and error responses.
  • Data model choices: SQL for ACID vs NoSQL for scale, and indexing strategies.
  • Handling edge cases: full lot, lost ticket, payment failure, and spot type mismatches.

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