
Learn software through visuals, interactivity, and practice. Join 75k+ engineers from companies like Google, Microsoft, and Amazon read. @rohitlakh
Joined November 2023
- Tweets298
- Following4
- Followers663
- Likes281
Scale Engineer retweeted
100 weeks of writing newsletter through @beehiiv
Consistency is paying off
Scale Engineer retweeted
How did Instagram scale from 0 โ 14M users in just over a year with only 3 engineers?
- Built on Django for rapid iteration, iOS-only launch
- AWS migration: EC2, S3, CloudFront, Elastic Load Balancing
- Data strategy: PostgreSQL + NoSQL, caching with Redis/Memcached, sharding & replication
- Media processing: JPEG compression, H.264 encoding, ML for moderation & tagging.
Scaling further:
- Explore System: Multi-stage ranking + Two-Tower Neural Network for personalized recommendations
- Security & Monitoring: Encryption, 2FA, Sentry, Pingdom
- AI-driven personalization: Bayesian optimization, CV tagging, engagement weighting
Key lessons: Start simple โ optimize later, cloud flexibility, caching & AI personalization = growth
Scale Engineer retweeted
It's Black Friday,
traffic suddenly explodes 10x.
Your app automatically adds more servers to handle the load.
But just adding servers isnโt enough something else could break (like your database or backend).
What extra strategy would keep your app running, even when traffic goes crazy?
Scale Engineer retweeted
Your friend starts streaming a fast-paced FPS on Discord.
Suddenly, their WiFi drops from 100 Mbps to 5 Mbps.
The stream doesnโt just stop Discord lowers quality and drops frames to keep it alive.
If you were designing this, what would you sacrifice: clarity or smoothness?
Scale Engineer retweeted
Your storage layer is cracking.
Cassandra struggles with multi-tenant workloads at massive scale.
Billions of tweets must stay instantly available.
Do you keep pushing and tuning Cassandra, or take the leap and design a custom storage system from scratch?
Scale Engineer retweeted
Pinterest didnโt start dreaming of 500M users.
In 2010, 3 founders + 1 engineer ran Python scripts in a tiny apartment. Their first stack was simple: Python for app logic, NGINX as HTTP proxy, MySQL with a read replica, MongoDB for counters, and a basic task queue.
Users flooded in, they added more tech, Redis, Cassandra, MBase, but that created new problems.
By late 2011, the lesson was clear: fewer, reliable tools win.
Core stack:
- MySQL โ reliable storage, sharded to scale horizontally
- Redis โ blazing fast in-memory data, feeds & follower graphs
- Memcached โ caches frequent data, reduces DB load, absorbs spikes
- Scaling & architecture:
- Monolith โ microservices: Search, Feed, MySQL (sharding), PinLater (background tasks)
- PinLater โ queues tasks in MySQL, crash-resistant, auto-retries, priority management
- Zookeeper โ services auto-register, better load balancing, elasticity
Data pipelines:
Kafka โ Secor โ S3 โ real-time capture of pins, likes, follows, errors โ structured analytics
Lessons & wisdom:
Log everything from day 1
Pick boring, proven tech
Donโt start with complexity
Monitor what matters
Simplify before optimizing
Pinterest proves: speed first, simplicity wins, and reliable tools scale best.
Read full article: hw.glich.co/p/how-pinterest-โฆ
Scale Engineer retweeted
Imagine running a massive library with millions of books.
Visitors walk in, ask for a book, and expect instant results. To handle this, you need a powerful search system.
Thatโs exactly what Elasticsearch does for data...
Think of Elasticsearch as Google for your own data. Itโs a distributed, horizontally scalable search engine that stores data as JSON documents.
Core flow:
Data โ Indices โ split into Shards โ distributed across Nodes โ form a Cluster
Inverted Index โ makes search ๐ฅ fast
Key concepts to remember:
Document โ JSON object
Index โ collection of docs
Shard โ index split
Replica โ redundancy
Cluster/Node โ group of servers
Used for: logs, metrics, app & website search, analytics.
Trusted by Netflix, eBay, Walmart
Scale Engineer retweeted
Ever heard of Serverless and thought:
"Waitโฆ no servers?"
Donโt worry, youโre not alone.
Letโs break down what Serverless actually means, how it works, and why itโs reshaping modern apps.
First things first: Serverless โ No Servers
Your code still runs on servers. The difference?
You donโt manage them. The cloud provider handles provisioning, scaling & maintenance.
You just focus on writing code.
Non-Serverless example (AWS EC2):
โข You write backend code (say Node.js/Python/Go).
โข To run it, you spin up an EC2 instance (a virtual machine).
โข You pick RAM, storage, OS, install dependencies, monitor usage.
โข Youโre billed per hour, even if no traffic.
You manage everything.
Serverless example (AWS Lambda):
โข You upload your code.
โข AWS decides RAM, OS, scaling, deployment.
โข Code runs only when triggered (API request, event, etc).
โข Billed per invocation (e.g. $0.001/request).
No idle costs. No server headaches.
Billing difference:
โข Non-serverless: Pay 24ร7 (even at 0 traffic).
โข Serverless: Pay only when code runs.
If your app has zero traffic, you pay zero, but if you have high traffic, the cost can skyrocket too.
Scaling:
โข Traditional servers โ you manually configure Auto-Scaling Groups.
โข Serverless โ scales automatically.
Got 1000 users suddenly?
Your function runs in parallel across multiple instances, no setup needed.
In a nutshell:
Serverless = run code without worrying about servers.
Itโs event-driven, scales automatically, and saves costs.
Perfect for modern apps where traffic can be unpredictable.
Scale Engineer retweeted
How can you log into an app using Google or Facebook without sharing your password?
Or how apps fetch your data securely without asking for your credentials?
Thatโs thanks to OAuth. Letโs break it down ๐งต
How Reddit handles 91 million active users daily? Find out
Reddit has 504M+ users with 91M daily actives.
Thatโs an insane scale.
But with billions of posts containing images, GIFs & videos, Reddit faced a tough challenge:
Efficiently storing & serving media metadata at scale.
Hereโs how they solved it ๐
1
158







