Layrs’ cover photo
Layrs

Layrs

Software Development

San Francisco, California 3,705 followers

Stop watching tutorials. Start building systems. 👉 layrs.me

About us

Layrs: Master the unseen architecture of great systems. One layer at a time. Layrs exists to reshape how we learn to design. No more scattered theories. No more endless jargon. In a world obsessed with syntax, Layrs focuses on what truly matters: Building thinking frameworks that scale - just like the systems you dream to design. We believe: •Learning: dynamic, not static. •Feedback: surgical, not superficial. •Growth: structured, not accidental.

Website
https://layrs.me
Industry
Software Development
Company size
2-10 employees
Headquarters
San Francisco, California
Type
Self-Employed
Founded
2025

Locations

Employees at Layrs

Updates

  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    8 load balancing algorithms explained in 2 minutes and 5 seconds.Because you don't have time to read the "documentation" your senior left before switching to that Gen AI startup. Btw, I keep sharing system design insights like these regularly, so stick around.. And if you're learning system design for the first time, check out layrs.me - It’s a complete interactive platform where you learn by doing - 60+ problems available, you can add your own problems - AI-assisted feedback + forces you to think in 1st principles Alright, back to the algorithms. [1] Round Robin: The Baseline Distributes requests sequentially across servers. Simple, predictable, zero overhead. Use when: All servers have identical capacity and requests have similar processing costs. Breaks when: Server capabilities differ or request complexity varies wildly. [2] Weighted Round Robin: Capacity-Aware Distribution Assigns weights based on server capacity. A server with weight 3 gets 3x more requests than weight 1. Use when: Your infrastructure is heterogeneous (mix of instance types, on-prem + cloud). Critical for: Gradual rollouts where new servers handle less traffic initially. [3] Least Connections: Dynamic Session Balancing Routes to the server with fewest active connections. Adapts in real-time to load. Use when: Request processing time varies significantly (long-polling, WebSockets, file uploads). Why it matters: Prevents one server from getting hammered while others sit idle. [4] Least Response Time: Speed-First Routing Combines active connections with server response latency. Routes to fastest available server. Use when: User experience is critical and server performance varies (multi-region, degraded instances). Trade-off: Higher overhead from continuous latency monitoring. [5] IP Hash: Session Persistence Hashes client IP to deterministically route to same server. Enables stateful sessions without external storage. Use when: You need session stickiness but can't use cookies or tokens. Limitation: Uneven distribution if traffic comes from few IP ranges (corporate NATs, VPNs). [6] URL Hash: Content-Based Routing Hashes request URL to route to same server. Critical for cache efficiency. Use when: Building CDNs, caching layers, or content-specific processing pipelines. Why it works: Same content always hits same cache, maximizing hit rates.

    • No alternative text description for this image
  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    If I go back to my interview days, I will study these 40 questions to get ready for concept-based system design questions that are often asked in the telephonic screens. I myself have impressed interviewers with answers because I was prepared, hope this helps you, too! Btw, before we get into the questions, if you’re learning system design for the first time, give me a follow and check out layrs.me - It’s a complete interactive platform where you learn by doing - 60+ problems available, you can add your own problems - AI-assisted feedback + forces you to think in 1st principles 1. What is difference between API Gateway and Load Balancer? 2. What is difference between Reverse Proxy and Forward Proxy? 3. What is difference between Horizontal scaling and vertical scaling? 4. What is difference between Microservices and Monolithic architecture? 5. What is difference between vertical and horizontal partitioning? 6. What is Rate Limiter? How does it work? 7. How does Single Sign On (SSO) works? 8. How does Apache Kafka works? Why is it so fast? 9. Difference between Kafka, ActiveMQ, and RabbitMQ? 10. Difference between JWT, OAuth, and SAML? 11. What is difference between SQL and NoSQL databases? 12. How does Content Delivery Network (CDN) work? 13. What is difference between Synchronous and Asynchronous communication? 14. How does Database Sharding work? 15. What is difference between REST and GraphQL? 16. How does Caching work? What are caching strategies? 17. What is difference between Strong and Eventual Consistency? 18. How does Message Queue work? 19. What is difference between TCP and UDP? 20. How does Database Replication work? 21. What is difference between Stateful and Stateless architecture? 22. How does Circuit Breaker pattern work? 23. What is difference between Authentication and Authorization? 24. How does Distributed Tracing work? 25. What is difference between ACID and BASE properties? 26. How does Service Discovery work? 27. What is difference between Push and Pull architecture? 28. How does Database Indexing work? 29. What is difference between Batch and Stream processing? 30. How does Consistent Hashing work? 31. What is difference between RPC and REST? 32. How does Leader Election work in distributed systems? 33. What is difference between Optimistic and Pessimistic locking? 34. How does Two Phase Commit work? 35. What is difference between CAP theorem components? 36. How does Bloom Filter work? 37. What is difference between WebSocket and HTTP? 38. How does Service Mesh work? 39. What is difference between Blue Green and Canary deployment? 40. How does Distributed Cache work? Bookmark this. Review before your next system design interview. What other questions would you add to this list?

    • No alternative text description for this image
  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    I've seen this mistake crash production systems. And most developers don't even know it's happening. I even asked 20+ developers from my community in mock interviews, but only 25% could give a proper answer. Here's the problem and how to solve it: ➧The Dual Write Problem Dual writes happen when you update two systems at once: • Save data to your database • Publish an event to Kafka (or send an email, update a cache, etc.) The issue? These aren't atomic. One can succeed while the other fails. Your database updates, but the event never publishes. Now your systems are out of sync. Or worse: the event publishes, then the database update fails. Downstream services process stale data. This leads to data loss, partial updates, and unreliable operations. ➧ The Solution: Transactional Outbox Pattern Instead of writing to two systems, write to one. Here's how it works: 1. Update your database record 2. Insert the event into an "outbox" table in the same transaction 3. A separate process reads the outbox and publishes events Both writes succeed or fail together. No inconsistency. The outbox table acts as a buffer. Your app writes events there, and a background process delivers them. ➧ Implementation Options You can implement this in a few ways: • Background thread in your service • Dedicated publisher service • Change Data Capture tools (like Debezium) Each has tradeoffs between simplicity and scale. ➧ The Tradeoffs Nothing's perfect. The outbox pattern introduces: • Possible duplicate messages (downstream systems need deduplication) • Extra infrastructure to maintain • Slight delivery delay But it guarantees consistency, which is worth it in distributed systems. If you're building microservices or event-driven architecture, this pattern is essential. -- Btw, before we get into the blogs, if you’re learning system design for the first time, give me a follow and check out layrs.me - It’s a complete interactive platform where you learn by doing - 60+ problems available, you can add your own problems - AI-assisted feedback + forces you to think in 1st principles Join our discord: https://discord.gg/

    • No alternative text description for this image
  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    If you want to understand how 𝗞𝗮𝗳𝗸𝗮 is applied at Scale for system design, start reading these technical blogs on 𝗞𝗮𝗳𝗸𝗮 implementation by big giants like Netflix, Shopify, Uber, Yelp, Walmart: Btw, before we get into the blogs, if you’re looking to practice your system design skills, check out Layrs.me - It’s a complete interactive platform where you learn by doing - 60+ problems available, you can add your own problems - AI-assisted feedback + forces you to think in 1st principles Discord: https://lnkd.in/ghcUD2gC •Netflix Architecture: https://lnkd.in/gyxiKkiv https://lnkd.in/g6xY3qwR https://lnkd.in/gEE82YTs https://lnkd.in/giD_72w6 • Dropbox's Kafka:  https://lnkd.in/gqpwjHzv • Shopify's Kafka Use Case:  https://lnkd.in/gSdHqzb4 • Pinterest's Kafka Use Case:  https://lnkd.in/gb5skEtU • Salesforce's Kafka Use Case:  https://lnkd.in/gBH3bwGq • Uber's Kafka Use Case:  https://lnkd.in/gti2xZuR • Walmart's Kafka Use Case:  https://lnkd.in/gdtc5Az9 • Yelp's Kafka Use Case:  https://lnkd.in/gkcfT-Vq • NYT's Kafka Use Case:  https://lnkd.in/gqcwF_zP • Yelp's Kafka Use Case:  https://lnkd.in/g7_fcfB7 • Hulu's Kafka Use Case:  https://lnkd.in/gRnBFEUv • Criteo's Kafka Use Case:  https://lnkd.in/gwGx8wvq

    • No alternative text description for this image
  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    Two Software engineers with 5+ years of experience interviewed at Google for an L5 Senior Engineer role. They both were given the same system design problem: Design YouTube One was rejected after the system design round. The other was hired and given “Strong Hire” after his system design round. What was the difference? This 8-layer thinking approach: [  Btw, before we get into the solution, if you’re learning system design for the first time, give me a follow and check out layrs.me  - It’s a complete interactive platform where you learn by doing - 60+ problems available, you can add your own problems - Ai-assissted feedback + forces you to think in 1st principles ]  1. Requirements ↪︎ What exactly are you building, and for whom? ○ List core features (upload, stream, view videos). ○ Ask for scale: daily uploads, views, max file size. ○ Clarify: is instant consistency needed? Or is delay OK? ○ Separate functional from non-functional requirements early.  2. Core Entities ↪︎ What are the main building blocks? ○ Identify main nouns: video, user, metadata. ○ Split raw video (bytes) and metadata (title, creator, etc). ○ Consider: Do you need to persist more than just videos (comments, playlists)? ○ Keep schema flexible for scale and new features.  3. API Design ↪︎How do clients interact with your system? ○ Define endpoints for upload, watch, fetch metadata. ○ Support chunked uploads for large files (don’t just POST giant blobs). ○ Use pre-signed URLs for secure direct uploads to storage. ○ Remember: GET for streaming should handle different resolutions.  4. High-Level Flow ↪︎ Can you sketch the basic path from client to storage? ○ API Gateway routes requests to microservices. ○ Video metadata goes to a database (e.g., DynamoDB, Postgres). ○ Raw video files go straight to blob storage (e.g., S3, GCS). ○ Store references/URLs for everything in metadata.  5. Uploading at Scale ↪︎ Can your design handle 256GB files and millions of uploads? ○ Use multi-part uploads, clients break videos into chunks. ○ S3/GCS stitches chunks after upload. ○ Metadata is updated only after a full upload is confirmed. ○ Avoid routing huge files through your API gateway, offload to storage.  6. Streaming & Playback ↪︎ How do you get pixels on the screen fast? ○ Chunk videos into small playback segments (2–10s each). ○ Transcode into multiple resolutions/bitrates (4K, 1080p, 240p). ○ Use manifest files to organize chunks for adaptive bitrate streaming. ○ Support protocols like HLS or DASH for smooth delivery.  7. Latency, Reliability, and CDN ↪︎ How do you ensure speed and global access? ○ Cache popular videos/chunks in regional CDNs. ○ Manifest files & video data live close to the user. ○ Adaptive streaming: client auto-switches quality based on bandwidth. ○ System favours availability over instant consistency; eventual propagation is fine.

    • No alternative text description for this image
  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    I wish I had this cheatsheet when I first started learning system design. If you’re aiming for SDE-3 roles and above, this will definitely help you. These links here will help you out, whether you’re revising concepts or just preparing for the first time. ► System Design Basics - Github Repos: ○https://lnkd.in/gmB2WyYthttps://lnkd.in/gXKGmqAuhttps://lnkd.in/gGfnpcjP ► Important Patterns ○ Design Patterns: https://lnkd.in/gh_vhyuR ○ Software Architecture patterns: https://lnkd.in/g2weukNM ► My Old Posts - Based on Interview Scenarios:  ○https://lnkd.in/eyBtDV4Ehttps://lnkd.in/eaDh_imxhttps://lnkd.in/ewD_XR5rhttps://lnkd.in/eDgks7bjhttps://lnkd.in/es6mq8Wwhttps://lnkd.in/erWKKR8vhttps://lnkd.in/eVP3mnXDhttps://lnkd.in/e6h8T25w ►Important Problems & Case Studies ○ https://lnkd.in/gbcbCG-zhttps://lnkd.in/gq-wzB3Thttps://lnkd.in/gni_2NHj Moreover, I want to remind you that only reading, watching won’t help you learn, applying it will. There are 100s and 100s of resources out there, but that knowledge will only help you when you apply it and discover the problems that arise. I wouldn’t be saying this if I hadn’t learned the same way at Flipkart or Google. Knowledge learned and watched stays in your head for some time. Knowledge applied and learned will stay with you for a lifetime. You can get started for free with your system design practice on layrs.me. You get everything a learner needs to get started. - 60+ problems - Interactive canvas and constraints - Proper feedback right after you build an answer - Sequential and easy-to-hard level learning process Join our discord for latest updates: https://lnkd.in/g9f98NBH – P.S: Follow me for more system design insights like these.

    • No alternative text description for this image
  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    If I travel back to my Interview Days, I will study these 45 problems to learn system design Fundamentals by doing. This list will save you over 50 hours of searching for resources and wasting time.  1️⃣ Messaging, Streaming & Event Systems -- Design a Distributed Stream Processing System like Kafka -- Design an API Rate Limiter -- Design a Distributed Queue like RabbitMQ -- Design a Surge Pricing System (Uber/Lyft) -- Design a Distributed Tracing System -- Design an On-Call Escalation System -- Design a Live Comments Feature (Facebook Live) -- Design Facebook-style Live Likes / Reactions  2️⃣ Distributed Storage, Sync & Caching -- Design a Distributed Metrics Logging & Aggregation System -- Design a Key-Value Store -- Design a System to Sort & Process Large Data Sets -- Design Dropbox / Google Drive -- Design a Distributed Job Scheduler -- Design a Control Plane for a Distributed Database -- Design a File Download & Sync Library -- Design a Large Data Migration System to Cloud -- Design a P2P File Transfer System like BitTorrent  3️⃣ Search, Ranking & Analytics -- Identify the K Most Shared Articles (various time windows) -- Design a User Analytics Dashboard & Event Pipeline (Google Analytics) -- Design a Top-K Rankings System (App Store / Amazon Bestsellers) -- Design a Notification Service at Massive Scale -- Design an A/B Testing & Experimentation System -- Design a Price Alert System for Amazon/Stocks -- Count Facebook Likes for High-Profile Users -- Design a Real-time Global Stock Price Viewer  4️⃣ Compute, Orchestration & Monitoring -- Collect Performance Metrics from Thousands of Servers -- Design Google Calendar (Scheduling + Collaboration) -- Design Netflix Screen Concurrency Limits -- Design an ETA + Live Location Sharing System (Uber) -- Design Cluster Health Monitoring System -- Backend for Flash Sales — 6M Orders in 1 Hour (e.g., Burgers promo) -- Design a Distributed Botnet Control Infrastructure (ethical topic)  5️⃣ Consumer & Marketplace Platforms -- Design a Hotel Booking & Reservation System -- Design a Weather Application -- Design Collaborative Editing like Notion / Google Docs -- Design Marketplace Features (like Facebook Marketplace) -- Find a Rider System for Uber/Uber Eats -- Design a Photo Sharing Platform like Google Photos -- Show Real-time Active Viewers on a Page (Booking.com) -- Design an Ads Management + Delivery System for Social Feed Continued in comments P.S: Follow me for more system design insights like these and check out our system design learning platform: layrs.me. Layrs is the Leetcode of system design, it gives you the practice you need to crack interviews. You get: - 60+ problems - Interactive canvas and constraints - Proper feedback right after you build an answer - Sequential and easy-to-hard level learning process Join our discord: https://lnkd.in/g9f98NBH

    • No alternative text description for this image
  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    Learning and grinding 400 DSA problems might get you 20-30 LPA offers... But it's system design that will take you from 30 to 60-80LPA+ as an SWE. Here are some great resources that will help you master system design and get ready for this market: Before diving into these resources, there’s one thing that makes all the difference: building and getting feedback. Learning system design without building is like just flipping through slides. Learning without feedback is like guessing in the dark. Learning without real-world constraints leaves you unprepared for reality. So, use all these resources, but then use all of that knowledge to test yourself on out free platform, Layrs (It’s Leetcode but for system design) 1. Sign up on layrs.me 2. Pick any problem, go to our interactive canvas 3. Use the components to plan out a flow, put up constraints 4. Get proper feedback on your design with our AI assistant Join the discord: https://lnkd.in/g9f98NBH Coming back to the resources: ➤ Great GitHub Repos to learn basics: - System Design Primer - https://lnkd.in/gmTP7kwc - System Design 101 - https://lnkd.in/gyDYHhpF - Low-Level Design Primer - https://lnkd.in/g4aVVDue - Awesome System Design Resources - https://lnkd.in/gEX9FCaU - System Design Questions- https://lnkd.in/gzDhrk-J ➤ Some Must-Read Engineering Articles – How Discord stores trillions of messages:https://lnkd.in/ezDPQzq6 – Building In-Video Search at Netflix:https://lnkd.in/euENKEkS – How Canva scaled Media uploads from Zero to 50 Million per Day:https://lnkd.in/eDyAugu9 – How Airbnb avoids double payments in a Distributed Payments System:https://lnkd.in/ekuAzhPh – Stripe’s payments APIs - The first 10 years: https://lnkd.in/eyXHiGXv – Real-time messaging at Slack: https://lnkd.in/e48uxfB7 ➤ Some Must-Read Distributed Systems Papers – Paxos: The Part-Time Parliament: https://lnkd.in/ew-z83GY – MapReduce: Simplified Data Processing on Large Clusters: https://lnkd.in/e2FDfikq – The Google File System:https://lnkd.in/eTtjq3Hx – Dynamo: Amazon’s Highly Available Key-value Store:https://lnkd.in/eva6n2Ej – Kafka: a Distributed Messaging System for Log Processing:https://lnkd.in/eTPA4ey9 – Spanner: Google’s Globally-Distributed Database:https://lnkd.in/eRM6crw8 – Bigtable: A Distributed Storage System for Structured Data: https://lnkd.in/eqyS2aU4 – ZooKeeper: Wait-free coordination for Internet-scale systems:https://lnkd.in/eADJaST3 – The Log-Structured Merge-Tree (LSM-Tree):https://lnkd.in/eZ7iaXD8 – The Chubby lock service for loosely-coupled distributed systems:https://lnkd.in/ehmtKEWJ

    • No alternative text description for this image
  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    If you’d like to get better at system design as a software engineer, read these 36 blogs. It took me over a week to collect them from 40+ companies like Meta, Netflix, Airbnb, Stripe, DoorDash, Swiggy, LinkedIn, Spotify, Instacart, and more. They will teach you about: – building large-scale, fault-tolerant architectures – real-world applications of ML and AI at a massive scale – end-to-end recommendation and ranking systems – system reliability, observability, and incident response – how top tech teams solve product, search, and infra problems [1] Inventory Consistency – Instacart item availability architecture https://lnkd.in/et6F_i_m [2] Operations at Scale – How Instacart’s item availability evolved over the pandemic https://lnkd.in/eARUUtVX [3] GenAI + Trust – How Whatnot uses generative AI for trust & safety https://lnkd.in/e2fGcujh [4] Reinforcement Learning – Wayfair’s Griffin for customer communication https://lnkd.in/eJqs97ch [5] Scalable Audiences – Grab’s scalable lookalike audiences https://lnkd.in/eeU87qvB [6] ML for Dates – Using ML to identify date formats in file names (Dropbox) https://lnkd.in/ec9397cf [7] Graph Anomaly Detection – Anomaly model at Grab https://lnkd.in/eWiZz5bw [8] Product & Process – Building Boba (Martin Fowler) https://lnkd.in/eeiDuVSr [9] Entity Resolution – Walmart’s framework across use cases https://lnkd.in/eSYHXnk2 [10] Price Alerts – Increasing traveler engagement at Expedia https://lnkd.in/e5849E4a [11] Job Matching – LinkedIn’s embedding-powered matching https://lnkd.in/e7TzuS7Z [12] ML Model Consolidation – Lessons from Netflix’s large-scale recommendation https://lnkd.in/eNHeGzrE [13] ETA Prediction – Predicting food delivery time at Swiggy https://lnkd.in/es3iGB3q [14] Customer Understanding – Delivery Hero’s personalisation journey https://lnkd.in/e9ED9-Wz [15] Podcast Previews – Spotify’s ML podcast previews at scale https://lnkd.in/eV-N_6qn [16] Search by Image – Etsy’s multi-task modeling https://lnkd.in/e-KECNyk [17] GenAI Areas – DoorDash: 5 big areas for using generative AI https://lnkd.in/eGQkpc66 [18] Distributed Training – Stitch Fix’s distributed model training https://lnkd.in/eUbKFBCS [19] Diverse Recommendations – Expedia’s approach https://lnkd.in/eerRgVDg [20] Personalised Recipes – NYTimes Cooking team ttps://https://lnkd.in/eWqa-Qkk [21] GenAI Future – Swiggy’s generative AI journey https://lnkd.in/e8DAn_Tj [22] ETA Modeling – Swiggy: When is my order coming? https://lnkd.in/eAhZQwmz More in comments.. P.S: Follow me for more system design insights like these and check out our system design learning platform: layrs.me. Layrs is the Leetcode of system design, 100% free to use and sign up, no paywalls, and gives you the practice you need to crack interviews. You get: - 60+ problems - Interactive canvas and constraints - Proper feedback right after you build an answer - Sequential and easy-to-hard level learning process

  • Layrs reposted this

    View profile for Sameer Bhardwaj

    Co-founder @Layrs | Ex Google

    You wouldn't know what good system design is unless you've seen the results of a poorly designed one. You wouldn't know what proper database indexing is unless you've watched a query timeout after 30 seconds. You wouldn't know what clean API design is unless you've debugged a response with 47 nested objects and no documentation. You wouldn't know what effective caching is unless you've seen a server melt under 100 concurrent users. You wouldn't know what meaningful error handling is unless you've stared at "Error: Something went wrong" at 2 AM with no logs. Bad software isn't your enemy.  It's your teacher. Every slow query teaches you about optimization.  Every cryptic error teaches you about observability.  Every crashed server teaches you about resilience. The engineers who build the most reliable systems aren't the ones who got lucky with good codebases. They're the ones who survived the bad ones and learned what not to do. I’ve made my fair share of mistakes during my time at Flipkart and Google. I was lucky to learn from them and apply them. So next time you inherit a mess, learn everything it has to teach you. Then make sure no one else has to learn it the same way. P.S: Follow me for more system design insights like these and check out our system design learning platform: layrs.me. Layrs is the Leetcode of system design, 100% free to use and sign up, no paywalls, and gives you the practice you need to crack interviews. You get: - 60+ problems - Interactive canvas and constraints - Proper feedback right after you build an answer - Sequential and easy-to-hard level learning process

    • No alternative text description for this image

Similar pages