Skip to content

Commit b1e1b06

Browse files
author
Joseph Luce
authored
Update edge_cases.md
1 parent c9e52a7 commit b1e1b06

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

system_design/edge_cases.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ Another case is that maybe 20% of your data is accessed by 80% of your users. Yo
1111

1212
The 80/20 rule is a great thing to think about after you have laid out your design. This is when you want to further optimize the design.
1313

14+
# Race Conditions
15+
Identify any part of your system that requires more than one component to share some piece of data.
16+
For example, if two services need to book a room at a hotel, there can be a scenario that two users want to book the same room at the hotel. You would need a locking service to block/hold any other requests for a particular room.
17+
18+
If you are making a web crawler, you need to keep track of visited webpages.
19+
Instead of allowing the web crawlers to manage the visited set, reverse the responsibilities and dedicate a component like a URL manager to distribute the URLs to the web crawlers while keeping track of the visited URLs.
20+
1421
# Shut everything down
1522
During the interview, generally a good interviewer will start asking the question of "What if this dies?".
1623
This is to move you to start thinking about single points of failures.

0 commit comments

Comments
 (0)