Skip to content

Cannot open too many websocket connections #6676

@ausias-armesto

Description

@ausias-armesto

Description

During the execution of load testing, I'm trying to open too many web-socket connections and the node is not able to accept them. I have able to reproduce it locally using the local-cluster.

There are two kind of workloads executed where I find this issue:

  • Constant: When the load test starts, it starts to inject the full desired workload during the whole duration. That implies at the beginning to open too many websocket connections, and then they remain the same during the whole test duration.
  • Incremental: The load test, incrementally add more workload as the times go by, and arrive to the full desired workload by the end of the test duration.

Steps to Reproduce

  1. Clone hoprd-test repo
  2. Checkout branch ausias/weboscket-bidirectional
  3. Follow instructions on K6 folder about how to install k6 binary
  4. Start local-cluster
  5. Set the execution parameters for the test
  6. Run the test npm run test:local

Execution parameters

export HOPRD_API_TOKEN=^^LOCAL-testing-123^^
export K6_TEST_DURATION=10
export K6_REQUESTS_PER_SECOND_PER_VU=2
export K6_CLUSTER_NODES=local
export K6_VU_PER_ROUTE=50
export K6_WORKLOAD_NAME=incremental
npm run test:local

These parameters will open a total of 50 (vu) * 5(senders) * 4(relayers) * 3(receivers) = 3000 web socket connections on all local nodes. As there are 5 nodes, that implies to open 600 web-socket connections per node. As the workload is set as incremental with a duration of 10 minutes (600 seconds), it implies to open a web-socket connection per second for every node in the cluster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions