{"id":13461579,"url":"https://github.com/eranyanay/1m-go-websockets","last_synced_at":"2025-03-24T22:34:41.728Z","repository":{"id":38206489,"uuid":"169982320","full_name":"eranyanay/1m-go-websockets","owner":"eranyanay","description":"handling 1M websockets connections in Go","archived":false,"fork":false,"pushed_at":"2022-08-14T11:12:13.000Z","size":25,"stargazers_count":5803,"open_issues_count":4,"forks_count":622,"subscribers_count":112,"default_branch":"master","last_synced_at":"2024-10-29T08:35:49.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eranyanay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-10T13:41:43.000Z","updated_at":"2024-10-23T05:49:19.000Z","dependencies_parsed_at":"2022-07-12T10:22:48.516Z","dependency_job_id":null,"html_url":"https://github.com/eranyanay/1m-go-websockets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eranyanay%2F1m-go-websockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eranyanay%2F1m-go-websockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eranyanay%2F1m-go-websockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eranyanay%2F1m-go-websockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eranyanay","download_url":"https://codeload.github.com/eranyanay/1m-go-websockets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366191,"owners_count":20603438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T11:00:45.236Z","updated_at":"2025-03-24T22:34:41.481Z","avatar_url":"https://github.com/eranyanay.png","language":"Go","funding_links":[],"categories":["Go","学习项目","Learning Content","Tools per Language","\u003ca id=\"1d9dec1320a5d774dc8e0e7604edfcd3\"\u003e\u003c/a\u003e工具-新添加的"],"sub_categories":["静态网站生成器","Static Site Generator","Go","\u003ca id=\"8f1b9c5c2737493524809684b934d49a\"\u003e\u003c/a\u003e文章\u0026\u0026视频"],"readme":"# Going Infinite, handling 1M websockets connections in Go\nThis repository holds the complete implementation of the examples seen in Gophercon Israel talk, 2019.\n\n\u003e Going Infinite, handling 1 millions websockets connections in Go / Eran Yanay \u0026mdash; [ [Video](https://www.youtube.com/watch?v=LI1YTFMi8W4) | [Slides](https://speakerdeck.com/eranyanay/going-infinite-handling-1m-websockets-connections-in-go) ]\n\nIt 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.\n\n# Usage\nThis repository demonstrates how a very high number of websockets connections can be maintained efficiently in Linux\n\nEverything is written in pure Go\n\nEach 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.\n\n`setup.sh` is a wrapper to running multiple instances using Docker. See content of the script for more details of how to use it.\n\n`destroy.sh` is a wrapper to stop all running clients.\n\nA single client instance can be executed by running `go run client.go -conn=\u003c# connections to establish\u003e`\n\n# Remarks\nThis repo consists of a set of examples that were demonstrated during a live talk in Gophercon. \n\nWhat 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. \n\nThe only purpose of this repository is to serve as a reference and a case study.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feranyanay%2F1m-go-websockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feranyanay%2F1m-go-websockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feranyanay%2F1m-go-websockets/lists"}