Skip to content

6512197/System_design_Questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 

Repository files navigation

System_design_Questions

Leetcode gets your foot in the door. System Design gets you the keys to the corner office

simulacro para mejorar tu entrevista en SD
questions

Interviewer :

Interviewer : Let us begin simply. Imagine you are tasked with designing a URL shortener service—something like bit.ly. At Stage 1 (1 user), our only concern is functional correctness. What are the core functional requirements of this service? Sketch out a minimal API design that supports shortening a URL and later retrieving it.

Interviewer : What if Scenario (Stage 1 Challenge): Suppose your single server restarts and your database gets wiped (say it was in-memory only). Suddenly, all shortened links are gone. What would you change in your design to ensure persistence and durability of links, even in this simplest architecture?

Interviewer : Let us escalate. Now we enter Stage 2 (Scaling to ~10,000 users). With this small traffic spike, our single server/database may slow down. How would you evolve your schema and architecture to handle higher traffic especially repeated reads of popular short links?

Interviewer: Now, let’s push forward to Stage 3 (Scaling to ~1M users). Now Imagine your database starts becoming a bottleneck for writes. Some short links get extremely hot (millions of clicks/hour), and some partitions of your database are overloaded. What would you do to scale your database beyond a single instance?

Interviewer:

traffic keeps growing , one short link becomes globally viral even with caching DB node can handle writes and metadata growth how would your partition (shard your database) ? explain your shard key and how to avoid hot partitions?

Interviewer:

You’ve now crossed a real boundary. If you understand this stage, you are no longer thinking like a junior engineer. Now we escalate to Stage 4: Planetary Scale (10+ million users). New constraints: Users are global (US, EU, Asia) Latency must be <100ms Regional outages must not take the system down How would you deploy this system globally?

Interviewer : I forced you to choose availability or consistency for this URL shortener at global scale, which would you choose and why? (cap)

Interviewer : How do CAP, consistency, and sharding interact?

Fun part

Interviewer : DNS ? CP or AP

PostgreSQL with synchronous replication CP or AP?

Redis (single primary, replicas enabled) CP or AP during a network partition?

Amazon DynamoDB CP or AP by default?

About

Leetcode gets your foot in the door , System Design gets you the keys to the corner office

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published