EXEED AI

Alex Xu's Recent LinkedIn Posts

Alex Xu

Alex Xu

@alexxubyte

Author of 4 Bestselling Books | Co-Founder of ByteByteGo

en24 postsLinkedIn

Posts

Alex Xu

Tech & AI

2mo

How Agentic RAG Works? A traditional RAG has a simple retrieval, limited adaptability, and relies on static knowledge, making it less flexible for dynamic and real-time information. Agentic RAG improves on this by introducing AI agents that can make decisions, select tools, and even refine queries for more accurate and flexible responses. Here’s how Agentic RAG works on a high level: 1. The user query is directed to an AI Agent for processing. 2. The agent uses short-term and long-term memory to track query context. It also formulates a retrieval strategy and selects appropriate tools for the job. 3. The data fetching process can use tools such as vector search, multiple agents, and MCP servers to gather relevant data from the knowledge base. 4. The agent then combines retrieved data with a query and system prompt. It passes this data to the LLM. 5. LLM processes the optimized input to answer the user’s query. -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips .
2.6K

Alex Xu

Tech & AI

2mo

🚀 Last Day to Enroll: Become an AI Engineer | By building, not just watching | Cohort 5! After the amazing response to our first four cohorts, with over 1,000 people joining, we’ve made improvements to the course and are excited to announce the next round of Become an AI Engineer. This is not your typical AI course focused only on tools and frameworks. The mission is simple: help engineers build strong foundations and practical end to end skills to grow confidently into AI engineering roles. What makes this cohort stand out: - Learn by building: You will create real world AI applications instead of just watching videos - Clear and structured path: A thoughtfully designed curriculum that takes you from core concepts to advanced topics, step by step - Live feedback and mentorship: Get hands on guidance from instructors and learn alongside peers - Strong community: Learning is faster and more motivating when you are not doing it alone We care deeply about skill building, not passive learning or surface level theory. The goal is for every participant to leave with the confidence and ability to build real AI systems. Today is the last day to enroll before it starts. -- Check it out here: https://lnkd.in/gZEmb6rh #AI #AIEngineer #MachineLearning .
1K

Alex Xu

Tech & AI

3mo

How hackers steal passwords Most password attacks don't involve sophisticated hacking. They rely on automation, reused credentials, and predictable human behavior. Here are six common techniques: - Brute-force attack: Automated tools cycle through password combinations at high speed until one works. No logic involved, just volume. - Dictionary attacks: Instead of random guesses, attackers use curated wordlists built from common passwords, leaked data, and predictable patterns. - Credential stuffing: When one site is breached, attackers reuse those stolen username–password pairs across many other services. It works because a large portion of users reuse passwords across multiple accounts. - Password spraying: One common password gets tried across many accounts in the same organization. Spreading attempts across accounts avoids triggering lockout thresholds. - Phishing: The victim lands on a fake login page and enters credentials. The attacker captures them in real time. No malware needed. - Keylogger malware: Malicious software records keystrokes and sends them to the attacker. Passwords, usernames, and anything else typed on the device are captured. Over to you: Which attack have you seen most often? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips .
1.2K

Alex Xu

Tech & AI

3mo

How LLMs Use AI Agents with Deep Research When you ask an LLM such as Claude, ChatGPT, or Gemini to do deep research on a complex topic, it’s not just one model doing all the work. It’s a coordinated system of specialized AI agents. Here’s how it works: Step 1: Understanding The Question and Making a Plan It all starts with the query, something like “Analyze the competitive landscape of AI agents in 2026. The system doesn’t just dive in blindly. First, it may ask clarifying questions to understand exactly what is needed. Then, it generates a plan and breaks the big question down into smaller and manageable tasks. Step 2: Sub-Agents Get to Work Each small task gets assigned to a sub-agent, which is basically a mini AI worker with a specific job. For example, one sub-agent might be tasked with finding the latest Nvidia earnings. It figures out which tools to use, such as searching the web, browsing a specific page, or even run code to analyze data. All of this happens through a secure layer of APIs and services that connect the AI to the outside world. Step 3: Putting it All Together Once all the sub-agents finish their tasks, a Synthesizer Agent takes over. It aggregates everything, identifies key themes, plans an outline, and removes any redundant or duplicate information. At the same time, a Citation Agent makes sure every claim is linked back to its source and properly formatted. The end result is a polished, well-cited final output ready for use. Over to you: Have you tried deep research in any LLM? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips .
1K

