Sytem Design Excercises
To run any excercise, go the folder and run the following, Additional details added in the excercise folder:
go mod init example.com/main
go mod tidy
go run .
Week-1
Week-2
Week-3
Week-4
- Implement a Toy CDN
- Mimick CDN Failover - on Toy CDN
- Implement pre-signed URL based upload on S3
- Configure CDN to serve Popular Searches JSON response
- Implement JWT based auhthentication
- Build GitHub like OG image and server it via CDN
- Key learning: generating images in backend server and putting it behind a CDN
- Measure the impact of denormalization
- Define a user collection in MongoDB with blogs as its attribute
- Store blogs object in the user document demonting all blogs that a person wrote.
- Store the entire object intead of reference.
- Now benchmark and find out how slow the response times gets as we increase the number of elements in the blogs array
- Implement Lazy Loading of images on frontend
- Implement 5 approaches to count post per hashtag & STOP THE WORLD
- Populate on_msg_event while using websocket.
- Try to identify when the connection breaks and use that opportunity to write event to Kafka
- Configure Redis in cluster mode and figure out how data is distrubuted
- Implement newly unread message indicator on database
- Compute on the fly
- Creates messages table with 1 million rows
- Add one indexes for each column part of the where clause that is queried and measure the time taken
- Compute with mentioned composite indexes, and measure the performance
- Re-arrange the columns and mesure the performance impact
Week-5
Week-6
Week-7
- Implement recent search as discussed during the session
- Capture search logs and make them queryable
- From an HTTP request, extract all possible meta info
- Ingest them in ES
- Plot different graphs, segmenations, and gain insights using Kibana
- Implement Full Text Search on your phone contacts
- implement fuzzy searching
- implement spell correction
- implement synonymic query expansion
- add support for phonetic search
- Cache API responses on Akamai for very short duration
- Option 1: Set TTL on Akamai Console
- Option 2: Drive TTL using response headers from the origin
- Stream some dummy logs from local machine to S3
- Implement Task Scheduler as discussed in the session
- Fixed Time Execution and Cron Schedule
- Implement Job Puller
- Make Jobs Puller Fault Tolerant
- For your machine, compute Unit Tech Economics for Job Puller
- Define a format that allows user to specify any task
- Build capability to run it - Docker Images a simple solution but overskill for simple tasks
- Induce failures in your scheduler and set up alerts if you breach SLA
- Implement Team Relabance feature in Task scheduler
- Do it for Fault Tolerance
- Do it if you want to auto scale
- Implement Brokers in all 3 flavours
- SQS like broker using MySQL as backend
- Kafka like broker using MySQL as backend
- SQS like broker using Bitcask as backend
- Create an account on Razorpay and build simple payment system using their API
- use their “Test Mode”
- use Webhooks to receive Payment Notifications
Week-8
- Implement GeoHash
- Implement Zoom-in and Zoom-out using Trie based approach
- Evaluate the difference between EVAL and EVAL_RO command
- Fire EVAL command on Replica and observe the output
- Fire EVAL command on Replica using Redis SDK and observe
- Write Lua script and mimic matching algorithm
- use factors like - vehicle type, rating, etc.
- Implement cursor based pagination on MySQL
- Benchmark ingestion throughput when using
- Auto-inc as Primary key
- UUID as primary key
Excercises that can be extended: