{"id":17576730,"url":"https://github.com/paustint/socketio-node-cluster-test","last_synced_at":"2026-01-31T19:02:42.745Z","repository":{"id":42105553,"uuid":"196856101","full_name":"paustint/socketio-node-cluster-test","owner":"paustint","description":"Proof of Concept to show Heroku cannot handle sticky worker sessions with Node Cluster","archived":false,"fork":false,"pushed_at":"2023-01-05T20:53:19.000Z","size":3700,"stargazers_count":1,"open_issues_count":32,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-08T02:53:05.713Z","etag":null,"topics":["cluster","code-cluster","heroku","node","session","socket-io","socketio","sticky","sticky-session"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paustint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-14T15:58:07.000Z","updated_at":"2021-05-05T03:02:19.000Z","dependencies_parsed_at":"2023-02-04T16:00:40.836Z","dependency_job_id":null,"html_url":"https://github.com/paustint/socketio-node-cluster-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paustint/socketio-node-cluster-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paustint%2Fsocketio-node-cluster-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paustint%2Fsocketio-node-cluster-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paustint%2Fsocketio-node-cluster-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paustint%2Fsocketio-node-cluster-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paustint","download_url":"https://codeload.github.com/paustint/socketio-node-cluster-test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paustint%2Fsocketio-node-cluster-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28950279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cluster","code-cluster","heroku","node","session","socket-io","socketio","sticky","sticky-session"],"created_at":"2024-10-21T23:24:08.560Z","updated_at":"2026-01-31T19:02:42.727Z","avatar_url":"https://github.com/paustint.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heroku / Node Cluster / Socket.io Test\n\nThis is a proof of concept application to prove that Heroku cannot handle socket.io polling transports while using Node clusters.\n(I thought it would not work, but turns our that it did work....)\n\nThe problem is that all the \"sticky session\" solutions have all of the workers using a random port on their server.listen(), and Heroku blocks all ports aside from `process.env.PORT`.\n\n**The source code was originally built here**: https://github.com/ANURAGVASI/socket.io-multiserver-chatApp\n**Accompanying blog article**: https://blog.imaginea.com/7597-2/\n\nSummary of the issue:\n\n1. For any heroku app that has at least 1 2x Dyno, two+ workers will be created (this can be simulated by creating two socket)\n   1. Override the `WEB_CONCURRENCY` environment variable to `3` or higher to allow workers on any dyno size\n2. Because socket.io uses many http requests for a handshake or long polling transport, the same worker must handle all requests\n   1. Note: this library has set the transport to `['polling']` to force the simulation of browsers or networks without websocket support\n\nYou can run this locally to confirm it is working\n\n```shell\nnpm run build\nnpm start\n```\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaustint%2Fsocketio-node-cluster-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaustint%2Fsocketio-node-cluster-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaustint%2Fsocketio-node-cluster-test/lists"}