---
title: "Discussion on \"SGLang vs vLLM: what is really different inside, and how to compare them fairly\" | Hashnode"
description: "Discussion on \"SGLang vs vLLM: what is really different inside, and how to compare them fairly\". Both engines share almost every big idea in modern LLM serving. The real differences are in how they reuse the KV cache, and most published benchmarks change more than one thing at a time. Here is how I would explain it to a new engineer on the team."
url: "https://hashnode.com/posts/sglang-vs-vllm-what-is-really-different-inside-and-how-to-compare-them-fairly/6affe078172bdc115a1f8ae0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [SGLang vs vLLM: what is really different inside, and how to compare them fairly](https://systemdesignacademy.hashnode.dev/sglang-vs-vllm-what-is-really-different-inside-and-how-to-compare-them-fairly?utm_source=hashnode&utm_medium=feed)

Both engines share almost every big idea in modern LLM serving. The real differences are in how they reuse the KV cache, and most published benchmarks change more than one thing at a time. Here is how I would explain it to a new engineer on the team.

Nov 20 · 10 min read · systemdesignacademy.hashnode.dev  
Read the article

-   [#vllm](https://hashnode.com/tag/vllm)
-   [#llm](https://hashnode.com/tag/llm)
-   [#machine-learning](https://hashnode.com/tag/machine-learning)
-   [#ai](https://hashnode.com/tag/ai)
-   [#performance](https://hashnode.com/tag/performance)

## Written by

[RONI DAS](https://hashnode.com/@ronidas)

@ronidas · India

  
[View profile](https://hashnode.com/@ronidas)

AI engineering, agentic memory, machine learning, and system design at scale.

I work on AI systems and the infrastructure they actually run on: agentic architectures, memory for agents, retrieval, and the graph and data layers that keep model output grounded in something real. Formerly at Neo4j. I also write and teach the systems side that most AI content skips, from distributed systems and databases to the design decisions that decide whether a model ever reaches production. I run Total Technology Zonne on YouTube and I am building systemdesign.academy, an interactive course on system design, machine learning, and AI engineering, covering the parts most tutorials leave as an exercise for the reader. Mock interviews and prep packs: topmate.io/roni

## Responses 1

Markdown supported · ⌘↵ to post

[AI Developer](https://hashnode.com/@lycore)

[Nov 20](https://hashnode.com/posts/sglang-vs-vllm-what-is-really-different-inside-and-how-to-compare-them-fairly/6affe078172bdc115a1f8ae0/comment/6afff1aa897dbf11d9b646ed)

Good point that most benchmarks change more than one variable. For the prefix-reuse comparison, it may help to report results stratified by cache-hit rate and to run cold-cache and warm-cache passes separately, since an aggregate throughput number can hide that one engine just got luckier hits. Using an open-loop load at fixed request rates and comparing p50/p99 time-to-first-token would also avoid closed-loop runs flattering whichever engine saturates later. Have you considered logging the achieved hit rate alongside each result so readers can check the workloads were equivalent?
