Posts

Showing posts from February, 2025

Scaling Live Streaming for 62.2 Crore Concurrent Viewers: The Tech Behind India vs Pakistan Match

Image
  Extensive Preparation and Audits: Planning starts months in advance . Service owners define breaking points for their systems (front end, CDN, load balancer, back end, databases). Partners undergo audits to ensure their infrastructure and mitigations are ready. Front-End Optimisation: Code freezes are implemented well in advance of the back-end systems, and continue to ship new features during the tournament. Feature flags are used extensively to quickly turn off features on specific platforms if issues arise (e.g., increased crash rates). Simulations using tools like Charles mimic potential API failures (5XX errors, latency, DNS failures) to ensure a smooth user experience. Graceful degradation is implemented to minimise customer impact. Prioritising core features (P0 - live stream) and ads. Non-critical features (P1, P2) can fail without displaying error messages to users. Exponential back-off strategies are implemented for API retries to prevent system o...

10 Step process to scaling ZERO to Millions Users In Application

Image
1️⃣ 𝗕𝗲𝗴𝗶𝗻 𝘄𝗶𝘁𝗵 𝗮 𝘀𝗶𝗻𝗴𝗹𝗲-𝘀𝗲𝗿𝘃𝗲𝗿 𝘀𝗲𝘁𝘂𝗽: This is your starting point where a single server handles all(user+Dns+server) functionality. [EC2+RDS] 2️⃣ 𝗜𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝗲 𝗺𝘂𝗹𝘁𝗶𝗽𝗹𝗲 𝘄𝗲𝗯 𝘀𝗲𝗿𝘃𝗲𝗿𝘀 (𝘄𝗲𝗯 𝘁𝗶𝗲𝗿): As traffic increases, a single server becomes insufficient. Add more web servers to handle user traffic.[EC2 Auto Scaling Group] 3️⃣ 𝗔𝗱𝗱 𝗮 𝗹𝗼𝗮𝗱 𝗯𝗮𝗹𝗮𝗻𝗰𝗲𝗿: A load balancer distributes traffic evenly among the web servers, preventing overload and ensuring availability. [Elastic Load Balancer] 4️⃣𝗜𝗺𝗽𝗹𝗲𝗺𝗲𝗻𝘁 𝗱𝗮𝘁𝗮𝗯𝗮𝘀𝗲 𝗿𝗲𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻: Use a master database for writes and slave databases for reads to improve performance and availability.[RDS read replicas / DynamoDB] 5️⃣ 𝗜𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝗲 𝗮 𝗰𝗮𝗰𝗵𝗲 𝘁𝗶𝗲𝗿: Caching frequently accessed data in memory improves system performance and reduces the load on the database. [ Elasticache / DAX] 6️⃣𝗨𝘁𝗶𝗹𝗶𝘀𝗲 𝗮 𝗖𝗼𝗻𝘁𝗲𝗻𝘁 𝗗𝗲𝗹𝗶𝘃𝗲𝗿𝘆 𝗡𝗲𝘁𝘄𝗼𝗿𝗸 (...