Codemia | My Solution for Designing a Simple URL Shortening Service: A TinyURL Approach with Score: 9/10

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:29 PM on 2/1/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

24 Terms

1
New cards

What is the main functionality of a URL shortening service?

To take a long URL and return a shorter format of that URL.

2
New cards

What is a non-functional requirement for the URL shortening service?

Availability over consistency.

3
New cards

How many reads and writes per second does the capacity estimation suggest?

Approximately 100 reads per second and 1 write per second.

4
New cards

What is the estimated daily data usage based on 1 read per second?

800 MB of data every day.

5
New cards

What type of API is used to access the shortened URL?

A GET request API that returns a 302 on success or 404 on failure.

6
New cards

In the database design, what type of store is suggested for a URL shortening service?

A simple persistent key-value store.

7
New cards

What algorithm is mentioned for redirecting requests to application servers?

Round Robin (RR) stateless algorithm.

8
New cards

What caching strategy is suggested for read requests in the service architecture?

Using an in-memory cache.

9
New cards

What is the acceptable latency goal for redirection?

Less than 20 milliseconds.

10
New cards

What does the write-around cache strategy involve?

The request is written only to the database without being written to the cache.

11
New cards

What is a major concern when generating unique IDs for shortened URLs?

Ensuring that two opposite strings do not generate the same hash.

12
New cards

What does eventual consistency mean in the context of this URL shortening service?

The system does not guarantee immediate availability of the link after creation.

13
New cards

What is one potential failure scenario mentioned for the service?

The system can go down if there is a sudden surge of traffic from a famous person posting a URL.

14
New cards

What approach could be taken to mitigate high traffic caused by popular links?

Using a 'push' based approach in cache for famous users.

15
New cards

What trade-off is made regarding latency and consistency?

Trading off consistency for faster read latency.

16
New cards

What challenge is mentioned regarding the database during high traffic?

The cache might miss and redirect all requests to the database, causing slowdowns.

17
New cards

What is one of the future improvements suggested for the service?

Implementing a mechanism to handle thundering herd problems.

18
New cards

What is meant by 'lowering write latency'?

Reducing the time it takes for a write request to be processed.

19
New cards

What kind of data has to be checked during the hash generation?

Checking whether the generated hash is already present in the database.

20
New cards

What is meant by LRU in the context of caching?

Least Recently Used cache eviction policy.

21
New cards

What algorithm is suggested for generating hashes?

A hash algorithm that maps long URLs to shorter strings.

22
New cards

What does 'trading off write latency for read latency' imply?

Prioritizing fast reads, even if writes are slower.

23
New cards

What is a consequence of using a write-around cache?

Higher cache miss rates, impacting read performance.

24
New cards

In Distributed Systems, what is an SPOF?

Single Point of Failure.

Explore top notes

note
Nervous System
Updated 1292d ago
0.0(0)
note
Chapter Eleven: Eating Disorders
Updated 1073d ago
0.0(0)
note
Français 2
Updated 1175d ago
0.0(0)
note
Aller Test
Updated 722d ago
0.0(0)
note
Verbal Forms
Updated 668d ago
0.0(0)
note
science
Updated 1263d ago
0.0(0)
note
Nervous System
Updated 1292d ago
0.0(0)
note
Chapter Eleven: Eating Disorders
Updated 1073d ago
0.0(0)
note
Français 2
Updated 1175d ago
0.0(0)
note
Aller Test
Updated 722d ago
0.0(0)
note
Verbal Forms
Updated 668d ago
0.0(0)
note
science
Updated 1263d ago
0.0(0)

Explore top flashcards

flashcards
370 CANCER PREVENTION
89
Updated 1093d ago
0.0(0)
flashcards
AP Psych Unit 2
48
Updated 900d ago
0.0(0)
flashcards
Science - Unit 2 Quiz
28
Updated 1214d ago
0.0(0)
flashcards
PD E2- General symptoms
58
Updated 367d ago
0.0(0)
flashcards
Ar Verbs
56
Updated 1162d ago
0.0(0)
flashcards
Fisiologia Cardiovascular
21
Updated 347d ago
0.0(0)
flashcards
370 CANCER PREVENTION
89
Updated 1093d ago
0.0(0)
flashcards
AP Psych Unit 2
48
Updated 900d ago
0.0(0)
flashcards
Science - Unit 2 Quiz
28
Updated 1214d ago
0.0(0)
flashcards
PD E2- General symptoms
58
Updated 367d ago
0.0(0)
flashcards
Ar Verbs
56
Updated 1162d ago
0.0(0)
flashcards
Fisiologia Cardiovascular
21
Updated 347d ago
0.0(0)