Skip to content
handling 1M websockets connections in Go
Go Shell
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead, 3 commits behind eranyanay:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
0_simple_web_server
1_ws_example
2_ws_ulimit
3_optimize_ws_goroutines
4_optimize_gobwas
LICENSE
README.md
client.go
destroy.sh
pprof_goroutine.sh
pprof_heap.sh
setup.sh

README.md

Going Infinite, handling 1M websockets connections in Go

This repository holds the complete implementation of the examples seen in Gophercon Israel talk, 2019.

Usage

This repository demonstrates how a very high number of websockets connections can be maintained efficiently in Linux

Everything is written in pure Go

Each folder shows an example of a server implementation that overcomes various issues raised by the OS, by the hardware or the Go runtime itself, as shown during the talk.

setup.sh is a wrapper to running multiple instances using Docker. See content of the script for more details of how to use it.

destroy.sh is a wrapper to stop all running clients. Note that it removes any running container, so use with caution.

A single client instance can be executed by running go run client.go -conn=<# connections to establish>

Slides are available here

You can’t perform that action at this time.