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

revert: rate limit based on peer address #1351 #1426

Merged

Conversation

oddgrd
Copy link
Contributor

@oddgrd oddgrd commented Nov 27, 2023

Description of change

Revert #1351. While testing locally, the rate limiting layer worked as expected. However, when deployed in swarm mode, Docker puts a load balancer in front of the services in the user network. Therefore, it appears to the rate limiter that all logger requests are coming from the same peer address.

How has this been tested? (if applicable)

Tested that logging works as expected locally (get_logs and get_logs --follow).

Comment on lines +666 to +667
error!(error = %error, "failed to retrieve logs for deployment");
Err(anyhow!("failed to retrieve logs for deployment").into())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this were to be reverted, it would be reverted to return a 404, but that would be incorrect, so I left this in.

@oddgrd
Copy link
Contributor Author

oddgrd commented Nov 27, 2023

Note: I did not revert this change: https://github.com/shuttle-hq/shuttle/pull/1351/files#diff-5d10b574e97438514650fd6f44664299baf20536aab73554ca2754906d2a72d4L382-R447, since it would ease implementing rate limiting based on number of requests in the future if the log batches are smaller.

@jonaro00
Copy link
Member

Can we also not revert the log error handling in c-s? to remain along with: #1429

@oddgrd
Copy link
Contributor Author

oddgrd commented Nov 28, 2023

Can we also not revert the log error handling in c-s? to remain along with: #1429

Thanks, that's a good idea!

@jonaro00 jonaro00 merged commit bc25873 into main Nov 28, 2023
32 of 33 checks passed
@jonaro00 jonaro00 deleted the feature/eng-1945-rate-limiting-interprets-all-peers-as-the-same branch November 28, 2023 10:08
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

Successfully merging this pull request may close these issues.

None yet

2 participants