Back to course home
0% completed
Vote For New Content
When partitioning based on PhotoID, does this not still have the issue where a u...
DogBiscuit
Feb 28, 2022
When partitioning based on PhotoID, does this not still have the issue where a user's photos maybe be on multiple shards? Would this still cause higher latency for getting all of a user's photos?
1
0
Comments
Comments
A
Aruna Kalagnanam4 years ago
My approach for retrieving by userId : Create another table say photos_by_userId, where userId is the partition key and will hold the links to the photos uploaded by the user. Using NoSQL data stores means that tables will denormialized, so there will be duplication. Wi...
S
Szymon a year ago
Indeed partition on PhotoID wouldn't make sense with proposed schema you need additional table as suggested by Aruna to find mapping between UserID to PhotoID.
On this page
- What is Instagram?
Try it yourself
Designing Instagram (video)
- Requirements and Goals of the System
- Some Design Considerations
- Capacity Estimation and Constraints
- High Level System Design
- Database Schema
- Data Size Estimation
- Component Design
- Reliability and Redundancy
- Data Sharding
- Ranking and News Feed Generation
- News Feed Creation with Sharded Data
- Cache and Load balancing