Alex Xu

Tech & AI

3mo

How can Cache Systems go wrong? The diagram below shows 4 typical cases where caches can go wrong and their solutions. 1. Thunder herd problem This happens when a large number of keys in the cache expire at the same time. Then the query requests directly hit the database, which overloads the database. There are two ways to mitigate this issue: one is to avoid setting the same expiry time for the keys, adding a random number in the configuration; the other is to allow only the core business data to hit the database and prevent non-core data to access the database until the cache is back up. 2. Cache penetration This happens when the key doesn’t exist in the cache or the database. The application cannot retrieve relevant data from the database to update the cache. This problem creates a lot of pressure on both the cache and the database. To solve this, there are two suggestions. One is to cache a null value for non-existent keys, avoiding hitting the database. The other is to use a bloom filter to check the key existence first, and if the key doesn’t exist, we can avoid hitting the database. 3. Cache breakdown This is similar to the thunder herd problem. It happens when a hot key expires. A large number of requests hit the database. Since the hot keys take up 80% of the queries, we do not set an expiration time for them. 4. Cache crash This happens when the cache is down and all the requests go to the database. There are two ways to solve this problem. One is to set up a circuit breaker, and when the cache is down, the application services cannot visit the cache or the database. The other is to set up a cluster for the cache to improve cache availability. Over to you: Have you met any of these issues in production? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
1.6K

Alex Xu

Tech & AI

3mo

Git Workflow: Essential Commands Git has a lot of commands. Most workflows use a fraction of them. The part that causes problems isn't the commands themselves, it's not knowing where your code sits after running one. Working directory, staging area, local repo, remote repo. Each command moves code between these. Here's what each one does. - Saving Your Work: “git add” moves files from your working directory to the staging area. “git commit” saves those staged files to your local repository. “git push” uploads your commits to the remote repository - Getting a Project: “git clone” pulls down the entire remote repository to your machine. “git checkout” switches you to a specific branch. - Syncing Changes: “git fetch” downloads updates from remote but doesn't change your files. “git merge” integrates those changes. “git pull” does both at once. - The Safety Net: “git stash” is your undo button. It temporarily saves your uncommitted changes so you can switch contexts without losing work. “git stash apply” brings them back. “git stash pop” brings them back and deletes the stash. -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
1.6K

Alex Xu

Tech & AI

3mo

Top 12 GitHub AI Repositories These repositories were selected based on their overall popularity and GitHub stars. 1. OpenClaw: The always-on personal AI agent that lives on your device and talks to you through WhatsApp, Telegram, and 50+ other platforms. 2. N8n: A visual workflow automation platform with native AI capabilities and 400+ integrations. 3. Ollama: Run powerful LLMs locally on your own hardware with a single command. 4. Langflow: A drag-and-drop visual builder for designing and deploying AI agents and RAG workflows. 5. Dify: A full-stack prod-ready platform for building and deploying AI-powered apps and agentic workflows. 6. LangChain: The foundational framework powering the AI agent ecosystem with modular building blocks. 7. Open WebUI: A self-hosted, offline-capable ChatGPT alternative 8. DeepSeek-V3: An open-weight LLM that rivals GPT on benchmarks and is free for commercial use. 9. Gemini CLI: Google’s open-source tool to interact with the Gemini model right from your terminal. 10. RAGFlow: An enterprise-grade RAG engine that grounds AI answers in real documents with citation tracking. 11. Claude Code: An agentic coding tool that understands your entire codebase and executes engineering tasks from the terminal. 12. CrewAI: A lightweight Python framework for assembling teams of role-playing AI agents to collaborate on tasks. Over to you: Which other repository will you add to the list? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips .
5.8K

Alex Xu

Tech & AI

2mo

