← DocuSign Interview Insights

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

Senior
Apr 2026

Summary

DocuSign system design round for a software engineer role, focused entirely on building a paginated list feature end to end. The scope was broader than I expected, covering frontend, API design, data modeling, and database indexing all in one question.

Questions Asked (5)

Q1

Design a paginated list feature for a web app, covering the frontend UI, backend API, data model, and database indexing strategy.

System DesignAPI & IntegrationsData Modeling
Author's notes

I started with the API layer because that felt most natural, but I think that was a mistake.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements like scale, consistency, and sorting, then walk through the full stack from UI to database. Emphasize trade-offs between offset and cursor-based pagination, and explain how indexing supports the chosen approach.

Pro tip: Mention that cursor-based pagination is preferred for large, frequently updated datasets to avoid duplicates or missing items, and that DocuSign likely deals with such scenarios.

1. Clarify Requirements

Ask about expected scale, data volatility, sorting needs, and consistency requirements to tailor the design.

2. Design the API

Define endpoints with pagination parameters (e.g., cursor or offset/limit) and response structure including metadata like total count and next cursor.

3. Design the Data Model and Indexing

Choose a schema and indexes that support efficient pagination queries, considering composite indexes for sorting and filtering.

4. Design the Frontend UI

Outline UI components for pagination controls, loading states, and error handling, ensuring a smooth user experience.

5. Discuss Trade-offs and Scalability

Compare offset vs. cursor pagination, explain indexing strategies, and address potential bottlenecks like deep pagination.

Key Points to Mention

  • Cursor-based vs. offset pagination trade-offs
  • Database indexing strategies (e.g., composite indexes, covering indexes)
  • API design for pagination (e.g., cursor tokens, limit/offset parameters)
  • Frontend implementation (e.g., infinite scroll vs. page numbers, caching)
  • Handling consistency and duplicates in paginated results
  • Scalability considerations for large datasets

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

Q2

What are the tradeoffs between offset-based and cursor-based pagination, and when would you choose one over the other?

Technical Trade-offsSystem Design
Author's notes

This came as a follow-up and I actually felt okay here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining both pagination methods clearly, then compare them across key dimensions like performance, consistency, and usability. Use a concrete example (e.g., a document list in DocuSign) to illustrate tradeoffs, and conclude with guidelines on when to choose each based on data volatility and access patterns.

Pro tip: Mention that cursor-based pagination is often preferred for real-time or large datasets because it avoids the 'page drift' problem, but offset-based is simpler for static data and allows jumping to arbitrary pages. Also, note that cursors can be opaque and may require encoding/decoding, which adds complexity.

1. Define both methods

Briefly explain offset-based pagination (using LIMIT/OFFSET) and cursor-based pagination (using a pointer to a specific record, often encoded).

2. Compare on key dimensions

Discuss performance (offset gets slower with large offsets), consistency (cursors avoid duplicates/skips when data changes), and flexibility (offset allows random access, cursors are sequential).

3. Highlight use cases

Give scenarios where each shines: offset for admin dashboards with stable data and page numbers; cursor for infinite scroll feeds or APIs with high write volume.

4. Address implementation considerations

Mention challenges like cursor encoding (e.g., base64 of sort key + ID), handling deletions, and ensuring stable sort order.

5. Conclude with recommendation

Summarize that the choice depends on requirements: prioritize cursor for scalability and consistency, offset for simplicity and random access.

Key Points to Mention

  • Performance degradation of offset with large datasets due to full table scans
  • Consistency issues with offset when data is inserted/deleted (page drift)
  • Cursor-based pagination provides stable results and better performance for large, changing datasets
  • Offset-based allows jumping to specific pages, which is useful for UI with page numbers
  • Cursor implementation requires a unique, sequential column (e.g., timestamp + ID) and encoding
  • Tradeoff between simplicity (offset) and scalability/consistency (cursor)

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

Q3

How would you handle items being inserted or deleted while a user is actively paginating through results?

System DesignTechnical Trade-offs
Author's notes

This is where cursor pagination earns its keep.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the problem: pagination over a mutable dataset can lead to duplicates, missing items, or inconsistent ordering. Then present a few strategies (e.g., cursor-based pagination, snapshot isolation, versioning) and discuss trade-offs in terms of consistency, performance, and complexity, tailored to DocuSign's document-heavy, transactional context.

Pro tip: Mention that the best solution depends on the consistency requirements and scale; for example, cursor-based pagination with a stable sort key (like creation timestamp + ID) is often sufficient, but for strict consistency you might need a snapshot or versioned view. Also, highlight the importance of idempotent client handling to gracefully manage duplicates or gaps.

1. Clarify requirements and constraints

Ask about consistency needs (strong vs. eventual), data volume, read/write patterns, and whether the user expects a stable view. This shows you don't jump to solutions without context.

2. Identify the core problem

Explain that offset-based pagination is vulnerable to insertions/deletions because offsets shift, causing duplicates or skipped items. This demonstrates understanding of the root cause.

3. Propose solutions with trade-offs

Discuss options like cursor-based pagination (using a stable, unique sort key), snapshot isolation (e.g., point-in-time views), or versioning. For each, outline pros and cons in terms of consistency, performance, and implementation complexity.

4. Recommend an approach

