Commit Graph

3166 Commits

Author SHA1 Message Date
Doug Fawley cd74fa23ea
internal: remove withResolverBuilder and use WithResolvers instead (#3321) 2020-01-15 08:54:42 -08:00
Easwar Swaminathan 62d4bd73ba
security: Add a package level comment to testdata package in advancedtls (#3317) 2020-01-14 14:10:59 -08:00
Doug Fawley 0083f6eefc
client: add WithResolvers options for specifying client-local resolvers (#3320) 2020-01-14 12:44:21 -08:00
Garrett Gutierrez e8a4440d49 grpctest: implement grpclogger using testing.T and inject in tests (#3260) 2020-01-13 14:02:31 -08:00
Doug Fawley c35a580b0c
Revert "balancer: move Balancer and Picker to V2; delete legacy… (#3315)
This reverts commit 336cf8d761.
2020-01-13 13:12:55 -08:00
Menghan Li 20bce9a0c6
advancedtls: add package for testdata (#3306) 2020-01-10 14:33:38 -08:00
Doug Fawley 336cf8d761
balancer: move Balancer and Picker to V2; delete legacy API (#3301) 2020-01-10 13:44:48 -08:00
ZhenLian 69baa3f192 credentials: close tls.Conn on failure (#3300) 2020-01-10 13:41:22 -08:00
Menghan Li 02c70004a2
xds: delete old xds resolver (#3303)
And rename the new resolver from xds-experimental-new to
xds-experimental.
2020-01-09 12:28:05 -08:00
Menghan Li 1a3212aaf5
lint: add missing package level comments (#3302) 2020-01-08 11:31:36 -08:00
Menghan Li ede71d589c
stream: fix returnBuffers race during retry (#3293)
And release the buffer after Write(), unless the buffer needs to be kept for retries.
2020-01-07 17:17:22 -08:00
ZhenLian 4a4d179f28 advancedtls: add new module for advanced TLS handshaker (#3187) 2020-01-07 15:47:01 -08:00
yihuaz 4346c5926d credentials: create API for transport security level information (#3214) 2020-01-07 15:38:45 -08:00
Doug Fawley b91517cd56
dns: ignore TXT errors unless GRPC_GO_IGNORE_TXT_ERRORS=false (#3299) 2020-01-07 13:08:22 -08:00
Adhityaa Chandrasekar cf9eb4f51c benchmark: add support for payload size curves (#3248) 2020-01-06 14:45:41 -08:00
Ning Xie 10cea4324e internal: fix initialBackoff typo (#3289) 2020-01-06 10:22:54 -08:00
Menghan Li 287dc3e58a
eds: move edsBalancer to the package `edsbalancer` (#3294)
edsBalancer (the old xds balancer) was in `package balancer`, one level above the eds implementation. It's a thin wrapper of the eds impl (and fallback in the future).

This change moves the thin wrapper to `package edsbalancer`, and also renames some structs.
2020-01-03 11:08:28 -08:00
Menghan Li 1f28521e57
eds: delete fallback related code from the EDS balancer (#3287)
We will add fallback support back when the design is finalized. Before that, fallback makes the code quite hard to follow.
2020-01-02 15:32:38 -08:00
Ning Xie 5bc9b325fa fix lbpb package name typo (#3290) 2020-01-02 12:10:08 -08:00
Ning Xie 5f3da2a013 Fix resolver.ClientConnection to resolver.ClientConn (#3288) 2019-12-30 10:01:47 -08:00
Easwar Swaminathan 8a65b8453b
xds: client test cleanup. (#3284) 2019-12-27 15:00:59 -08:00
Menghan Li c618975385
internal: fix profiling go generate proto file path (#3285) 2019-12-27 10:20:02 -08:00
Menghan Li aa428f8ea4
xds: fix RDS flaky tests due to ACK (#3279)
Clear ACK request before starting the real RDS tests. This should only be necessary for RDS tests because RDS needs an existing LDS.
2019-12-23 15:08:16 -08:00
Menghan Li d14c83465f
xds: client test cleanup (#3267) 2019-12-23 15:06:49 -08:00
Adhityaa Chandrasekar 01d201eb8d examples: add profiling (#3265) 2019-12-20 15:33:45 -08:00
Cesar Ghali a2a5ae5d4d
credentials/alts: Add Client Authorization Utility API (#3271)
Add client authorization util API
2019-12-20 10:01:56 -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
Adhityaa Chandrasekar ffcdcbc762 profiling: add cmd binary for retrieving and processing data (#3161) 2019-12-20 09:28:08 -08:00
Easwar Swaminathan fb8a097792
xds: Improve cdsbalancer_test.go (#3277)
* Use the fakexds.Client object instead of defining a new one
* Add CDS watch functionality to the fakexds.Client object
2019-12-19 13:47:34 -08:00
Ning Xie f42dee19bb trace: fix getting family for the method (#3216) 2019-12-19 13:23:11 -08:00
Easwar Swaminathan 9819552c93
xds: Improve xds_resolver_test.go (#3259)
Also get rid of the testutils.XDSClient type. We have a new
testutils/fakexds/Client type which will be used in tests going forward.
2019-12-19 09:21:11 -08:00
Adhityaa Chandrasekar d44b1112a2 profiling: add proto and service (#3160) 2019-12-19 08:54:38 -08:00
Doug Fawley fcf817f67c
dns: report errors from A record lookups instead of zero addresses (#3258) 2019-12-19 08:53:07 -08:00
Easwar Swaminathan 660df6a06b
xds: Improve xds_client_test.go (#3270)
Simplified the tests by only testing what is required and faking out
whatever can be faked out.

Also added a fakexds.Server implementation. Will switch other users of
the existing fakeserver implementation after this PR is merged.
2019-12-18 14:17:35 -08:00
Menghan Li 04c179315b
xds: support multiple xds servers in bootstrap file (#3247)
Changes to "xds_server" field in bootstrap file:

1. Field name is changed "xds_servers" (plural).
2. Field value should be a list of objects instead of a single object.

For now, we can ignore all entries except the first one.  In the future, we will add support for falling back to a secondary server when the primary is not reachable.
2019-12-18 13:50:05 -08:00
Doug Fawley f324900496
dns: fix timing-based test to be more reliable (#3269)
Also, changed the test to make it run in less time and perform more iterations.
2019-12-18 12:46:31 -08:00
Menghan Li a281b506e1
xds test: read ACK to clear req chan (#3266)
The real test relies on req chan to know when the fake xds server
receives the request. Without this, req chan may unblock for the ack,
before the real watch handler is ready.
2019-12-18 12:35:58 -08:00
Doug Fawley 9efef0360f
Change version to 1.27.0-dev (#3263) 2019-12-17 14:10:24 -08:00
Easwar Swaminathan d01454da4a
xds: Improve balancere/xds_test.go. (#3256) 2019-12-17 11:42:43 -08:00
Easwar Swaminathan f7b39d80aa
profiling: Fix a data race in the circular buffer. (#3254) 2019-12-13 15:56:14 -08:00
Easwar Swaminathan e3baa761f4
grpc: Defer the unlock in newCCResolverWrapper (#3255)
Although the existing code wasn't causing a deadlock or causing
goroutines to hang forever, this is cleaner and prevents any such thing
from happening in the future.
2019-12-13 10:55:51 -08:00
Doug Fawley 085c980048
grpclb: do not send redundant empty load reports to remote LB (#3249)
Small refactor of tests:

- Add a channel to remoteBalancer on which to send received stats messages
- Change runAndGetStats to runAndCheckStats to allow for faster successful test
  runs (no longer need to sleep for one whole second per test).
- Remove redundant leak check from runAndCheckStats, otherwise excess load
  report messages not read from the channel will result in an infinite loop.
- Add String method to rpcStats to avoid data race between merging and printing.
2019-12-12 14:10:47 -08:00
Menghan Li df18b5433b
xds: support ack/nack (#3227)
The client will send a request with version/nonce after receiving a
response, to ack/nack.

Ack versions for different xds types are independent.

Some other changes
- merge sendRequests to one shared function, with fields for version/nonce
- deleted enum for xds types, and always use const URL string
2019-12-12 13:39:56 -08:00
Stefan Sauer 032a3799b2 godoc: clarify WithTimeout deprecation note (#3226)
Tell people to replace Dial + WithTimeout with DialContext + context.WithTimeout.
2019-12-12 13:29:02 -08:00
Adhityaa Chandrasekar cb0e11b54f benchmark: include go and grpc version in result files (#3242) 2019-12-12 13:18:36 -08:00
Easwar Swaminathan d5c817b906
xds: Improve xds_lrs_test.go (#3251) 2019-12-12 12:04:14 -08:00
Amanda Bozigian 4323b783fd Update README.md (#3231) 2019-12-11 13:12:25 -08:00
Doug Fawley 9f02faeffa
credentials: move TLS implementation to a separate file (#3243) 2019-12-11 13:11:24 -08:00
Adhityaa Chandrasekar 021bd5734e profiling: add internal changes to support profiling of gRPC (#3158) 2019-12-11 09:06:38 -08:00
Menghan Li 505c0d6440
xds: skip callback if xds client reports error (#3240)
Errors will be handled specifically, depending on whether it's a
connection error or other types of errors.

Without this fix, balancer's callback will be called with <nil> update,
causing nil panic later.
2019-12-10 14:03:21 -08:00