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

server needs to meter connection rate on startup #3065

Open
buck54321 opened this issue Nov 8, 2024 · 2 comments
Open

server needs to meter connection rate on startup #3065

buck54321 opened this issue Nov 8, 2024 · 2 comments

Comments

@buck54321
Copy link
Member

When the server is restarted, virtually every client tries to connect at the same time, and then auth, and then request order books. This causes rate limiters to be hit and timeouts to occur. It resolves itself eventually, but it's not clean at all.

The server should limit new connection rates, returning some special response to clients when the rate limit is being exceeded, informing the clients of some delay after which they should attempt to reconnect.

@buck54321
Copy link
Member Author

We actually have decently restrictive rate limiters on the auth and order book subscription routes, but not on the initial connection.

@buck54321
Copy link
Member Author

Looking closer, this may be something different. Something taking a long time in the msgjson.ConnectRoute and causing timeouts waiting for the response.

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

1 participant