What is MCP? Model Context Protocol (MCP) is a new system introduced by Anthropic to make AI models more powerful. It is an open standard (also being run as an open-source project) that allows AI models (like Claude) to connect to databases, APIs, file systems, and other tools without needing custom code for each new integration. MCP follows a client-server model with 3 key components: 1 - Host: AI applications like Claude that provide the environment for AI interactions so that different tools and data sources can be accessed. The host runs the MCP Client. 2 - MCP Client: The MCP client is the component inside an AI model (like Claude) that allows it to communicate with MCP servers. For example, if the AI model wants data from PostgreSQL, the MCP client formats the request into a structured message to send to the MCP Server 3 - MCP Server: This is the middleman that connects an AI model to an external system like PostgreSQL, Google Drive, or an API. For example, if Claude analyzes sales data from PostgreSQL, the MCP Server for PostgreSQL acts as the connector between Claude and the database. MCP has five core building blocks (also known as primitives). They are divided between the client and server. 1 - For the clients, the building blocks are Roots (secure file access) and Sampling (ask the AI for help with a task such as generating a DB query). 2 - For the servers, there are Prompts (instructions to guide the AI), Resources (Data Objects that the AI can reference) and Tools (functions that the AI can call such as running a DB query). -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
3.2K

Alex Xu

Tech & AI

2mo

A Cheat Sheet on The Most-Used Linux Commands Linux has thousands of commands. Most engineers use about 20 or so commands every day, not because Linux is limited, but because that core set handles the bulk of actual work: navigating files, inspecting logs, debugging processes, checking system health, and fixing things under pressure. This cheat sheet maps out the most-used Linux commands by category: - File management basics like ls, cd, cp, mv, and rm that you touch constantly without thinking. - File viewing and editing with cat, less, head, tail, nano, and vim when logs are huge and time is short. - Text processing with grep, awk, sort, and diff to turn raw logs into answers. - Permissions with chmod and chown, because something always breaks due to access issues. - Networking commands like ssh, scp, curl, ping, ss, and ip for debugging remote systems. - Process and system inspection using ps, top, htop, df, free, and uname to see what the machine is really doing. - Archiving, package management, system control, and help commands that glue everything together. Over to you: Which Linux command do you end up using the most during real incidents? -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://lnkd.in/g9wAgcke #systemdesign #coding #interviewtips  .
3.1K

Alex Xu

Tech & AI

2mo

12 Claude Code Features Every Engineer Should Know. YouTube video link at the end. 1. CLAUDE. md: A project memory file to define custom rules and conventions. Claude reads at the start of every session. 2. Permissions: Control which tools Claude can and can't use. 3. Plan Mode: Claude plans before it acts. You can review them before any code changes. 4. Checkpoints: Automatic snapshots of your project to revert to if something goes wrong. 5. Skills: Reusable instruction files Claude follows automatically. 6. Hooks: Run custom shell scripts on lifecycle events like PreToolUse or PostToolUse. 7. MCP: Connect Claude to any external tools like databases and third-party services. 8. Plugins: Extend Claude with third-party integrations containing skills, MCPs, and hooks. 9. Context: Feed Claude what it needs and manage the current context window with /context. 10. Slash Commands: Create shortcuts for tasks you run often. Type / and pick from your saved commands. 11. Compaction: Compress long conversations to save tokens. 12. Subagents: Spawn parallel agents for complex tasks. Divide large multi-step workflows and run them simultaneously. Over to you: Which Claude Code feature do you use the most? Any features you wish were on this list? -- Watch the full video here: https://lnkd.in/g9ZwW4rt #systemdesign #coding #ai .
4.4K

Alex Xu

Tech & AI

2mo

7 Key Load Balancer Use Cases 1 - Traffic Distribution: Load Balancers help evenly distribute traffic among multiple server instances. 2 - SSL Termination: Load Balancers can offload the responsibility of SSL termination from the backend servers, thereby reducing their workload. 3 - Session Persistence: Load Balancers ensure that all requests from a user hit the same instance to maintain session persistence. 4 - High Availability: Improves the system’s availability by rerouting traffic away from failed or unhealthy servers to healthy ones. 5 - Scalability: Load Balancers facilitate horizontal scaling when additional instances are added to the server pool to handle increased traffic. 6 - DDoS Mitigation: Load Balancers can help mitigate the impact of DDoS attacks by rate limiting requests or distributing them across a wider surface. 7 - Health Monitoring: Load Balancers also monitor the health and performance of server instances and remove failed or unhealthy servers from the pool. Over to you: Which other load balancer use case will you add to the list? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
814

