Commit Graph

33 Commits

Author SHA1 Message Date
Arjan Singh Bal 4275c5bdd8
transport: Re-use slice buffer reader for a stream (#8360) 2025-05-30 00:09:14 +05:30
Arjan Singh Bal fb223f78b8
transport: Optimize heap allocations (#8361) 2025-05-28 15:21:53 +05:30
Paul Chesnais 9ab8b62505
Implement new Codec that uses `mem.BufferSlice` instead of `[]byte` (#7356) 2024-08-21 14:11:39 -07:00
Jonathan Halterman 6a5a283b69
Use builtin min and max functions (#7478)
* Use builtin min and max functions

Go added builtin min and max functions in 1.21. This commit removes existing functions and uses the built-ins in stead.

* Revert gofmt changes
2024-08-20 10:42:02 +05:30
Nathan Baulch c8951abc16
*: fix minor typos (#7487)
* Fix typos

* Fix reflecton tests
2024-08-14 22:43:01 +05:30
Easwar Swaminathan c04b085930
internal/transport: minor cleanup of controlBuffer code (#7319) 2024-06-17 07:41:12 -07:00
Doug Fawley 54e0a1365b
transport: misc cleanups (#7147) 2024-04-18 10:10:47 -07:00
Abhishek Ranjan f268126950
Send GOAWAY to server on Client Transport Shutdown (#7015) 2024-04-17 14:20:12 -07:00
Doug Fawley 05db80f118
server: wait to close connection until incoming socket is drained (with timeout) (#6977) 2024-02-12 08:38:58 -08:00
Doug Fawley fbff2abb0f
*: update `interface{}` to `any` and `go.mod` version to `go 1.19` (#6544) 2023-08-14 09:04:46 -07:00
Easwar Swaminathan a8a25ce994
transport: use prefix logging (#6135) 2023-03-22 09:20:36 -07:00
Doug Fawley b458a4f11a
transport: stop always closing connections when loopy returns (#6110) 2023-03-14 13:32:25 -07:00
Doug Fawley ad4057fcc5
transport: stop returning errors that are always nil (#6098) 2023-03-08 13:40:47 -08:00
Doug Fawley 2a1e9348ff
server: after GracefulStop, ensure connections are closed when final RPC completes (#5968)
Fixes https://github.com/grpc/grpc-go/issues/5930
2023-01-25 16:28:29 -08:00
Arvind Bright 6de8f50f91
transport: drain client transport when streamID approaches maxStreamID (#5889)
Fixes https://github.com/grpc/grpc-go/issues/5600
2023-01-11 12:58:00 -08:00
Zach Reyes a9709c3f8c
Added logs for reasons causing connection and transport close (#5840) 2022-12-08 19:44:23 -05:00
Doug Fawley 99ba98231e
transport/server: flush GOAWAY before closing conn due to max age (#5821)
Fixes https://github.com/grpc/grpc-go/issues/4859
2022-12-01 09:02:41 -08:00
kennylong 3f5b7ab48c
internal/transport: fix typo (#5566) 2022-08-16 10:16:30 -07:00
Zach Reyes 9f4b31a11c
Added HTTP status and grpc status to POST check (#5364)
* Added HTTP status and grpc status to POST check
2022-05-19 14:48:44 -04:00
Zach Reyes 689f7b154e
transport: logic specified in A41 to support RBAC xDS HTTP Filter (#4803)
* transport: logic specified in A41 to support RBAC xDS HTTP Filter
2021-09-27 16:55:46 -04:00
Doug Fawley 84d0920b59
transport: unblock read throttling when controlbuf exits (#4447) 2021-05-19 11:05:26 -07:00
Doug Fawley 23a83dd097
transport: various simplifications noticed during #4447 (#4455) 2021-05-18 15:26:51 -07:00
Doug Fawley 328b1d171a
transport: allow InTapHandle to return status errors (#4365) 2021-05-07 14:37:52 -07:00
Garrett Gutierrez 506b773066
Implemented component logging (#3617) 2020-06-26 12:04:47 -07:00
Bryan Boreham 4709b05f2c
transport: move append of header and data down to http2 write loop to save garbage (#3568) 2020-05-21 14:21:54 -07:00
Doug Fawley 6b9bf4296e
Revert "profiling: add hooks within grpc (#3159)" (#3378)
This reverts commit 83263d17f7.
2020-02-14 07:56:46 -08:00
Adhityaa Chandrasekar 83263d17f7
profiling: add hooks within grpc (#3159) 2020-02-12 11:10:44 -08:00
Menghan Li 8c50fc2565
revert buffer reuse (#3338)
* Revert "stream: fix returnBuffers race during retry (#3293)"

This reverts commit ede71d589c.

* Revert "codec/proto: reuse of marshal byte buffers (#3167)"

This reverts commit 642675125e.
2020-01-27 13:30:41 -08:00
Adhityaa Chandrasekar 642675125e codec/proto: reuse of marshal byte buffers (#3167)
Performance benchmarks can be found below. Obviously, a 8 KiB
request/response is tailored to showcase this improvement as this is
where codec buffer reuse shines, but I've run other benchmarks too (like
1-byte requests and responses) and there's no discernable impact on
performance.

We do not allow reuse of buffers when stat handlers or binlogs are
turned on. This is because those two may need access to the data and
payload even after the data has been written to the wire. In such cases,
we never return the data back to the pool.

A buffer reuse threshold of 1 KiB was determined after several
experiments. There's diminished returns when buffer reuse is enabled for
smaller messages (actually, a negative impact).

unary-networkMode_none-bufConn_false-keepalive_false-benchTime_40s-trace_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_6-reqSize_8192B-respSize_8192B-compressor_off-channelz_false-preloader_false
               Title       Before        After Percentage
            TotalOps       839638       906223     7.93%
             SendOps            0            0      NaN%
             RecvOps            0            0      NaN%
            Bytes/op    103788.29     80592.47   -22.35%
           Allocs/op       183.33       189.30     3.27%
             ReqT/op 1375662899.20 1484755763.20     7.93%
            RespT/op 1375662899.20 1484755763.20     7.93%
            50th-Lat    238.746µs    225.019µs    -5.75%
            90th-Lat    514.253µs    456.439µs   -11.24%
            99th-Lat    711.083µs    702.466µs    -1.21%
             Avg-Lat     285.45µs    264.456µs    -7.35%
2019-12-20 09:41:23 -08:00
Easwar Swaminathan 45bd2846a3
Use sync.Cond to implement keepalive dormancy. (#2987)
The current code was using a buffered channel which was used to signal
whether the keepalive goroutine should enter dormancy or if it should be
awaked from sleep. Using sync.Cond makes the code much simpler to read,
and also improves the performance numbers in all but one front.
2019-08-26 15:01:49 -07:00
Doug Fawley ee21c923a2
transport: block reading frames when too many transport control frames are queued (#2970)
Addresses CVE-2019-9512 (Ping Flood), CVE-2019-9514 (Reset Flood), and CVE-2019-9515 (Settings Flood).
2019-08-13 10:52:26 -07:00
dfawley 5fe10fccaf
Remove unused symbols (#2287) 2018-09-05 12:29:02 -07:00
dfawley 11b582728a
transport: move to internal to make room for new, public transport API (#2212)
This is a breaking change, but the transport package was never intended for use outside of grpc.  Any current users that we are aware of are incorrect or have a preferred alternative.
2018-07-11 11:22:45 -07:00