Sitemap

System Design: Create a url shortening service (Part 3): Read API, Load testing and performance optimization

4 min readMar 29, 2018

--

Model code to read value from the database
Route to get the original URL
Seed database with some URLs
Press enter or click to view image in full size
Create Users for load testing
Press enter or click to view image in full size
Setting up the traffic for testing
Press enter or click to view image in full size
Add Constant Throughput Timer
Press enter or click to view image in full size
Maximum of 100 requests per second
Press enter or click to view image in full size
Set up JMeter to read from CSV
Press enter or click to view image in full size
Set up JMeter to read from CSV
Sample CSV file
Press enter or click to view image in full size
Set up to make HTTP request
Press enter or click to view image in full size
Setup JMeter to read from CSV file
Press enter or click to view image in full size
Add Listener in test plan to analyze results
Press enter or click to view image in full size
JMeter response on the local mac
Press enter or click to view image in full size
JMeter result after changing database pool size
Press enter or click to view image in full size
JMeter results after running PM2
Use Redis for caching
Press enter or click to view image in full size
JMeter results after using Redis and PM2

--

--

Abhinav Dhasmana
Abhinav Dhasmana

Written by Abhinav Dhasmana

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine