This repository has been archived by the owner on Nov 18, 2019. It is now read-only.
Use a LOT of worker threads to fake concurrency #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm configuring Rocket to use a whole lot of worker threads (128, to be precise) in order to work around an issue that we're seeing in production. The short description is that when there are very few worker threads (on the production instance there are only 2) the loading the host or client page can cause the entire server to lock up. You can see a discussion of there error here: rwf2/Rocket#243 (comment).
Using a lot of worker threads is a quick solution, but a better solution would be to setup NGINX as a reverse-proxy to handle the requests. That said, I think using a bunch of worker threads may also help with the issues we were seeing with only 2 player being able to really play at once, so I'm going to push this fix through and we can see what impact it has in production.