---
title: "Discussion on \"How I built and scaled real‑time chat app from 2 to millions of users — without a rewrite?\" | Hashnode"
description: "Discussion on \"How I built and scaled real‑time chat app from 2 to millions of users — without a rewrite?\". Designing an ephemeral one-on-one chat that can jump from two users to two million without changing a line of code."
url: "https://hashnode.com/posts/how-i-built-and-scaled-real-time-chat-app-from-2-to-millions-of-users-without-a-rewrite/6a43c12fa4907beae8c291ed"
---

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

Discussion

# [How I built and scaled real‑time chat app from 2 to millions of users — without a rewrite?](https://nguyengineer.dev/how-i-built-and-scaled-real-time-chat-app-from-2-to-millions-of-users-without-a-rewrite?utm_source=hashnode&utm_medium=feed)

Designing an ephemeral one-on-one chat that can jump from two users to two million without changing a line of code.

Jun 30 · 14 min read · nguyengineer.dev  
Updated Jul 1  
Read the article

-   [#websockets](https://hashnode.com/tag/websockets)
-   [#go](https://hashnode.com/tag/go)
-   [#realtime-apps](https://hashnode.com/tag/realtime-apps)
-   [#kafka](https://hashnode.com/tag/kafka)
-   [#postgres](https://hashnode.com/tag/postgres)
-   [#cdc](https://hashnode.com/tag/cdc)
-   [#debezium](https://hashnode.com/tag/debezium)
-   [#centrifugo](https://hashnode.com/tag/centrifugo)
-   [#scaling](https://hashnode.com/tag/scaling)

## Written by

[Nguyen Engineer](https://hashnode.com/@finnng)

@finnng · Berlin, Germany

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

Software Engineer

👋 Hi, I’m Nguyen, or you can call me Finn 💾 Vimmer ❤️ Gopher 📍I'm based in Berlin, Germany ⚙️ I love working with Go and Typescript ⚙️ I specialized in distributed system and cloud native.

## Responses 5

Markdown supported · ⌘↵ to post

[Synfinity Dynamics Pvt Ltd](https://hashnode.com/@synfinity-dynamics)

[Jul 2](https://hashnode.com/posts/how-i-built-and-scaled-real-time-chat-app-from-2-to-millions-of-users-without-a-rewrite/6a43c12fa4907beae8c291ed/comment/6a465ed54628e35d87a4aa70)

Excellent breakdown of designing for scale from day one. I especially liked the explanation of the transactional outbox pattern and how it keeps the application tier stateless. Building for horizontal scalability instead of planning for a future rewrite is a smart engineering mindset.

[Nguyen Engineer](https://hashnode.com/@finnng)

[Jul 6](https://hashnode.com/posts/how-i-built-and-scaled-real-time-chat-app-from-2-to-millions-of-users-without-a-rewrite/6a43c12fa4907beae8c291ed/comment/6a465ed54628e35d87a4aa70#reply-6a4b84f495f7b9f7f5782320)

You are right, building horizontal scalability from day one is the point of the experiment.

[Julian Neagu](https://hashnode.com/@julianneagulab)

[Jul 2](https://hashnode.com/posts/how-i-built-and-scaled-real-time-chat-app-from-2-to-millions-of-users-without-a-rewrite/6a43c12fa4907beae8c291ed/comment/6a464fa9934f5ca34d5bce4a)

The HTML over the wire part stood out to me. Fewer moving pieces usually means fewer weird bugs, especially when you're building and maintaining everything yourself.

[Mateo Ruiz](https://hashnode.com/@mateoruiz)

[Jul 2](https://hashnode.com/posts/how-i-built-and-scaled-real-time-chat-app-from-2-to-millions-of-users-without-a-rewrite/6a43c12fa4907beae8c291ed/comment/6a46467815814c6cc3f57a5b)

One thing I really liked here is that the architecture optimizes for failure scenarios, not just happy-path throughput. The transactional outbox + CDC pattern solves the reliability problem first, and the scalability benefits naturally follow.

Another takeaway is your point about keeping the app tier stateless by pushing fanout downstream. That's a design choice that pays off long before you hit "millions of users" because deployments, scaling, and operations all become simpler.

Also appreciated the discussion around HTML-over-the-wire. Whether someone agrees with that choice or not, it's refreshing to see the trade-offs explained instead of treating any architecture as universally correct.

Great write-up that focuses on engineering decisions rather than just technology choices.

[Nguyen Engineer](https://hashnode.com/@finnng)

[Jul 6](https://hashnode.com/posts/how-i-built-and-scaled-real-time-chat-app-from-2-to-millions-of-users-without-a-rewrite/6a43c12fa4907beae8c291ed/comment/6a46467815814c6cc3f57a5b#reply-6a4b84a67e8d4647eccf4748)

Thank you. Let me know if you find any part worth extending for more detail.
