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

[Java][FlightRPC] Increase the default backpressure threshold in Java Arrow Flight servers #40745

Closed
jduo opened this issue Mar 22, 2024 · 5 comments

Comments

@jduo
Copy link
Member

jduo commented Mar 22, 2024

Describe the enhancement requested

grpc-java recently added a toggle for changing the buffering threshold before backpressure is triggered (grpc/grpc-java#5433).

The default is 32KB. For Arrow Flight loads, this should be set higher: 1-10MB. There FlightServer.Builder should also let users specify the threshold.

Documentation should recommend users not use complicated backpressure strategies after making this change.

Component(s)

FlightRPC, Java

@kou kou changed the title Increase the default backpressure threshold in Java Arrow Flight servers [Java][FlightRPC] Increase the default backpressure threshold in Java Arrow Flight servers Mar 22, 2024
@vibhatha
Copy link
Collaborator

@jduo planning on a PR for this?

@jduo
Copy link
Member Author

jduo commented Mar 24, 2024

Hi @vibhatha ,

I do not have a PR planned for this yet.

@jduo
Copy link
Member Author

jduo commented Apr 6, 2024

gRPC 1.63.0 was just released with this feature:
https://github.com/grpc/grpc-java/releases

@jduo
Copy link
Member Author

jduo commented Apr 6, 2024

take

@jduo jduo self-assigned this Apr 6, 2024
lidavidm pushed a commit that referenced this issue Apr 7, 2024
#41051)

### Rationale for this change

gRPC uses a default backpressure threshold that is too low for services that send large amounts of data such as Arrow Flight. This causes excessive blocking and reduces throughput.

### What changes are included in this PR?

* Update to grpc-java 1.63.0
* Add to FlightServer.Builder an option to set the number of bytes queued before blocking due to backpressure. Set the default to 10MB instead of gRPC's default of 64K.
* Add a ServerInterceptor for automating setting the backpressure threshold on ServerCalls.

### Are these changes tested?

Tested through existing unit tests.

### Are there any user-facing changes?

The FlightServer.Builder class has an extra configuration option to let users change the backpressure threshold themselves.

* GitHub Issue: #40745

Authored-by: James Duong <james.duong@improving.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
@lidavidm lidavidm added this to the 16.0.0 milestone Apr 7, 2024
@lidavidm
Copy link
Member

lidavidm commented Apr 7, 2024

Issue resolved by pull request 41051
#41051

@lidavidm lidavidm closed this as completed Apr 7, 2024
verma-kartik pushed a commit to verma-kartik/arrow that referenced this issue Apr 11, 2024
…reshold (apache#41051)

### Rationale for this change

gRPC uses a default backpressure threshold that is too low for services that send large amounts of data such as Arrow Flight. This causes excessive blocking and reduces throughput.

### What changes are included in this PR?

* Update to grpc-java 1.63.0
* Add to FlightServer.Builder an option to set the number of bytes queued before blocking due to backpressure. Set the default to 10MB instead of gRPC's default of 64K.
* Add a ServerInterceptor for automating setting the backpressure threshold on ServerCalls.

### Are these changes tested?

Tested through existing unit tests.

### Are there any user-facing changes?

The FlightServer.Builder class has an extra configuration option to let users change the backpressure threshold themselves.

* GitHub Issue: apache#40745

Authored-by: James Duong <james.duong@improving.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
tolleybot pushed a commit to tmct/arrow that referenced this issue May 2, 2024
…reshold (apache#41051)

### Rationale for this change

gRPC uses a default backpressure threshold that is too low for services that send large amounts of data such as Arrow Flight. This causes excessive blocking and reduces throughput.

### What changes are included in this PR?

* Update to grpc-java 1.63.0
* Add to FlightServer.Builder an option to set the number of bytes queued before blocking due to backpressure. Set the default to 10MB instead of gRPC's default of 64K.
* Add a ServerInterceptor for automating setting the backpressure threshold on ServerCalls.

### Are these changes tested?

Tested through existing unit tests.

### Are there any user-facing changes?

The FlightServer.Builder class has an extra configuration option to let users change the backpressure threshold themselves.

* GitHub Issue: apache#40745

Authored-by: James Duong <james.duong@improving.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
tolleybot pushed a commit to tmct/arrow that referenced this issue May 4, 2024
…reshold (apache#41051)

### Rationale for this change

gRPC uses a default backpressure threshold that is too low for services that send large amounts of data such as Arrow Flight. This causes excessive blocking and reduces throughput.

### What changes are included in this PR?

* Update to grpc-java 1.63.0
* Add to FlightServer.Builder an option to set the number of bytes queued before blocking due to backpressure. Set the default to 10MB instead of gRPC's default of 64K.
* Add a ServerInterceptor for automating setting the backpressure threshold on ServerCalls.

### Are these changes tested?

Tested through existing unit tests.

### Are there any user-facing changes?

The FlightServer.Builder class has an extra configuration option to let users change the backpressure threshold themselves.

* GitHub Issue: apache#40745

Authored-by: James Duong <james.duong@improving.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
rok pushed a commit to tmct/arrow that referenced this issue May 8, 2024
…reshold (apache#41051)

### Rationale for this change

gRPC uses a default backpressure threshold that is too low for services that send large amounts of data such as Arrow Flight. This causes excessive blocking and reduces throughput.

### What changes are included in this PR?

* Update to grpc-java 1.63.0
* Add to FlightServer.Builder an option to set the number of bytes queued before blocking due to backpressure. Set the default to 10MB instead of gRPC's default of 64K.
* Add a ServerInterceptor for automating setting the backpressure threshold on ServerCalls.

### Are these changes tested?

Tested through existing unit tests.

### Are there any user-facing changes?

The FlightServer.Builder class has an extra configuration option to let users change the backpressure threshold themselves.

* GitHub Issue: apache#40745

Authored-by: James Duong <james.duong@improving.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
rok pushed a commit to tmct/arrow that referenced this issue May 8, 2024
…reshold (apache#41051)

### Rationale for this change

gRPC uses a default backpressure threshold that is too low for services that send large amounts of data such as Arrow Flight. This causes excessive blocking and reduces throughput.

### What changes are included in this PR?

* Update to grpc-java 1.63.0
* Add to FlightServer.Builder an option to set the number of bytes queued before blocking due to backpressure. Set the default to 10MB instead of gRPC's default of 64K.
* Add a ServerInterceptor for automating setting the backpressure threshold on ServerCalls.

### Are these changes tested?

Tested through existing unit tests.

### Are there any user-facing changes?

The FlightServer.Builder class has an extra configuration option to let users change the backpressure threshold themselves.

* GitHub Issue: apache#40745

Authored-by: James Duong <james.duong@improving.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
vibhatha pushed a commit to vibhatha/arrow that referenced this issue May 25, 2024
…reshold (apache#41051)

### Rationale for this change

gRPC uses a default backpressure threshold that is too low for services that send large amounts of data such as Arrow Flight. This causes excessive blocking and reduces throughput.

### What changes are included in this PR?

* Update to grpc-java 1.63.0
* Add to FlightServer.Builder an option to set the number of bytes queued before blocking due to backpressure. Set the default to 10MB instead of gRPC's default of 64K.
* Add a ServerInterceptor for automating setting the backpressure threshold on ServerCalls.

### Are these changes tested?

Tested through existing unit tests.

### Are there any user-facing changes?

The FlightServer.Builder class has an extra configuration option to let users change the backpressure threshold themselves.

* GitHub Issue: apache#40745

Authored-by: James Duong <james.duong@improving.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants