Commit Graph

46 Commits

Author SHA1 Message Date
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
Ahmet Soormally 7c97d1d53c docs: fix reflection doc (#3138)
added `git submodule update --init` to readme instructions to pull in missing dependencies.
2019-11-04 08:32:18 -08:00
Doug Fawley e2d4ecf5a6
doc: clarify client concurrency (#3001) 2019-09-05 13:20:03 -07:00
Kartik Yadav bc316a57d4 doc: fixing link in keepalive docs (#2755)
The link for enforcement policy in the keepalive docs is wrong.

fixes #2754
2019-04-09 11:34:45 -07:00
Kartik Yadav 981ad1f9d2 doc: fixing broken link in rpc-error doc (#2753)
The link for example in the documentation for RPC errors redirects to the wrong URL.

Fixes #2752
2019-04-09 11:33:11 -07:00
Nguyen Quang Huy 871b88ce2e doc: fix typos (#2655) 2019-02-25 10:31:22 -08:00
Menghan Li 23ef1279c1
doc: fix broken link in auth doc (#2613) 2019-02-07 13:26:12 -08:00
Menghan Li 6086f8d68f
examples: reflection (#2594) 2019-01-25 15:35:01 -08:00
Menghan Li 9d925ce589
examples: metadata (#2500) 2018-12-13 14:45:14 -08:00
Menghan Li 55ef601361
internal: cleanup remaining x/net/context (#2470) 2018-11-28 12:46:35 -08:00
Menghan Li 481c28e8d4
documentation: add proxy doc (#2357) 2018-10-18 13:09:24 -07:00
Menghan Li ad6d187e37
keepalive: godoc improvement and behavior explanation (#2342) 2018-10-02 13:03:51 -07:00
Menghan Li b39aa9e037
Revert stickiness (#2175)
Stickiness will be reimplemented as part of a balancer/resolver redesigning/extending.
2018-06-26 10:02:54 -07:00
dfawley 49c8c81756
Documentation: create doc describing grpc-go's log levels and their usages (#2033) 2018-06-11 09:31:41 -07:00
Eno Compton 0ebfac42d6 Documentation: Add initial documentation on concurrency (#2034) 2018-05-10 13:08:19 -07:00
Menghan Li e8a6e2844b
stickiness: add stickiness support (#1969) 2018-04-24 10:37:52 -07:00
Eno Compton d27df52a27 documentation: add OAuth2 doc and example (#2003) 2018-04-18 11:25:19 -07:00
Karsten Weiss 7de9139327 Fix typos (#1994) 2018-04-16 10:03:02 -07:00
Eno Compton 32d9ffabba Documentation: Fix broken link in rpc-errors.md (#1935) 2018-03-21 10:14:55 -07:00
Eno Compton 5415d18359 Add documentation and example of adding details to errors (#1915) 2018-03-21 08:56:43 -07:00
Jean de Klerk 08d626137c metadata: provide AppendToOutgoingContext interface (#1794)
- Provide AppendToOutgoingContext interface for imrproved performance
over manually creating md and joining with existing md
- Add benchmarks for old/new approaches

Fixes #1390
2018-02-12 11:10:37 -08:00
dfawley 5ba054bf37
encoding: Introduce new method for registering and choosing codecs (#1813) 2018-01-23 11:39:40 -08:00
dfawley 816fa5b06f
Add proper support for 'identity' encoding type (#1664) 2017-11-17 09:24:54 -08:00
dfawley 2d4b7e005a Create versioning and release policy document (#1583) 2017-10-17 14:02:34 -07:00
Menghan Li a68137c927 Revert "Added localhost to net.Listen() calls to avoid macOS firewall dialog." (#1541)
This reverts commit c67cd636f9.
2017-09-27 00:01:17 -07:00
Hein Meling c67cd636f9 Added localhost to net.Listen() calls to avoid macOS firewall dialog. (#1539) 2017-09-26 10:19:45 -07:00
TRAVIS ALLEN SALAS COX 39c8c3866d Use `NewOutgoingContext ` in the metadata doc (#1425)
Removed the deprecated `NewContext` from the doc so that the
documentation would match example given in the doc
2017-08-04 13:14:02 -07:00
Mehrdad Afshari 93166a0b0b Canonicalize https://grpc.io as the preferred URL prefix 2017-07-10 16:28:39 -07:00
MakMukhi 074dbfbc52 Add doc and example for mocking streaming RPCs (#1230)
* Example code for mocking streams
* Added another expectation on the stream
* Documentation for mocking streaming RPCs
2017-05-19 13:36:45 -07:00
dfawley 68a5d50f45 Fix go buildable source file problem (#1213) 2017-05-02 15:55:05 -07:00
dfawley 0c1d39df28 Separate incoming and outgoing metadata in context
This will prevent the incoming RPCs' metadata from appearing in outgoing RPCs
unless it is explicitly copied, e.g.:

incomingMD, ok := metadata.FromContext(ctx)
if ok {
  ctx = metadata.NewContext(ctx, incomingMD)
}

Fixes #1148
2017-04-07 11:54:56 -07:00
MakMukhi 541319e4fb Update gomock-example.md 2016-12-15 14:19:28 -08:00
MakMukhi 54f30019da Update gomock-example.md 2016-12-13 15:43:20 -08:00
MakMukhi 5202729e3a Update gomock-example.md 2016-12-13 14:09:53 -08:00
MakMukhi e6b4662278 Update gomock-example.md 2016-12-13 13:49:43 -08:00
MakMukhi 0708983f29 Create gomock-example.md 2016-12-13 13:10:39 -08:00
Menghan Li cc3363f26e Merge pull request #937 from menghanl/reflection_tutorial
Add server-reflection-tutorial.md
2016-11-29 17:57:20 -08:00
Clive Young b7d24ba0eb correct errors in documentation 2016-11-21 16:07:22 +08:00
Menghan Li b1efb1e37d fixes in reflection_tutorial 2016-10-21 13:40:54 -07:00
Menghan Li 522de0d748 Add server-reflection-tutorial.md 2016-10-20 17:53:38 -07:00
David Wu e80eaf12f2 correct spelling error for the word suffix 2016-10-03 15:20:24 +08:00
Gyu-Ho Lee c4adca718a Documentation: fix metadata.FromContext example
metadata.FromContext returns additional boolean value.
This fixes the example in metadata documentation.
2016-05-12 11:07:32 -07:00
Tim Burks c3d43ed0f4 Update grpc-auth-support.md 2016-04-05 17:31:00 -07:00
Menghan Li b60d4e72a1 Add metadata documentation 2016-03-29 11:00:44 -07:00
Brandon Philips 04e58f3820 Documentation: grpc-auth-support point at gRPC.io
Instead of linking to the gRPC docs in github link to gRPC.io
2015-09-16 18:03:32 -07:00
Brandon Philips f0d0c4955f grpc-auth-support: move to a Documentation folder
Perhaps we should move the examples into this folder too? Clearly this
random bit of documentation doesn't belong in the root folder in any
case.
2015-09-16 18:00:53 -07:00