Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrency limits of hio http server setup. #30

Closed
lenkan opened this issue Dec 20, 2023 · 2 comments
Closed

Concurrency limits of hio http server setup. #30

lenkan opened this issue Dec 20, 2023 · 2 comments

Comments

@lenkan
Copy link

lenkan commented Dec 20, 2023

Please see reference repo here: https://github.com/lenkan/hio-transfer-encoding-test.

When running the node.js test benchmarks in the repository, the server really struggles to complete even 100 concurrent requests. Is this expected behaviour or is the server misconfigured somehow? Most of the time the server does not process all requests, it stops after ~50-60 requests.

Background

Similar to #29, we are experiencing weird behaviour when running KERIA, so trying to create minimal reproducible examples.

@lenkan
Copy link
Author

lenkan commented Dec 20, 2023

Update: I have opened an issue in keria WebOfTrust/keria#155. That might be more tangible. Please let me know if I should just close this one.

@SmithSamuelM
Copy link
Contributor

Concurrency limit changed. Fixed with hio 0.6.10 see #32

Explanation, the legacy default python tcp socket connection listen backlog is 5. Later versions of the python socket library now allow a higher limit that is constrained by the number of tcp socket connections allowed by SOMAXCONN which now defaults to 128 on most systems (macOS and Linux).

Changed the hio tcp server to default to 128 for the listen backlog. This is now a parameter that gets passed in so when can later come back and configure it to be higher if the system SOMAXCONN is set higher. This now allows up to 128 concurrent connection requests. The performance limitation now on the hio http server is well the code path in python for processing the http request which includes all the overhead. This is single threaded single core performance of pure python http server and Falcon ReST framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants