-
Notifications
You must be signed in to change notification settings - Fork 137
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
Mita Server Support Large-Scale Users #125
Comments
This is expected. When a new connection is established, the server will iterate all the users and try to decrypt the message, which can take a long time if the number of users is huge. The limit depends on the performance of server machine. It is better to load balance users to different machines. |
There's no problem with the VPS; it has 32GB of RAM, and only one user is connected, yet I'm experiencing a timeout issue. I created 3 servers with fake json config files for XTLS Xray(2GB RAM), Singbox(2GB RAM), and Mieru(32GB RAM), but the problem only occurs with Mieru. Could you please check it? Thank you. |
I believe there are issues with the code that make iterating over all users unnecessary. Instead, we can utilize the array index to verify if a user exists. While I'm not well-versed in Go language, this approach is applicable in other programming languages. |
I got your point. This is achieved with TLS. Client encrypt the user info with server's public key. Server uses the private key to decrypt, and get the user info. Server uses the same private key to decrypt all incoming requests. No TLS was the initial design goal of this project (https://github.com/enfein/mieru/blob/main/docs/announcement.zh_CN.md). I don't want to complicate everything by bringing in it. |
There are some ways to mitigate, for example: run decryption in parallel, start from the most recent user, etc. |
I think this is possible to do with cipher caching. |
Given there are some other protocol changes we can make, let's do everything together and target this at mieru v3.0.0 release. |
1. Make changes to the mieru protocol to improve performance and security (issue #125).
I encountered a problem with our Mita server client while attempting to add a large number of users (10,000) at once. The client, Mieru, isn't working properly in this scenario, resulting in a timeout error. However, it operates correctly when adding a smaller number of users under normal circumstances.
The text was updated successfully, but these errors were encountered: