0
0
LLDsystem_design~20 mins

Transaction history in LLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Transaction History Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Design a scalable transaction history storage system

You need to design a system that stores and retrieves transaction histories for millions of users efficiently. Which architectural choice best supports fast writes and reads while scaling horizontally?

AUse a distributed NoSQL database with sharding based on user ID.
BUse a single relational database with vertical scaling and complex indexing.
CStore all transactions in flat files on a single server and read sequentially.
DUse an in-memory cache only without persistent storage.
Attempts:
2 left
💡 Hint

Think about how to handle large data volumes and many users simultaneously.

scaling
intermediate
2:00remaining
Estimate storage needs for transaction history

Your system records 10 million transactions daily. Each transaction record is 1 KB. Estimate the storage needed for 1 year of data, considering 20% overhead for indexing and metadata.

AApproximately 3.65 TB
BApproximately 5.0 TB
CApproximately 2.92 TB
DApproximately 4.38 TB
Attempts:
2 left
💡 Hint

Calculate total raw data size, then add 20% overhead.

tradeoff
advanced
2:00remaining
Choosing between consistency and availability for transaction history

Your transaction history system must be highly available but also provide accurate data. Which tradeoff approach is best?

APrioritize availability with eventual consistency, allowing temporary stale reads.
BPrioritize strong consistency with synchronous replication, sacrificing availability during network partitions.
CUse no replication to avoid consistency issues, risking data loss.
DUse asynchronous replication with no conflict resolution.
Attempts:
2 left
💡 Hint

Consider the CAP theorem and the system's need for availability.

component
advanced
2:00remaining
Identify the key components for a transaction history system

Which set of components is essential for a robust transaction history system that supports querying, storage, and data integrity?

AIn-memory cache only, no persistent storage, no validation
BLoad balancer, distributed database, query API, data validation module
CSingle server, flat file storage, manual backups, no API
DClient-side storage, no server, no validation
Attempts:
2 left
💡 Hint

Think about components that ensure scalability, accessibility, and correctness.

🧠 Conceptual
expert
3:00remaining
Trace the request flow for retrieving a user's transaction history

Describe the correct sequence of steps when a client requests their transaction history from a distributed system.

A2,1,3,4,5,6
B1,3,2,4,5,6
C1,2,3,4,5,6
D1,2,4,3,5,6
Attempts:
2 left
💡 Hint

Authentication must happen before routing the request.