← DocuSign Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

DocuSign full-stack round focused entirely on pagination, which sounds narrow until you're 20 minutes in and realize how many layers there are to it. Solid technical depth required, less about coding and more about design decisions and tradeoffs.

Questions Asked (1)

Q1

Design and implement a paginated list feature for a web page, covering both the backend API shape and the data model that supports it. Walk through your choices around cursor-based vs offset/limit pagination, whether to return a total count or just a has_more flag, and how you'd handle corner cases like empty results, partial last pages, items changing between requests, deep pagination performance, and stable ordering.

System DesignAPI & IntegrationsData Modeling
Author's notes

This was a lot to hold in your head at once.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (data volume, update frequency, ordering needs) and then propose a cursor-based pagination design with a stable sort key, explaining why it beats offset/limit for large or changing datasets. Define the API contract (request params, response shape with data and next_cursor/has_more) and the underlying data model (indexes on sort key). Walk through corner cases and trade-offs, mentioning when offset/limit might still be acceptable.

Pro tip: Emphasize that cursor-based pagination isn't just about performance—it also provides a consistent snapshot view, which is critical for user experience when data changes frequently. Also, mention that you'd include a total count only if the UI truly needs it, and consider approximate counts or caching to avoid expensive COUNT queries.

1. Clarify requirements and constraints

Ask about data volume, update frequency, ordering requirements, and whether the UI needs a total count. This determines the pagination strategy and API design.

2. Choose pagination strategy

Compare cursor-based vs offset/limit: cursor-based offers stable ordering and better performance for large datasets, while offset/limit is simpler but suffers from shifting results and deep pagination costs. Recommend cursor-based for most cases.

3. Design API contract and data model

Define request parameters (cursor, limit) and response shape (items, next_cursor, has_more, optional total_count). Specify the data model with a unique, immutable sort key (e.g., created_at + id) and appropriate indexes.

4. Handle corner cases

Address empty results (return empty array and null cursor), partial last page (has_more false), items changing between requests (cursor ensures consistency), deep pagination (cursor avoids offset scan), and stable ordering (tie-breaker on unique key).

5. Discuss trade-offs and alternatives

Mention when offset/limit might be acceptable (small, static datasets) and how to mitigate its issues (e.g., using a snapshot). Also discuss total count alternatives like approximate counts or separate endpoints.

Key Points to Mention

  • Cursor-based pagination uses a pointer (e.g., last seen ID or encoded sort key) to fetch the next page, avoiding offset inefficiencies and providing stable results.
  • Offset/limit pagination is simple but can skip or duplicate items when data changes and performs poorly for deep pages due to large offsets.
  • Returning a total count can be expensive; prefer has_more or next_cursor unless the UI requires a count, and consider caching or approximate counts.
  • Stable ordering requires a unique, immutable tie-breaker (e.g., created_at + id) to prevent duplicates or missing items when values are equal.
  • Corner cases: empty results return empty array and null cursor; partial last page sets has_more to false; items changing between requests are handled by cursor consistency.
  • Deep pagination performance: cursor-based pagination uses indexed seeks, while offset/limit requires scanning and discarding many rows.

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