Alex Xu

Tech & AI

2mo

How does REST API work? What are its principles, methods, constraints, and best practices? I hope the diagram below gives you a quick overview. -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://lnkd.in/g9wAgcke #systemdesign #coding #interviewtips  .
1.9K

Alex Xu

Tech & AI

2mo

Session-Based vs JWT-Based Authentication Every web app needs authentication. But how you manage it after login matters more than most developers realize. There are two dominant approaches: session-based and JWT-based. They solve the same problem differently. Session-Based Authentication: The user logs in, and the server creates a session and stores it in a session store. The client gets a session_id cookie. On every subsequent request, the browser sends that cookie, and the server looks up the session to validate it. The state lives on the server. That's the key tradeoff. It's simple and easy to revoke, but now your backend has to manage that session store. JWT-Based Authentication: The user logs in, and the server validates credentials, then creates and signs a token using a secret or private key. That token is sent back to the client. On every subsequent request, the client sends it as a Bearer token in the Authorization header. The server verifies the signature and reads the claims. No session store needed. The state lives in the token itself. The server stays stateless, which makes horizontal scaling straightforward. Over to you: what’s your go-to approach for auth in microservices? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
2K

Alex Xu

Tech & AI

3mo

What’s Next in AI: 5 Trends to Watch in 2026 We made a video about it. It covers: 1. Reasoning and RLVR 2. Agents & Tool Use 3. Coding 4. Open-Weight Models 5. Multi-Modal Models Watch it here: https://lnkd.in/gwC6f3aC
227

Alex Xu

Tech & AI

3mo

10 Types of API Testing 1 - Smoke Testing: Quickly checks if the core functionalities of the API are working as expected. 2 - Functional Testing: Validates that the API behaves as specified in the functional specifications. 3 - Integration Testing: Ensures different modules or services interact correctly through the APIs. 4 - Regression Testing: Verifies that new changes don’t break existing API functionalities. 5 - Load Testing: Measures how the API performs under expected load conditions. 6 - Stress Testing: Tests the API behavior under extreme or peak load conditions. 7 - Security Testing: Assesses the API for vulnerabilities and potential external threats. 8 - UI Testing: Checks the interaction between the user interface and the API. 9 - Fuzz Testing: Sends random or invalid data to the API to detect unexpected crashes or errors. 10 - Reliability Testing - Evaluates the API’s consistency and stability over an extended period. Over to you: Will you add any other API testing type to the list? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
3.2K

Alex Xu

Tech & AI

2mo

Load Balancer vs API Gateway Load balancers and API gateways both sit between your clients and backend servers. But they do very different things, and mixing them up causes real problems in your architecture. A load balancer has one job: distribute traffic. Clients send HTTP(s) requests from web, mobile, or IoT apps, and the load balancer spreads those requests across multiple server instances so no single server takes all the load. It handles: - Traffic distribution - Health checks to detect downed servers - Failover when something breaks - L4/L7 balancing depending on whether you're routing by IP or by actual HTTP content. An API gateway does a lot more than that. It also receives HTTP(s) requests from the same types of clients, but instead of just forwarding traffic, it controls what gets through and how. - Rate limiting to prevent abuse. - API aggregation so your client doesn't need to call five different services. - Observability for logging and monitoring. - Authentication and authorization before a request even touches your backend. - Request and response transformation to reshape payloads between client and service formats. In most production setups, the load balancer and api gateway sit together. The API gateway handles the smart stuff up front, rate limits, auth, routing to the right microservice. Then the load balancer behind it distributes traffic across instances of that service. They're not competing tools. They work best when used together. -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://lnkd.in/g9wAgcke #systemdesign #coding #interviewtips .
3.5K

Alex Xu

Tech & AI

3mo

