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

TCP proxy metrics server #13

Merged
merged 3 commits into from
Mar 6, 2024
Merged

TCP proxy metrics server #13

merged 3 commits into from
Mar 6, 2024

Conversation

paulobressan
Copy link
Member

Close #9

@paulobressan paulobressan merged commit 26a0416 into main Mar 6, 2024
1 check passed
Comment on lines +122 to +137
DuplexEvent::DownstreamRead(n) => {
state
.metrics
.count_total_packages_bytes(&consumer, &namespace, &instance, n);

io_client.write_all(&upstream_buf[0..n]).await.unwrap();
io_client.flush().await.unwrap();
}
DuplexEvent::UpstreamRead(n) => {
state
.metrics
.count_total_packages_bytes(&consumer, &namespace, &instance, n);

io_server.write_all(&downstream_buf[0..n]).await.unwrap();
io_server.flush().await.unwrap();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Here is where the byte rate limiter should act right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Member Author

Choose a reason for hiding this comment

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

n is the quantity

@avatxus avatxus deleted the 9-tcp-proxy-metrics-server branch May 29, 2024 16:02
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.

TCP proxy metrics server
3 participants