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

Enable raft message batching (#1519) #3964

Merged
merged 2 commits into from May 13, 2024
Merged

Conversation

ffuugoo
Copy link
Contributor

@ffuugoo ffuugoo commented Apr 3, 2024

This PR enables built-in raft message batching. (See #1519.)

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@ffuugoo ffuugoo force-pushed the enable-raft-message-batching branch from ba57680 to 0cbff7b Compare April 3, 2024 16:29
@ffuugoo ffuugoo force-pushed the enable-raft-message-batching branch from f6cbb58 to 5917246 Compare April 18, 2024 14:13
Base automatically changed from fast-consensus to dev April 25, 2024 12:16
@ffuugoo ffuugoo force-pushed the enable-raft-message-batching branch from 5917246 to 997566f Compare April 25, 2024 12:20
@ffuugoo ffuugoo marked this pull request as ready for review April 25, 2024 12:20
@agourlay
Copy link
Member

Could you elaborate a bit on the observable effects of this change? 📈

@ffuugoo
Copy link
Contributor Author

ffuugoo commented Apr 25, 2024

Could you elaborate a bit on the observable effects of this change? 📈

Slight (and more stable) speedup on top of #3931. E.g., instead of sending 100 separate messages (doing 100 sequential gRPC calls) we send 1 batched message (doing 1 gRPC call).

IIRC, result were something like ~2500-2800 ops / 5 seconds with #3931 and ~2900-3000 ops / 5 seconds with batching enabled.

The only possible concern would be to check if we have any limit on maximal size of a single gRPC message, maybe we should increase it.

@timvisee
Copy link
Member

The only possible concern would be to check if we have any limit on maximal size of a single gRPC message, maybe we should increase it.

I thought we didn't have a limit on the internal API, but we should confirm it.

@ffuugoo
Copy link
Contributor Author

ffuugoo commented Apr 29, 2024

The only possible concern would be to check if we have any limit on maximal size of a single gRPC message, maybe we should increase it.

I thought we didn't have a limit on the internal API, but we should confirm it.

Seems like we don't.

Copy link
Member

@generall generall left a comment

Choose a reason for hiding this comment

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

I don't think would I have any insights without giving it a run on CI & chaos

@generall generall merged commit 2336845 into dev May 13, 2024
17 checks passed
@generall generall deleted the enable-raft-message-batching branch May 13, 2024 19:41
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

4 participants