
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 π§΅
Scale Engineer retweeted
If you want to become good at system design (in 1 month), learn these 11 case studies:
Scale Engineer retweeted
Your tech stack should be dependent on what works for you and not on what is trending.
Learning new things is amazing, but there's a balance that you need to strike, so you learn and still build.
Scale Engineer retweeted
You are in a backend interview:
They ask:
"How Discordβs 'Go Live' streaming works"?
This is how you answer. A thread π§΅
Scale Engineer retweeted
10. Load Balancer directs req based on traffic while api gateways direct them to exact microservices.
Checkout @helloworldglich 's newsletter for more info
fin.
Scale Engineer retweeted
Read about API Gateways in microservices and here's what I learnt (thread)
1. Api gateway acts as a single entry point for client requests.
2. Implements policies during processing and routes requests to relevant services.
1/n
Scale Engineer retweeted
Salesforce upgraded 760+ Kafka nodes processing 1 MILLION messages per second with ZERO downtime.
No data loss. No customer impact. On a live production system.
Here's how they pulled off this engineering masterpiece
Scale Engineer retweeted
Your users are happy.
Until one service slows down, auth breaks, and the mobile app calls 5 different endpoints for 1 screen.
Scale Engineer retweeted
Big tech scaled because they had to.
Startups should scale when they need to.
Over-engineering early is like buying a 50,000-seat stadium for your garage band.
Seems impressive, but youβll go broke before the crowd arrives.








