PracHub
QuestionsLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Ramp

Build a Resilient Chain of Clue-Driven HTTP Requests

Last updated: Jul 22, 2026

Quick Overview

Design a robust client that follows clue-driven HTTP responses until it reaches a result. Work through retry budgets, deadlines, backoff, malformed payloads, loop detection, idempotency, cross-origin token safety, response-size limits, resumability, and testable transport abstractions.

  • hard
  • Ramp
  • Software Engineering Fundamentals
  • Software Engineer

Build a Resilient Chain of Clue-Driven HTTP Requests

Company: Ramp

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Onsite

# Build a Resilient Chain of Clue-Driven HTTP Requests Implement or design a client that starts from one URL and follows a chain of HTTP responses. A successful JSON response may contain: - `next_url`, the URL for the next request; - `access_token`, a bearer token required by one or more later requests; and - `result`, which terminates the chain and must be returned. Some requests fail transiently. The client should retry retryable failures without duplicating unlimited work, carry a received bearer token only where policy allows it, and stop safely on malformed responses, loops, or an excessive chain length. ### Constraints & Assumptions - Treat timeouts, connection resets, HTTP 429, and HTTP 5xx as potentially retryable. - Treat other HTTP 4xx responses as terminal unless the response explicitly supplies a new authentication clue. - A maximum-attempt count, total deadline, and maximum-hop count are configurable. - Response bodies can be size-limited before parsing. ### Clarifying Questions to Ask - Can `next_url` change host, and which hosts may receive the bearer token? - Are requests always idempotent GETs? - Does a newer token replace the old one, and can a response intentionally clear it? - What output or audit information is required on failure? ### What a Strong Answer Covers - An explicit state machine for URL, token, hop count, and retry budget - Retry classification, backoff with jitter, and server-directed delays - Loop detection and resource limits - Token-origin validation and redacted logging - Testability through an injected HTTP transport and clock ### Follow-up Questions - What changes if one clue requires a non-idempotent POST? - How do you avoid leaking a token during a cross-origin redirect? - Should the retry budget be per hop or global? - How would you make a long-running chain resumable after process failure?

Quick Answer: Design a robust client that follows clue-driven HTTP responses until it reaches a result. Work through retry budgets, deadlines, backoff, malformed payloads, loop detection, idempotency, cross-origin token safety, response-size limits, resumability, and testable transport abstractions.

Related Interview Questions

  • Design a Tunable Recurring-Transaction Detector - Ramp (hard)
  • Build a Wordle-Style Game in React - Ramp (medium)
  • Implement Spreadsheet Cells with Dependencies - Ramp (medium)
  • Implement a Single-Screen Tic-Tac-Toe Game with State Management - Ramp (medium)
|Home/Software Engineering Fundamentals/Ramp

Build a Resilient Chain of Clue-Driven HTTP Requests

Ramp logo
Ramp
Jul 18, 2026, 12:00 AM
hardSoftware EngineerOnsiteSoftware Engineering Fundamentals
0
0

Build a Resilient Chain of Clue-Driven HTTP Requests

Implement or design a client that starts from one URL and follows a chain of HTTP responses. A successful JSON response may contain:

  • next_url , the URL for the next request;
  • access_token , a bearer token required by one or more later requests; and
  • result , which terminates the chain and must be returned.

Some requests fail transiently. The client should retry retryable failures without duplicating unlimited work, carry a received bearer token only where policy allows it, and stop safely on malformed responses, loops, or an excessive chain length.

Constraints & Assumptions

  • Treat timeouts, connection resets, HTTP 429, and HTTP 5xx as potentially retryable.
  • Treat other HTTP 4xx responses as terminal unless the response explicitly supplies a new authentication clue.
  • A maximum-attempt count, total deadline, and maximum-hop count are configurable.
  • Response bodies can be size-limited before parsing.

Clarifying Questions to Ask Guidance

  • Can next_url change host, and which hosts may receive the bearer token?
  • Are requests always idempotent GETs?
  • Does a newer token replace the old one, and can a response intentionally clear it?
  • What output or audit information is required on failure?

What a Strong Answer Covers Guidance

  • An explicit state machine for URL, token, hop count, and retry budget
  • Retry classification, backoff with jitter, and server-directed delays
  • Loop detection and resource limits
  • Token-origin validation and redacted logging
  • Testability through an injected HTTP transport and clock

Follow-up Questions Guidance

  • What changes if one clue requires a non-idempotent POST?
  • How do you avoid leaking a token during a cross-origin redirect?
  • Should the retry budget be per hop or global?
  • How would you make a long-running chain resumable after process failure?
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Ramp•More Software Engineer•Ramp Software Engineer•Ramp Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.