Writing code is easy now, but testing code is hard. Let’s take a look at where different types of tests fit. - Unit + Component Tests: These test individual functions or UI components in isolation. They’re fast, inexpensive to run, and easy to maintain. Tools like Jest, Vitest, JUnit, pytest, React Testing Library, Cypress, Vue Test Utils, and Playwright are commonly used here, and most of your test coverage should come from this layer. - Integration Tests: These verify communication between services, APIs, and databases. Testcontainers, Postman, Bruno, Supertest. Unit tests won't catch a broken API contract, but integration tests will. - End-to-End Tests: Tools like Cypress, Playwright, Appium, and QA Wolf validate full user journeys across the whole system. They are expensive to run and maintain, which is why fewer tests live in this layer. AI tools are becoming part of the testing workflow. Tools like GitHub Copilot, ChatGPT, Claude, Cursor, and Qodo can help draft tests, update suites, and spot gaps in coverage. They take care of repetitive tasks and give engineers more time to focus on the edge cases that may arise in production. Over to you: How do you test your code? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips .
2.3K

Alex Xu

Tech & AI

3mo

How AI Actually Generates Images There are two main ways modern models generate images: auto-regressive and diffusion. Auto-regressive models generate an image piece by piece. During training, an image is split into tokens, and the model learns to predict them one by one, just like text. It minimizes next-token prediction loss over image tokens. At inference time, the model predicts one image token at a time until the full image is formed. Diffusion models start from pure noise and iteratively denoise it. During training, we add noise to real images and train the model to predict that noise. At inference time, the model starts from random noise and iteratively denoises it into a clean image. Auto-regressive is like drawing a dog stroke by stroke in sequence. Diffusion is like starting with a rough sketch (coarse shapes), then progressively adding detail and cleaning up the picture. Over to you: Which text-to-image model do you find most powerful? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
477

Alex Xu

Tech & AI

3mo

How Single Sign-On (SSO) Works Single Sign-On (SSO) makes access feel effortless. One login, and you’re inside Slack and several other internal tools without logging in again. But there’s a lot going on behind that single login. Step 1: The first login - A user opens an application, for example Salesforce. - Instead of asking for credentials directly, Salesforce redirects the browser to an Identity Provider (IdP) like Okta or Auth0. This redirect usually happens through an HTTP 302 response. - The browser then sends an authentication request to the IdP using protocols such as SAML or OpenID Connect (OIDC). - The IdP presents the login page. The user enters their credentials, sometimes along with MFA. - Once verified, the IdP creates a login session and sends back an authentication response (a SAML assertion or ID token) through the browser. - The browser forwards that response back to Salesforce. - Salesforce validates the token and creates its own local session, typically stored as a cookie, and grants access. Step 2: The SSO magic - Now the user opens another app, say Slack. - Slack also redirects the browser to the same identity provider. But the IdP checks and sees the user already has an active session. So it skips the login step entirely and issues a new authentication token. - The browser forwards that token to Slack. - Slack validates it, creates its own session cookie, and grants access. The key idea behind SSO is simple. Applications don’t authenticate users themselves. They rely on a central identity provider to verify the user and issue a token that other systems trust. Over to you: What SSO solutions have you used, and which is your favorite? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
1.9K

Alex Xu

Tech & AI

2mo

🚀 Last Week to Enroll: Become an AI Engineer | By building, not just watching | Cohort 5! This is a live, cohort-based course created in collaboration with best-selling author Ali Aminian and published by ByteByteGo. Here’s what makes this cohort special: - Learn by doing: Build real world AI applications, not just by watching videos. - Structured, systematic learning path: Follow a carefully designed curriculum that takes you step by step, from fundamentals to advanced topics. - Live feedback and mentorship: Get direct feedback from instructors and peers. - Community driven: Learning alone is hard. Learning with a community is easy! We are focused on skill building, not just theory or passive learning. Our goal is for every participant to walk away with a strong foundation for building AI systems. If you want to start learning AI from scratch, this is the perfect platform for you to begin. -- Check it out here: https://lnkd.in/gZEmb6rh #AI #AIEngineer #MachineLearning  .
1.5K

Alex Xu

Tech & AI

3mo

