• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

eranyanay/1m-go-websockets: handling 1M websockets connections in Go

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

eranyanay/1m-go-websockets

开源软件地址:

https://github.com/eranyanay/1m-go-websockets

开源编程语言:

Go 91.6%

开源软件介绍:

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>

Remarks

This repo consists of a set of examples that were demonstrated during a live talk in Gophercon.

What you see is what you get - while the implementation is fully functional, it doesn't intend to serve as a production-ready code, and no new features that were asked will be added.

The only purpose of this repository is to serve as a reference and a case study.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap