0
0
LLDsystem_design~20 mins

Proxy pattern in LLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Proxy Pattern Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the Proxy Pattern Purpose
Which of the following best describes the primary purpose of the Proxy pattern in system design?
ATo provide a placeholder for another object to control access to it
BTo create multiple instances of an object to improve performance
CTo directly modify the behavior of an object without changing its code
DTo combine multiple objects into a single interface for easier use
Attempts:
2 left
💡 Hint
Think about how a proxy acts as a gatekeeper or representative.
Architecture
intermediate
2:00remaining
Proxy Pattern Components Identification
In a Proxy pattern architecture, which component is responsible for implementing the same interface as the real object and controlling access to it?
AReal Subject
BProxy
CClient
DAdapter
Attempts:
2 left
💡 Hint
This component stands between the client and the real object.
scaling
advanced
2:30remaining
Scaling a System Using Proxy Pattern
You have a system where creating the real object is expensive. Using the Proxy pattern, which approach best helps to scale the system efficiently?
AUse a Remote Proxy to replicate the real object on multiple servers
BUse a Protection Proxy to limit the number of clients accessing the real object
CUse a Virtual Proxy to delay the creation of the real object until it is needed
DUse a Cache Proxy to store multiple copies of the real object in memory
Attempts:
2 left
💡 Hint
Think about delaying expensive operations until absolutely necessary.
tradeoff
advanced
2:30remaining
Tradeoffs of Using Proxy Pattern
What is a common tradeoff when using the Proxy pattern in system design?
ADifficulty in testing because proxies cannot be replaced with mocks
BReduced security because the proxy exposes internal details of the real object
CLoss of flexibility since the proxy cannot implement the same interface as the real object
DIncreased complexity and potential performance overhead due to extra indirection
Attempts:
2 left
💡 Hint
Consider what extra step the proxy adds to method calls.
component
expert
3:00remaining
Request Flow in Proxy Pattern
Given a Proxy pattern implementation, what is the correct sequence of components involved when a client requests a service?
A1,2,3,4
B1,3,2,4
C2,1,3,4
D1,2,4,3
Attempts:
2 left
💡 Hint
Think about the natural flow from client to proxy to real object and back.