1M Go websockets

在 Go 中处理 1M websockets 连接。(handling 1M websockets connections in Go)

  • Owner: eranyanay/1m-go-websockets
  • Platform: Docker, Linux
  • License:: GNU Affero General Public License v3.0
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Going Infinite,在 Go 中处理 100 万个 websockets 连接

这个库包含了在 2019 年 Gophercon Israel talk 中看到的示例的完整实现。

Going Infinite,在 Go 中处理 100 万个 websockets 连接 — [ 视频 | 幻灯片 ]

它并不打算或声称比其他实现 websocket 协议的库更好、更优化的实现,它只是展示了一套工具,所有这些工具结合在一起,展示了一个用纯 Go 编写的服务器,该服务器能够用不到 1GB 的内存为超过一百万个 websockets 连接提供服务。

使用方法

这个资源库展示了如何在 Linux 中有效地维护大量的 websockets 连接。

一切都用纯 Go 编写

每个文件夹都展示了一个服务器实现的例子,它克服了由操作系统、硬件或 Go 运行时本身提出的各种问题,正如演讲中所展示的那样。

setup.sh 是一个使用 Docker 运行多个实例的包装器。有关如何使用它的更多细节,请参见脚本内容。

destroy.sh 是一个包装器,用于停止所有正在运行的客户端。

可以通过运行 go run client.go -conn=<#连接建立> 来执行单个客户端实例。



Main metrics

Overview
Name With Ownereranyanay/1m-go-websockets
Primary LanguageGo
Program languageGo (Language Count: 2)
PlatformDocker, Linux
License:GNU Affero General Public License v3.0
所有者活动
Created At2019-02-10 13:41:43
Pushed At2022-08-14 11:12:13
Last Commit At2021-10-17 23:51:45
Release Count0
用户参与
Stargazers Count5.9k
Watchers Count113
Fork Count632
Commits Count9
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count4
Pull Requests Open Count1
Pull Requests Close Count2
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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