PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Adyen

Design scalable LRU cache and backtracking API

Last updated: May 23, 2026

Quick Overview

This question evaluates understanding of scalable system design, concurrent in-process caching and eviction semantics, distributed cache topologies, API design for compute-heavy services, observability and metrics, consistency models, rate limiting, autoscaling, and validation/testing strategies.

  • hard
  • Adyen
  • System Design
  • Software Engineer

Design scalable LRU cache and backtracking API

Company: Adyen

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Build two production-ready services: A) A thread-safe LRU caching service. Specify API, in-process concurrency control (e.g., fine-grained locks or lock-free techniques), eviction correctness under concurrent access, TTL/size limits, metrics, and observability. Discuss how you would scale it across multiple instances using Redis or sharding/consistent hashing, handle hot keys, replication/failover, backpressure, and data consistency. B) A compute-heavy find-transfer-combinations API that may receive spikes of requests. Describe stateless vs stateful design, avoiding shared mutable state in workers, per-request memory management, caching/precomputation strategies, request de-duplication, rate limiting, timeouts, idempotency, and horizontal scaling. Provide capacity estimates and a testing plan.

Quick Answer: This question evaluates understanding of scalable system design, concurrent in-process caching and eviction semantics, distributed cache topologies, API design for compute-heavy services, observability and metrics, consistency models, rate limiting, autoscaling, and validation/testing strategies.

Adyen logo
Adyen
Jul 26, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
5
0

System Design: Two Production-Ready Services

A) Thread-Safe LRU Caching Service

Design and describe a production-ready, in-process LRU cache that can also be deployed as a networked cache service.

Specify:

  1. API surface (in-process library and optional network endpoints): get/put/delete/computeIfAbsent, per-entry TTL, size limits, stats.
  2. Concurrency control inside a process (e.g., fine-grained locks, lock striping, or lock-free techniques). Ensure eviction is correct under concurrent access.
  3. TTL and capacity management (entry count limit, weighted by bytes, admission control).
  4. Metrics and observability (hits/misses, evictions, latencies, saturation, traces, logs, debug endpoints).
  5. Scaling across multiple instances:
    • Using Redis (or another remote cache): topology, client behavior, backpressure, failure handling.
    • Or client-side sharding with consistent hashing: hot key mitigation, replication/failover, rebalancing, consistency model.
  6. Handling hot keys, backpressure, and data consistency semantics (cache-aside/write-through, stale reads, idempotency of updates, CAS).

Provide concrete choices and trade-offs.

B) Compute-Heavy "Find Transfer Combinations" API

Design an API that computes transfer route combinations (e.g., finding valid paths across payment rails/providers with constraints), with potential traffic spikes.

Specify:

  1. Stateless vs. stateful design; avoid shared mutable state in workers and define per-request memory management.
  2. Caching and precomputation strategies; request de-duplication (in-process and cross-instance).
  3. Rate limiting, timeouts/deadlines, cancellation, idempotency.
  4. Horizontal scaling and autoscaling policies; synchronous vs. async job modes.
  5. Capacity estimates with clear assumptions and formulas.
  6. A testing plan covering correctness, performance, reliability, and operability.

Make any minimal, explicit assumptions needed so the design is concrete.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Adyen•More Software Engineer•Adyen Software Engineer•Adyen System Design•Software Engineer System Design
PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL 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.