whatisgithub

What is 1m-go-websockets?

eranyanay/1m-go-websockets — explained in plain English

Analysis updated 2026-06-26

5,987GoAudience · developerComplexity · 3/5Setup · moderate

In one sentence

Demo code from a 2019 conference talk showing how to maintain one million simultaneous WebSocket connections in Go, organized as progressively optimized server implementations intended for learning, not for production use.

Mindmap

mindmap
  root((1m-go-websockets))
    What it is
      Conference talk demo
      Go WebSocket scaling
      Learning resource
    Techniques
      OS limit tuning
      Memory reduction
      Runtime optimization
    Testing
      Docker client load
      setup.sh script
      Connection benchmarks
    Key insight
      1M connections feasible
      Incremental improvements
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study how to push a Go WebSocket server past OS and runtime limits to extreme connection counts

USE CASE 2

Learn techniques for reducing per-connection memory overhead in a high-concurrency Go server

USE CASE 3

Use the Docker test harness to benchmark WebSocket server capacity on your own hardware

USE CASE 4

Understand the performance bottlenecks that appear when scaling beyond 100k concurrent connections

What is it built with?

GoDockerWebSocket

How does it compare?

eranyanay/1m-go-websocketsmontferret/ferrettealeg/xlsx
Stars5,9875,9815,999
LanguageGoGoGo
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Docker to spin up the client load-test instances, the code is a learning demo and not maintained for production use.

No license information is mentioned in the explanation.

So what is it?

This repository contains the code from a 2019 conference talk about how to handle one million simultaneous WebSocket connections using the Go programming language. WebSockets are a way for a server and a browser (or other client) to keep a live two-way connection open, rather than the client making one-off requests. The challenge shown here is maintaining an enormous number of these open connections without the server running out of memory or hitting system limits. The code is organized into separate folders, each showing a different approach that solves a specific problem encountered when pushing a server to that scale, whether the limit comes from the operating system, the hardware, or Go's own runtime behavior. A helper script called setup.sh uses Docker to spin up many client instances at once so you can test the server under load. This is a learning resource, not a production library. The author is clear that no new features will be added and the code is not intended for use in real applications. It exists to accompany the talk slides and video, which are linked in the README. If you are curious about how high-performance Go servers handle extreme connection counts, this is a concise working example to study.

Copy-paste prompts

Prompt 1
Walk me through the progression of optimizations in 1m-go-websockets, what changes between each folder and why?
Prompt 2
What system-level limits does Go hit when maintaining 1 million WebSocket connections and how does this repo work around them?
Prompt 3
Show me how to run the Docker-based load test from this repo and interpret the resulting connection count metrics
Prompt 4
How does this repo reduce per-connection memory to handle 1 million open WebSocket connections on a single machine?
Prompt 5
Based on the techniques in this repo what is the minimum RAM required to hold 100k open WebSocket connections in Go?

Frequently asked questions

What is 1m-go-websockets?

Demo code from a 2019 conference talk showing how to maintain one million simultaneous WebSocket connections in Go, organized as progressively optimized server implementations intended for learning, not for production use.

What language is 1m-go-websockets written in?

Mainly Go. The stack also includes Go, Docker, WebSocket.

What license does 1m-go-websockets use?

No license information is mentioned in the explanation.

How hard is 1m-go-websockets to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is 1m-go-websockets for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.