handling 1M websockets connections in Go

Going Infinite, handling 1M websockets connections in Go

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

Going Infinite, handling 1 millions websockets connections in Go / Eran Yanay — [ Video | Slides ]

It doesnt intend or claim to serve as a better, more optimal implementation than other libraries that implements the websocket protocol, it simply shows a set of tools, all combined together to demonstrate a server written in pure Go that is able to serve more than a million websockets connections with less than 1GB of ram.

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.

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

Similar Resources

The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |

The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |

News This is the under-development branch. Stay tuned for the upcoming release v12.2.0. Looking for a stable release? Head over to the v12.1.8 branch

Dec 28, 2022

🎥 Proxy livestreams from websockets to external RTMP endpoints.

pxy pxy is a Go server that routes incoming livestream data from websockets to an external RTMP endpoint. This project is a work in progress, I'll upd

Nov 26, 2022

a simple shitty project for learn more about websockets

video-transmission A simple shitty project for learn more about websockets. For run this you only need to have docker in your computer and then execut

Mar 29, 2022

Go client for an OBS WebSockets server

goobs It's a Go client for Palakis/obs-websocket, allowing us to interact with OBS Studio via Go. disclaimer This project is still a work-in-progress.

Jan 1, 2023

A reverse proxy implementing IRC-over-WebSockets

webircproxy webircproxy is a reverse proxy that accepts IRCv3-over-WebSocket connections, then forwards them to a conventional ircd that speaks the no

Dec 22, 2021

Kucoin proxy for freqtrade that is using websockets to maintain candlestick/klines data in memory

Kucoin proxy for freqtrade that is using websockets to maintain candlestick/klines data in memory, thus having great performance and reducing the amount of API calls to the Kucoin API. All other calls are proxied as usual.

Dec 5, 2022

A small and basic service to echo requests made via websockets

Ping Service A small and basic service to echo requests made via websockets, can be useful for measuring latency between clients and this service. Run

Nov 18, 2021

Stream logs through websockets, written in Go

Stream logs through websockets, written in Go

Jan 8, 2022

Websockets - Chaotic Web Sockets With Golang

Chaotic Web Sockets The intention of this project is to show the behavior of a s

Jan 21, 2022

Logkubed - Serve K8s container logs in realtime with websockets

log3 (logkubed) logcubed is a mini app that helps you stream Kubernetes pod logs

Aug 31, 2022

Online multiplayer board game server written in Go, using WebSockets.

BfH Server The Battle for Hermannia is a board game created as a gift by the father of hermannm, a developer of this project. This digital edition of

Nov 7, 2022

Database wrapper that manage read write connections

rwdb Database wrapper that manage read write connections Install go get github.com/andizzle/rwdb Create connections package main import "github.com/

Dec 10, 2022

A little library for turning TCP connections into go channels.

netutils By Tim Henderson ([email protected]) This is a little library that was part of a larger project that I decided to pull out and make public.

Aug 13, 2020

benchmarks for implementation of servers which support 1 million connections

Benchmark for implementation of servers that support 1m connections inspired by handling 1M websockets connections in Go Servers 1_simple_tcp_server:

Jan 5, 2023

rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.

rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.

rconn (r[everse] conn[ection]) is a multiplatform program for creating reverse connections. It lets you consume services that are behind NAT and/or fi

Jan 1, 2023

wire protocol for multiplexing connections or streams into a single connection, based on a subset of the SSH Connection Protocol

qmux qmux is a wire protocol for multiplexing connections or streams into a single connection. It is based on the SSH Connection Protocol, which is th

Dec 26, 2022

UDP Transport: compress, encrypt and send any data reliably over unreliable UDP connections

udpt UDP Transport Compresses, encrypts and transfers data between a sender and receiver using UDP protocol. Features and Design Aims: Avoid the overh

Nov 5, 2022

Tooling to validate HTTPS Certificates and Connections Around Web 🕷️

Tooling to validate HTTPS Certificates and Connections Around Web 🕷️

Cassler - SSL Validator Tool If your read fast, it's sounds like "Cassia Eller" Tooling to validate HTTPS Certificates and Connections Around Web 🕷️

Sep 14, 2022

CLI Tool to remove unwanted connections from your Chia Node based on Geo IP Location.

chia-bouncer Tiny CLI tool to remove unwanted connections from your Chia Node based on the Geo IP Location (Country). The Tool is written in golang an

Jun 25, 2021
Comments
  • Add support to kqueue

    Add support to kqueue

    Due to there is no epoll in bsd os but kqueue, and kqueue worked like epoll.

    This patch works on linux and bsd.

    More information can see: https://github.com/tidwall/evio

a simple shitty project for learn more about websockets

video-transmission A simple shitty project for learn more about websockets. For run this you only need to have docker in your computer and then execut

Mar 29, 2022
Go client for an OBS WebSockets server

goobs It's a Go client for Palakis/obs-websocket, allowing us to interact with OBS Studio via Go. disclaimer This project is still a work-in-progress.

Jan 1, 2023
Kucoin proxy for freqtrade that is using websockets to maintain candlestick/klines data in memory

Kucoin proxy for freqtrade that is using websockets to maintain candlestick/klines data in memory, thus having great performance and reducing the amount of API calls to the Kucoin API. All other calls are proxied as usual.

Dec 5, 2022
A small and basic service to echo requests made via websockets

Ping Service A small and basic service to echo requests made via websockets, can be useful for measuring latency between clients and this service. Run

Nov 18, 2021
Websockets - Chaotic Web Sockets With Golang

Chaotic Web Sockets The intention of this project is to show the behavior of a s

Jan 21, 2022
handling 1M websockets connections in Go

Going Infinite, handling 1M websockets connections in Go This repository holds the complete implementation of the examples seen in Gophercon Israel ta

Jan 1, 2023
GOWS is GoLang web-socket module Provides you with ease of handling web socket connections with a few lines

GOWS GOWS is GoLang web-socket module Provides you with ease of handling web socket connections with a few lines, it supports multi-connection on one

Apr 4, 2022
Play chess with Go, HTML5, WebSockets and random strangers!

ChessBuddy Play chess with Go, HTML5, WebSockets and random strangers! Demo: http://chess.tux21b.org:8000/ Hint: Open the page in two different tabs,

Nov 10, 2022
Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.

websocketd websocketd is a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSoc

Dec 31, 2022
Library for receiving (near) realtime notifications about earthquakes using websockets

goseismic goseismic is library for receiving (near) realtime notifications about earthquakes using websockets from SeismicPortal. Using goseismic, rec

Dec 29, 2022