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

Add BatchSize parameter to WatchEvent #2787

Merged
merged 1 commit into from
May 21, 2024

Conversation

Tuetuopay
Copy link
Contributor

When dealing with large BGP instances, the path list can be so large it makes a response message larger than the gRPC max message size.

This adds a BatchSize field to the request to send at most BatchSize paths in a single WatchEventResponse message, greatly limiting the size of each stream item.

For reference, this was hit on a production BGP-EVPN instances with over 80k paths.

# gobgp mon --current global rib -a evpn
rpc error: code = ResourceExhausted desc = grpc: received message larger than max (140281387 vs. 4194304)

Setting a batch size allows us to get the current full table without resorting to ListPaths calls, with all the synchronization issues that ensues. This is pretty important because the limit can be reached quite quickly: we observed single paths well over 15kB on the wire, and even a batch size of 4096 leads to oversized messages (already a far cry from the 80k of the default implementation).

@Tuetuopay
Copy link
Contributor Author

Rebased

When dealing with large BGP instances, the path list can be so large it
makes a response message larger than the gRPC max message size.

This adds a BatchSize field to the request to send at most BatchSize
paths in a single WatchEventResponse message, greatly limiting the size
of each stream item.

For reference, this was hit on a production BGP-EVPN instances with over
80k paths.

    # gobgp mon --current global rib -a evpn
    rpc error: code = ResourceExhausted desc = grpc: received message larger than max (140281387 vs. 4194304)

Setting a batch size allows us to get the current full table without
resorting to ListPaths calls, with all the synchronization issues that
ensues. This is pretty important because the limit can be reached quite
quickly: we observed single paths well over 15kB on the wire, and even a
batch size of 4096 leads to oversized messages (already a far cry from
the 80k of the default implementation).
@Tuetuopay
Copy link
Contributor Author

Rebased.

@fujita fujita merged commit 85ef4d3 into osrg:master May 21, 2024
39 checks passed
@fujita
Copy link
Member

fujita commented May 21, 2024

Pushed, thanks.

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.

3 participants