Based on the clarified requirements, recommend a pragmatic solution. For DocuSign, emphasize cursor-based pagination with a tiebreaker (e.g., created_at + document_id) for most cases, and mention snapshot isolation for critical flows.

5. Address edge cases and client handling

Discuss how to handle duplicates or missing items on the client side (e.g., deduplication by ID, idempotent operations) and how to communicate consistency guarantees to users.

Key Points to Mention

  • Offset-based pagination pitfalls: shifting offsets due to inserts/deletes cause duplicates or skipped items.
  • Cursor-based pagination: using a stable, unique sort key (e.g., created_at + ID) to fetch next page reliably.
  • Snapshot isolation or point-in-time views: providing a consistent snapshot for the duration of pagination.
  • Versioning or soft deletes: marking items as deleted instead of removing them, so pagination remains stable.
  • Trade-offs: consistency vs. performance vs. complexity; eventual consistency may be acceptable for some use cases.
  • Client-side handling: deduplication, idempotent operations, and clear UX for when data changes mid-pagination.

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

Q4

What metadata should the API response include to support the pagination UI, and how do you handle the 'is there a next page' problem efficiently without counting all rows?

API & IntegrationsSystem Design
Author's notes

Neat little trick I'd seen before: fetch limit+1 rows, if you get back more than limit you know there's a next page, then trim the extra one before returning.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the essential metadata fields for pagination UI, such as cursors, page size, and total count (if available). Then explain how to determine if a next page exists without counting all rows, using techniques like fetching page size + 1 items or leveraging cursor-based pagination. Emphasize efficiency and scalability, especially for large datasets.

Pro tip: Mention that returning a 'total count' can be expensive and often unnecessary; instead, use a 'has_more' boolean or next cursor to indicate more pages. This shows you prioritize performance and understand real-world API design trade-offs.

1. Identify required metadata

List the metadata needed for pagination UI, such as current page cursor, page size, next/previous cursors, and a flag indicating if more pages exist.

2. Choose pagination strategy

Decide between offset-based and cursor-based pagination. For large or dynamic datasets, cursor-based is more efficient and avoids the need to count all rows.

3. Determine 'has next page' efficiently

Fetch one extra item beyond the page size. If you get that extra item, there is a next page; otherwise, it's the last page. This avoids a full count.

4. Handle edge cases and consistency

Discuss how to handle deletions/insertions between requests, and ensure cursors are stable (e.g., using a unique, sequential field like ID or timestamp).

5. Summarize benefits and trade-offs

Highlight that this approach is O(1) in terms of extra data fetched, scales well, and provides a good user experience without expensive count queries.

Key Points to Mention

  • Cursor-based pagination (e.g., using opaque cursors or keyset pagination) is more efficient than offset-based for large datasets.
  • Metadata fields: next_cursor, prev_cursor, has_more (boolean), page_size, and optionally total_count if cheaply available.
  • Technique: fetch page_size + 1 records to determine if a next page exists without counting all rows.
  • Avoid SELECT COUNT(*) on large tables; it can be slow and lock rows.
  • Ensure cursors are stable and unique (e.g., based on a sort key like created_at + id) to prevent duplicates or missing items.
  • Consider caching or approximate counts if total count is needed for UI, but clarify it's optional.

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

Q5

What database indexes would you create to support efficient newest-first pagination with stable ordering?

Data ModelingSystem Design
Author's notes

Blanked for a second on the exact syntax.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the query pattern and data model, then propose a composite index on the sort key and a unique tiebreaker (e.g., created_at DESC, id DESC). Explain how this index supports keyset pagination and avoids offset inefficiency, and discuss trade-offs with write overhead and storage.

Pro tip: Mention that for stable ordering, the tiebreaker must be unique and immutable; using a mutable column like updated_at can cause duplicates or missing rows during pagination. Also note that keyset pagination is preferred over OFFSET for large datasets.

1. Clarify requirements

Confirm the exact query: newest-first ordering, stable tiebreaker, and pagination method (offset vs keyset). Ask about data volume, write rate, and whether the sort key is immutable.

2. Design composite index

Propose an index on (created_at DESC, id DESC) or (created_at DESC, unique_tiebreaker DESC) to support ordering and filtering. Explain that the order of columns matters and that DESC is often default in B-tree indexes.

3. Explain pagination strategy

Describe how the index enables keyset pagination: WHERE (created_at, id) < (last_created_at, last_id) ORDER BY created_at DESC, id DESC LIMIT N. Contrast with OFFSET which scans and discards rows.

4. Address trade-offs

Discuss write amplification, index size, and maintenance. Mention that if filtering by other columns is common, consider including them in the index or using a covering index.

5. Consider alternatives

Mention that for very high write throughput, a clustered index or a different storage engine (e.g., LSM-tree) might be better. Also note that if the sort key is not unique, a unique tiebreaker is essential.

Key Points to Mention

  • Composite index on (created_at DESC, id DESC) for stable ordering
  • Keyset pagination (seek method) vs OFFSET for efficiency
  • Importance of a unique, immutable tiebreaker (e.g., id) to avoid duplicates/skips
  • Index column order and sort direction (DESC) matching the query
  • Trade-offs: write overhead, storage, and maintenance
  • Covering index or included columns if filtering by other fields

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