3303 Commits

Author SHA1 Message Date
eedec2c1c3 advancedtls: add leaf cert in verify params (#3571) 2020-04-29 11:00:02 -07:00
4b0710563d internal: revert change to make travis always build proto (#3580) 2020-04-29 09:40:14 -07:00
695da821e9 interop: increase xds test client rpc timeout (#3579) 2020-04-28 19:30:16 -07:00
80ff2c9d78 internal: code regen move file to correct location (#3574) 2020-04-28 18:27:18 -07:00
accb879596 cleanup: remove lingering V2 references (#3576) 2020-04-28 16:47:39 -07:00
d70354e6e2 advancedtls: add field names for unit tests (#3570)
* advancedtls: add field names for unit tests
2020-04-28 16:00:26 -07:00
4eb418e5b2 balancer: move Balancer and Picker to V2; delete legacy API (#3431) 2020-04-28 14:52:49 -07:00
b0ac601168 rls: LB policy with only control channel handling (#3496) 2020-04-28 10:47:24 -07:00
b2df44eac8 Pass weights to wrr balancer through attributes. (#3530) 2020-04-27 20:55:58 -07:00
a3cc4f613d interop: add --fail_on_failed_rpc xds client flag (#3567) 2020-04-24 12:11:27 -07:00
15653fec60 all: refactor .pb.go generation (#3451)
Replace various //go:generate lines and regenerate.sh scripts with a
single, top-level regenerate.sh that regenerates all .pb.go files.

Placing generation in a single script ensures that all files are
generated with similar parameters. The new regenerate.sh uses the
protoc-gen-go version defined in test/tools/go.mod and automatically
handles new .proto files as they are added.

Do some minor refactoring on .proto files: Every file now has a
go_package option (which will be required by a future version of the
code generator), and file imports are all relative to the repository
root.
2020-04-24 08:54:03 -07:00
7d6aa9ed5e kokoro: use xds-test-server image (#3564) 2020-04-23 17:54:09 -07:00
c10d2c6f85 rls: Update rls protobufs. (#3562)
The `Target` field in the response has been deprecated in favor or
`Targets` which specifies a list of possible targets. Pulled in the
latest proto and updated code referencing it.
2020-04-23 16:41:27 -07:00
a0cdc21e61 server.go: use worker goroutines for fewer stack allocations (#3204)
Currently (go1.13.4), the default stack size for newly spawned
goroutines is 2048 bytes. This is insufficient when processing gRPC
requests as the we often require more than 4 KiB stacks. This causes the
Go runtime to call runtime.morestack at least twice per RPC, which
causes performance to suffer needlessly as stack reallocations require
all sorts of internal work such as changing pointers to point to new
addresses.

Since this stack growth is guaranteed to happen at least twice per RPC,
reusing goroutines gives us two wins:

  1. The stack is already grown to 8 KiB after the first RPC, so
     subsequent RPCs do not call runtime.morestack.
  2. We eliminate the need to spawn a new goroutine for each request
     (even though they're relatively inexpensive).

Performance improves across the board. The improvement is especially
visible in small, unary requests as the overhead of stack reallocation
is higher, percentage-wise. QPS is up anywhere between 3% and 5%
depending on the number of concurrent RPC requests in flight. Latency is
down ~3%. There is even a 1% decrease in memory footprint in some cases,
though that is an unintended, but happy coincidence.

unary-networkMode_none-bufConn_false-keepalive_false-benchTime_1m0s-trace_false-latency_0s-kbps_0-MTU_0-maxConcurrentCalls_8-reqSize_1B-respSize_1B-compressor_off-channelz_false-preloader_false
               Title       Before        After Percentage
            TotalOps      2613512      2701705     3.37%
             SendOps            0            0      NaN%
             RecvOps            0            0      NaN%
            Bytes/op      8657.00      8654.17    -0.03%
           Allocs/op       173.37       173.28     0.00%
             ReqT/op    348468.27    360227.33     3.37%
            RespT/op    348468.27    360227.33     3.37%
            50th-Lat    174.601µs    167.378µs    -4.14%
            90th-Lat    233.132µs    229.087µs    -1.74%
            99th-Lat     438.98µs    441.857µs     0.66%
             Avg-Lat    183.263µs     177.26µs    -3.28%
2020-04-23 15:50:02 -07:00
29f40a46f6 make helper function return error (#3553) 2020-04-23 14:58:34 -07:00
6a3c03883d Pass address attributes from balancer to creds handshaker. (#3548) 2020-04-23 11:03:42 -07:00
8f94cb18c0 status: remove Error method accidentally added to *Status (#3561) 2020-04-23 08:42:39 -07:00
18b6aa7728 xds: unexport edsBalancerImplInterface's function (#3550)
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2020-04-22 15:55:30 -07:00
f313ade84c advancedtls: add fine-grained verification levels in XXXOptions (#3454) 2020-04-22 13:44:18 -07:00
843b06d549 benchmark: Fix segfault in benchmark code. (#3555)
If a benchmark run did not specify req/resp payload curve files, and the
result from that run is used on the `benchresult` binary, it will
segfault because there is no check for the presence of the payload curve
option before printing the set of features used. Added a sanity check
there.
2020-04-22 12:00:57 -07:00
03def2a1f3 examples: add go.mod to make examples a separate module (#3546) 2020-04-21 10:55:54 -07:00
f67e7c03dc Make vet happy on non_linux platforms. (#3549) 2020-04-17 15:47:55 -07:00
da1517890d internal: move parseMethodName func to internal/grpcutil (#3525) 2020-04-17 12:02:55 -07:00
6774920a77 xds: Modify return value of getClusterFromRouteConfiguration (#3534) 2020-04-17 11:59:34 -07:00
aff515dc67 env: check GRPC_GO_IGNORE_TXT_ERRORS env var (#3532) 2020-04-17 08:49:40 -07:00
d15f1a4aa1 test: Move creds related to tests to creds_test.go (#3542) 2020-04-16 16:30:23 -07:00
f9ac13d469 credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3529) 2020-04-16 15:09:15 -07:00
759569bb9c balancer: support hierarchical paths in addresses (#3494) 2020-04-16 14:45:21 -07:00
f9a1aeb4f2 xds: accept either "" or "/" as the prefix for the default route (#3535) 2020-04-15 16:50:46 -07:00
ff40ef4227 xds: refactor xds_client (#3477)
This PR refactors xds_client to support multiples watches. Those watches can be for the same type and same resource_name.

There's upper level `Client` and lower level `v2client`. Before this change, all logic was in `v2client`, and `Client` was a thin wrapper.

This PR moves some of the functionality from `v2client` to `Client`. New layers:

- Upper level `Client`
  - keeps a list of watchers
    - provides method `func WatchXXX() (cancel func())`
    - has `WatchService()` which involves `LDS` and `RDS`
  - handles resources from the xDS responses and dispatch to the watchers
    - including multiple watchers for the same resource_name
  - keeps cache
    - and checks cache for new watches

- Lower level `v2client`
  - is a dumb client that
    - manages ADS stream
    - sends a new xDS request when add/remove watch
    - parses xDS responses
      - It doesn't call watchers, but forwards all parsed results to upper Client
    - handles ACK/NACK
  - supports `addWatch(type, name)` and `removeWatch(type, name)`
    - instead of `func watchCDS() func()`, which is now moved up to upper `Client`

Also includes other changes:
 - Corresponding test changes (some tests for `v2client` were moved to `Client`)
 - Method and type renaming
   - CDS/EDS -> Cluster/Endpoints
 - callback functions all accept updates as non-pointers
2020-04-15 14:32:31 -07:00
6e001bea42 README: add link to Go releases (#3526) 2020-04-15 10:32:57 -07:00
c7079afb44 lint: fail on missing package comment (#3524)
golint does check for missing package comment, but with low confidence.
golint checks each file, and complains on every file missing package comment, even though another file in the same package has the comment.

This PR adds a golint check with low min_confidence, and filters out false-positives.
2020-04-15 09:59:17 -07:00
c97e1d3b72 Revert "credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3513)" (#3528)
This reverts commit 7c3fd13027648f7fe3bfc6e16289c65c09493e69.
2020-04-14 15:09:23 -07:00
4c4cafbab7 internal/transport: Get rid of TargetInfo struct. (#3527) 2020-04-14 14:43:14 -07:00
46c755aff1 rename to LocalityID (#3522) 2020-04-14 09:04:53 -07:00
8e6052a06f fix typo in flag description (#3520) 2020-04-13 13:55:48 -07:00
a783b25fe5 internal: rename proto import to end with pb (#3523) 2020-04-13 12:37:38 -07:00
27096e8260 doc: update README for supported Go versions and travis for tests (#3516) 2020-04-10 16:01:05 -07:00
7c3fd13027 credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3513) 2020-04-09 22:35:28 -07:00
b02de00073 client: option to surface connection errors to callers (#3430)
This commit allows blocking clients to receive a more informative error
message than "context deadline exceeded", which is especially helpful in
tracking down persistent client misconfiguration (such as an invalid TLS
certificate, an invalid server that's refusing connections, etc.)
2020-04-09 13:45:13 -07:00
a9555d046f balancergroup: update methods to V2balancer (#3505)
And make balancergroup stop load reporting is load store is not set
2020-04-09 11:20:37 -07:00
709091fe14 service config: move balancer config parsing to internal (#3504)
And make it a json unmarshaller, easy to use.
2020-04-08 13:57:52 -07:00
7f19477365 Change version to 1.30.0-dev (#3511) 2020-04-08 13:31:42 -07:00
85e3a6fdd7 credentials: Update doc strings for NewClientTLSFromCert et. al. (#3508) 2020-04-08 11:05:45 -07:00
3038e58ed2 examples: add example to show how to use the health service (#3381) 2020-04-08 10:38:37 -07:00
98e4c7ad3e xds: move balancer group to a separate package (#3493)
This PR moves balancer group to a separate package and exports the type with some methods. Balancer group will be used by the weighted_target policy.
2020-04-06 15:12:58 -07:00
c5faf568da status: move statusError to internal/status package (#3432) 2020-04-06 11:03:17 -07:00
7cb4db26f1 internal: update grpc_lb_v1 proto (#3499) 2020-04-06 10:09:23 -07:00
a9601d93f4 xds: update nonce even if the ACK/NACK is not sent on wire (#3497)
This can happen when the watch is canceled while the response is on wire.

Also, tag ACK/NACK with the stream so nonce for a new stream doesn't get updated by a ACK from the previous stream.
2020-04-03 13:09:57 -07:00
66e9dfe703 transport: fix handling of header metadata in serverHandler (#3484) 2020-04-03 12:39:25 -07:00