Top Cyber Attacks Explained Most attacks follow a sequence of steps. Understanding each step makes it easier to spot where detection or prevention is possible. Here’s a quick breakdown of how the most common attacks unfold: Phishing: The attacker sends a fake link pointing to a spoofed login page. The victim enters credentials, the attacker captures them, and uses them to access the real system. Ransomware: The victim opens a malicious attachment or file. The ransomware encrypts local data and demands payment to restore access. Files stay locked until the ransom is paid or a backup is restored. Man-in-the-Middle (MitM): The attacker positions themselves between the victim and the server, intercepting traffic in both directions. Neither side detects the interception. The attacker can read or modify data as it passes through. SQL Injection: Malicious SQL gets inserted into an input field, for example, studentId=117 OR 1=1. The database executes it as a valid query and returns data it shouldn't. A single vulnerable input field can expose an entire table. Cross-Site Scripting (XSS): A malicious script gets injected into a legitimate page. When another user loads that page, their browser executes the script. Session tokens, cookies, and private data can be stolen this way. Zero-Day Exploits: The attacker finds a vulnerability the vendor hasn't discovered yet. No patch exists. The attack runs until the vendor identifies the issue and ships a fix, which can take days or weeks. Over to you: Which of these attacks have you seen most often in real environments, and which one do you think is the hardest to defend against today? -- Subscribe to our weekly newsletter to get a Free System Design PDF (368 pages): https://lnkd.in/gauQcE45 #systemdesign #coding #interviewtips  .
1.5K

Alex Xu

Tech & AI

2mo

All 7 ByteByteGo courses are FREE to access for a limited time. Link at the end. - System Design Interview Vol. 1 - System Design Interview Vol. 2 - Machine Learning System Design Interview - Coding Interview Patterns - Object-Oriented Design Interview - Generative AI System Design Interview - Mobile System Design Interview Whether you’re preparing for interviews or looking to deepen your architecture knowledge, this is a great opportunity. Offer ends May 1. Please help spread the word. Check it out now at: bytebytego.com -- Edit: Thanks for the feedback! To clarify, this gives you full free access to all 7 courses on our platform, which contain the complete content from the books in a webview format. You're right that it's not a direct ebook download, and we've updated the post to make that clearer. We appreciate you pointing this out, and hope you still find the content valuable!
2.7K

Alex Xu

Tech & AI

2mo

Our New Book on Behavioral Interviews Is Now Available on Amazon! The book is written by Steve Huynh and published by ByteByteGo. Steve is a former principal engineer at Amazon. His ability to break down complex interview dynamics into clear, actionable advice made this book possible. Still, it took us two years to get it ready. Here's what's inside: - 130+ interview questions, from the most common to the ones that catch candidates off guard - 72 example stories showing what strong answers look like, from entry level to principal - Clear guidance on what interviewers look for, including key signals and red flags - High-Signal Storytelling, a framework to build a story bank for any behavioral interview - A practical prep plan and interview-day techniques for follow-ups and unexpected questions Order your copy on Amazon: https://geni.us/Yiwg6 Note: the book will also be available in India in a week or two.
802

Alex Xu

Tech & AI

2mo

REST vs gRPC Choosing between REST and gRPC seems simple at first, but it ends up affecting how your services communicate, scale, and even break. Both are trying to solve the same problem: how services talk to each other. But the way they approach it is different. 1. Data format - REST usually uses JSON. It’s human-readable, easy to debug, and works everywhere. - gRPC uses Protocol Buffers (Protobuf). It’s binary, smaller in size, and faster to process. You start noticing this difference in performance-heavy systems. JSON is convenient, but Protobuf is built for efficiency. 2. API style - REST is resource-based: /users/101 with GET, POST, PUT, DELETE. - gRPC is method-based: GetUser(), CreateUser(), UpdateUser(). REST fits nicely for public APIs. gRPC, on the other hand, feels more like calling a function on another service. 3. Communication model - REST is simple request/response. One request, one response. - gRPC supports more patterns: unary, server streaming, client streaming, and bidirectional streaming. Streaming becomes really useful when you need real-time updates or long-lived connections. 4. API contract & type safety - REST contracts are usually defined separately (OpenAPI/Swagger), and mismatches can still happen. - gRPC uses a shared .proto file with strict types and code generation. With gRPC, both client and server come from the same definition, so you run into fewer issues during integration. 5. Caching & browser support - REST works well with HTTP caching, CDNs, and browsers. - gRPC has limited browser support (usually via gRPC-Web) and doesn’t naturally fit with HTTP caching. -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://lnkd.in/g9wAgcke #systemdesign #coding #interviewtips  .
2.2K