Round 2 (System Design)
The interviewer joined and made me comfortable. He asked me about the current project in AJIO on which I worked. It was a detailed discussion and he asked a lot of counter questions.
After this, he asked me to design a URL Shortener for which he gave me some functional and non-functional requirements.
The solution which we discussed :
NFR :
Read: 50
Write: 50
load: 100 RPM
50 * 60 = 3000
1-day url generated: 24 * 60 * 50
1 year : 365 * 24 * 60 * 50 = 26280000
100 year : 365 * 24 * 60 * 50 = 26280000 * 100
total alphabets : small + big + numeric = 62
4 char : 14776336 = 62 * 62 * 62 * 62
5 char : 916132832 = 62 * 62 * 62 * 62 * 62
character: 5
ββββββββββ
62 Base Encoding:
1 : big_url : short _url
{
long_url : short_url
}
βββββββββββ-
Clean up Job: to Clean the table (before 1 year)
New Job for Url Creation: Every Hour : > 3000 Short Urls and Identifiers
ββββββββββββ
Data Base : 1245 -> BASE 62 -> {
prefined: string: XYZ
Len < defined length :
Len = defined length : -> good
Len > defined length :
}
982345 -> Base 62: 1245: ABC
columns : id : log_url : short_url: last_read_timestamp
Write: Post Request
/URL-shortener/v1/
{
url: βlong-URLβ;
}
Read: Get Request
/url-shortner/v1/{short-url}
Latency :
key: short_url_hash (5 characters)
value: long_url
TTL: 2 Days
He was satisfied with the solution which we discussed and he gave me some points on which I could improve this design.
The recruiter called and told me that I had cleared this round.
Walmart Interview Experience
Education: B.Tech Tier-2
Years of experience: 2 yr 4 months
Location: Bangalore
Walmart Interview Experience IN3
The recruiter approached me through the Naukri Portal and I was told that 3 rounds would happen including DSA, System Design and Managerial rounds.
On the interview day, I was a bit nervous but somehow I managed my nerves.
Contact Us