The first design problem involved a service that exposes an API conceptually similar to:
getData(countryCode, year)
For example:
getData("US", 2026)
should return the holidays for that country and year, such as New Year's Day and Christmas. The existing architecture had several layers. Client applications did not call the Holiday Service directly. Instead, they accessed it through a C++ adapter / library.
There were many client applications running across different machines, all sharing the same Holiday Service. The Holiday Service itself did not own the holiday dataset. It called another lower-level service maintained by a separate team.
Conceptually:
Many Client Applications
|
v
C++ Adapter / Library
|
v
Holiday Service
|
v
Lower-Level Holiday Service
Many Client Applications
|
v
C++ Adapter / Library
|
v
Holiday Service
|
v
Lower-Level Holiday Service
The Holiday Service also transformed the downstream representation before returning data to clients. For example, the lower-level service might return 12/25 while the Holiday Service converts that into 2026/12/25.
The important follow-up was latency. The existing end-to-end request took roughly 150 ms, and some clients considered that too slow. The interviewer asked: *How would you redesign or optimize
Unlock Full Details
Create a free account to unlock this interview experience report.