{"id":16105790,"url":"https://github.com/devlights/go-socket-reuseport-example","last_synced_at":"2026-07-16T23:33:12.264Z","repository":{"id":149716617,"uuid":"598998585","full_name":"devlights/go-socket-reuseport-example","owner":"devlights","description":"This is a sample of an application built in Go using SO_REUSEPORT socket option.","archived":false,"fork":false,"pushed_at":"2023-02-08T16:16:38.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T08:58:25.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devlights.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-08T08:36:39.000Z","updated_at":"2024-11-04T17:30:05.000Z","dependencies_parsed_at":"2023-04-04T04:24:48.649Z","dependency_job_id":null,"html_url":"https://github.com/devlights/go-socket-reuseport-example","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/devlights%2Fgo-socket-reuseport-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlights%2Fgo-socket-reuseport-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlights%2Fgo-socket-reuseport-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlights%2Fgo-socket-reuseport-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devlights","download_url":"https://codeload.github.com/devlights/go-socket-reuseport-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427012,"owners_count":20937214,"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-10-09T19:10:38.368Z","updated_at":"2025-10-13T20:31:44.341Z","avatar_url":"https://github.com/devlights.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-socket-reuseport-example\n\nThis is a sample of an application built in Go using SO_REUSEPORT socket option.\n\n![Go Version](https://img.shields.io/badge/go-1.19-blue.svg)\n\n## How to Run\n\n### Using [go-task](https://taskfile.dev/)\n\n### Build\n\n```sh\n$ task build\ntask: [clean] rm -rf bin\ntask: [build] go build -o bin/server cmd/server/main.go\ntask: [build] go build -o bin/client cmd/client/main.go\n```\n\n### Server 1\n\nOpen a new terminal and execute the following command.\n\n```sh\n$ task server -- 1\n```\n\n### Server 2\n\nOpen a new terminal and execute the following command.\n\n```sh\n$ task server -- 2\n```\n\n### Check LISTEN Status\n\n```sh\n$ task ss\ntask: [ss] ss -atn | grep -F \"0.0.0.0:9999\"\nLISTEN    0      128                0.0.0.0:9999                  0.0.0.0:*                                                                                     \nLISTEN    0      128                0.0.0.0:9999                  0.0.0.0:*\n```\n\n### Client\n\nOpen a new terminal and execute the following command.\n\n```sh\n$ task client\ntask: [client] for i in {1..10}; do bin/client; done\nRESPONSE FROM: 2\nRESPONSE FROM: 1\nRESPONSE FROM: 1\nRESPONSE FROM: 1\nRESPONSE FROM: 2\nRESPONSE FROM: 1\nRESPONSE FROM: 1\nRESPONSE FROM: 2\nRESPONSE FROM: 1\nRESPONSE FROM: 1\n```\n\n### Stop servers\n\n```sh\n$ task close\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlights%2Fgo-socket-reuseport-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevlights%2Fgo-socket-reuseport-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlights%2Fgo-socket-reuseport-example/lists"}