Commit Graph

3944 Commits

Author SHA1 Message Date
ZHANG Dapeng 6b2e754746
xds: refactor EDS policy to use ObjectPool<XdsClient> with error handling fixes (#6450) 2019-12-04 10:40:20 -08:00
Eric Gribkoff bfa085a1cf
Start 1.27.0 development cycle (#6480) 2019-12-03 17:27:55 -08:00
Eric Anderson 2d592642ad Update Bazel+Javalite to 3.11
Bazel was stuck on the javalite branch of protobuf because the master
branch was lacking the toolchain necessary for javalite. The fix was
backported to 3.11 in protocolbuffers/protobuf#6976
2019-12-03 17:01:08 -08:00
Jihun Cho 1573e0d400
netty: log NativeIoException as FINE level (#6477)
resolves #6478
2019-12-03 13:05:04 -08:00
Eric Anderson 54b7847a7f Update protobuf to 3.11.0 and gson to 2.8.6
Updating Protobuf to bring in improvements for Android.

Protobuf pulls in the newer version of gson and we are happy to update
to it.
2019-12-02 16:43:06 -08:00
Jiangtao Li 0dfda93395
alts: fix lazychannel close (#6475) 2019-12-02 15:33:31 -08:00
Chengyuan Zhang 06dd24e248
xds: integrate CDS protocol in XdsClient (#6416)
Add CDS protocol integration into XdsClient. gRPC client interacts with XdsClient for CDS results via adding a cluster watcher to receive cluster information from traffic director. Multiple watchers can exist to receive cluster information for the same or different clusters.
2019-12-02 13:57:36 -08:00
ZHANG Dapeng 8062406afc
interop-testing,core: interop test to get remote address attributes
Adding interop-test for getting remote server address from client interceptor. Also added this feature to inprocess transport.
2019-12-02 13:30:55 -08:00
sanjaypujare 7b6ab2558c
xds: Implementation of SdsSslContextProvider using SdsClient (#6444) 2019-11-27 15:17:12 -08:00
Jihun Cho 09d5093295
xds: simplify condition (#6463) 2019-11-25 13:22:38 -08:00
Jihun Cho 7db873f1f6
Roll-forward of stub,compiler: generated stub extends Abstract{Async,Future,Blocking}Stub #6196 (#6458)
This reverts commit 2eb3f8c34e (#6317).
2019-11-25 09:41:16 -08:00
Chengyuan Zhang 0a0d9f6684
xds: integrate EDS protocol into XdsClient (#6370)
This change implements EDS protocol in XdsClient, which requests for endpoint information for a given cluster for gRPC's load balancing usage. Note EDS is a quasi-incremental protocol, which means each response may contain only a subset of present resources. Absence of resources should be revealed by response timeout. Currently, timeout is not implemented, endpoint watchers will wait indefinitely if endpoints for the cluster interested in does not exist.
2019-11-24 23:35:58 -08:00
Kun Zhang b0e00fd4ba
netty: enable io.grpc.netty.useCustomAllocator by default (#6459) 2019-11-22 16:13:35 -08:00
Chengyuan Zhang eb21c646b2
api, core: make scheduled executor service accessible for NameResolver.Args (#6455)
Added new API on NameResolver.Args to access ScheduledExecutorService, which is wrapped transport executor.
2019-11-21 16:14:13 -08:00
ZHANG Dapeng 81efecd86a
remove getLoadStatsStore method from LocalityStore
Currently `LoadStatsStore` is create by `LocalityStore` and `LoadReportClient` retrieves `LoadStatsStore` from `LocalityStore.getLoadStatsStore()`.

But `LocalityStore` is create by EDS policy, whereas `LoadReportClient` and `LoadStatsStore` should be created by CDS (if not EDS-only), before `LocalityStore` is created. If `LoadReportClient` is embedded in `XdsClientImpl`, it need a `LoadStatsStore` which shouldn't be created by `LocalityStore`.

Instead, `LoadStatsStore` should be create before `LocalityStore` is created, and be passed to `LocalityStore`'s constructor. A getter is not needed.
2019-11-21 12:37:48 -08:00
Jihun Cho eaf99cf7fe
core,xds: add missing JUnit RunWith annotation (#6457) 2019-11-21 11:52:34 -08:00
Eric Anderson 44b26dab9d stub: Provide bread-crumb to user how to configure StreamObserver before start
This is already in the documentation in CallStreamObserver, but if the user
gets here the error didn't provide an actionable next step. The message now
provides more help of how they should have called the methods instead of
feeling more like a brick wall.
2019-11-20 15:10:39 -08:00
Chengyuan Zhang d4e8962277
cronet: disable code shrinking for library build (#6448) 2019-11-20 12:12:53 -08:00
Chengyuan Zhang c2d68039ba
xds: implement LDS/RDS over ADS in XdsClient (#6320)
Implement envoy's LDS and RDS protocols in XdsClient. gRPC has a special purpose xDS resolver to instantiate an XdsClient object and add a watcher to initiate xDS communication with management server to retrieve information used in service config, which configures gRPC's load balancing plugin.
2019-11-20 00:43:08 -08:00
ZHANG Dapeng 17c3e48240
xds: refactor to eliminate LookasideChannelLb
This is a followup of #6425 to further refactor/cleanup. Now that `LookasideChannelLb` does very little thing, it does not need to be a class anymore.
2019-11-19 17:46:43 -08:00
Chengyuan Zhang c7a6f62831
xds: add gRPC-Java build version into Node parsed for xDS protocol (#6443) 2019-11-19 14:14:18 -08:00
Eric Anderson 31a192dd40 protobuf: Exclude new javalite artifact name
In 48929c4 the protobuf lite artifact name changed from protobuf-lite to
protobuf-javalite. However, the exclusion in grpc-protobuf was missed in the
update, allowing protobuf lite to leak into the classpath. This restores the
previous behavior of only having one protobuf implementation on the classpath.
2019-11-19 09:13:08 -08:00
ZHANG Dapeng 2d454d478c
Revert "Revert "all: remove deprecated usePlaintext(boolean)""
This reverts commit 316a739e67.
2019-11-18 16:53:52 -08:00
Chengyuan Zhang 86bfefdaf2
api, core: make channel logger accessible through NameResolver.Args (#6430) 2019-11-18 16:33:39 -08:00
Kun Zhang d77419557a
netty: reduce default worker ELG thread number by half, to number of CPU cores (#6439)
This would cut the amount of per-thread direct buffer allocations by half, especially with light traffic. This will also cut the amount of file descriptors that's created per thread by half.

Internal benchmark results (median of 5 runs) doesn't show any significant change:
```
                          Before (STDEV)           After (STDEV)
grpc-java-java-multi-qps-integrity_only
Actual QPS               711,004 (6,246)         704,372 (6,873) 
QPS per Client CPU        23,921   (252)          24,188   (252)

grpc-java-java-multi-throughput-integrity_only
Actual QPS                35,326    (48)          35,294    (29) 
QPS per Client CPU         3,362    (17)           3,440    (13)

grpc-java-java-single-latency-integrity_only
Median latency (us)          127  (2.77)             129  (3.13)

grpc-java-java-single-throughput-integrity_only
Actual QPS                   581 (11.60)             590  (7.08)
QPS per Client CPU           490 (10.98)             498  (5.63)
```
2019-11-18 16:26:37 -08:00
Chengyuan Zhang 94eb93bd3a
api: enforce NameResolver.Args creation with builder (#6437) 2019-11-18 15:31:44 -08:00
ZHANG Dapeng bd1f819024
xds: add an Attributes for XdsClient reference 2019-11-18 15:20:38 -08:00
sanjaypujare b05ce13df2
xds: implementation of SdsClient to be used by SDS based SslContextProviders (#6400) 2019-11-18 10:36:42 -08:00
Yongwoo Noh add020fd19 core: fix typo in javadoc (#6431) 2019-11-15 11:19:28 -08:00
Chengyuan Zhang a49bd6efaa
xds: do not globally cache results of reading bootstrap file (#6420)
Do not cache content read from bootstrap file. Each call of readBootstrap() should just trigger reading file explicitly.
2019-11-14 17:04:34 -08:00
Kun Zhang 89cd64328d
netty: provide an option to lower netty allocator chunk size from 16MB to 2MB (#6407)
This would reduce the amount of direct buffer allocations, especially with light traffic. This should mitigate internal issue b/143075435

The change is currently optional and is only effective if system property "io.grpc.netty.useCustomAllocator" is set to "true" ignoring the case.

Internal benchmark results (median of 5 runs) doesn't show any significant change:
```
                          Before (STDEV)           After (STDEV)
grpc-java-java-multi-qps-integrity_only
Actual QPS               717,848 (7,445)         715,061 (2,122) 
QPS per Client CPU        23,768   (799)          23,842   (295)

grpc-java-java-multi-throughput-integrity_only
Actual QPS                35,631   (204)          35,298    (25) 
QPS per Client CPU         3,362    (56)           3,316    (18)

grpc-java-java-single-latency-integrity_only
Median latency (us)          130  (1.82)             125  (5.36)

grpc-java-java-single-throughput-integrity_only
Actual QPS                    593 (5.14)             587  (3.76)
QPS per Client CPU            502 (4.51)             494  (6.92)

```
2019-11-14 15:50:11 -08:00
ZHANG Dapeng 194d1512c0
xds: refactor xds policy to use XdsClient
This is a refactor of the existing xds policy to use XdsClient. It does neither create a copy of EDS policy as in #6371 nor re-implement an EDS policy. This should be similar to the idea of https://github.com/grpc/grpc/pull/20368 in C-core. 

Here it refactors `XdsComms2` to an implementation of `XdsClient`, which can be drop-in replaced by `XdsClientImp` when it's available.
2019-11-14 15:10:44 -08:00
Ran b80a07a1ca
core: delay attaching cancellation listener to context on server-side. (#6333) 2019-11-14 14:29:34 -08:00
sanjaypujare 80c78ddede
xds: add inline bytes support to CertificationValidationContext we use in SdsTrustManagerFactory (#6429) 2019-11-14 10:51:42 -08:00
Eric Anderson 48929c4d50
Upgrade to protobuf lite 3.10
This finally brings lite into version number sync with full proto.

Well-known protos for javalite are now pre-generated.
2019-11-14 10:26:20 -08:00
Chengyuan Zhang b38134eebd
xds: add APIs for initiating LRS in XdsClient (#6419) 2019-11-13 16:05:36 -08:00
Nayana-ibm 198ca2904a Adding s390x suport ot grpc-java 2019-11-13 14:43:59 -08:00
ZHANG Dapeng ce2b0174b2
xds: ignore endpoints with health_status != HEALTHY or UNKNOWN
Let child balancer (currently is Round Robin) handle the address list with only healthy addresses for its locality. If no healthy address available, let the child balancer handleNameResolutionError.
2019-11-12 13:40:25 -08:00
Steve Rao 1118793bfb netty: improve code readability (#6375) 2019-11-12 08:48:58 -08:00
ZHANG Dapeng 6d3fb53128
xds: not use Immutable collections in method signature 2019-11-07 15:18:59 -08:00
ZHANG Dapeng b38d3ee571
all: remove unnecessary SuppressWarnings 2019-11-06 15:20:04 -08:00
Kun Zhang 7218bbadb3
Update README etc to reference 1.25.0 2019-11-06 13:47:08 -08:00
Chengyuan Zhang 794517a7c3
xds: modify XdsClient interface and define data to be used by gRPC client from xDS responses (#6390)
This change completes the definition of XdsClient interface and fill the content of data types passing from XdsClient to each resource watcher.
2019-11-05 23:59:04 -08:00
Steve Rao a408d086bd netty: unified log prompt (#6386) 2019-11-05 19:47:50 -08:00
Steve Rao 1adf403bb1 netty: remove redundant variable references 2019-11-05 17:48:51 -08:00
Carl Mastrangelo 40bcab5d12 core: use seconds in deadline exceeded string (#6341) 2019-11-05 13:59:20 -08:00
Elliotte Rusty Harold 1ac1dd04b9 Update readme to specify 1.24.1 (#6344) 2019-11-05 13:58:55 -08:00
Eric Anderson 28149944ad netty: Deflake WriteBufferingAndExceptionHandlerTest
It appears the problem is that server.close() was missing sync(), so the
event loop was still processing the closure when the next test started.

This change is more aggressive than it needs to be, but should make it
less bug-prone.

Fixes #5574
2019-11-04 17:52:57 -08:00
sanjaypujare 6d51163933
xds: use ReferenceCountingSslContextProviderMap in TlsContextManager for clients and servers (#6385) 2019-11-04 17:32:48 -08:00
Eric Anderson 4dba65bad4 api: Rename blockingExecutor to offloadExecutor
The API review for #6279 came up with a more meaningful name that
better explains the intent. A setter for the old name was left in
ManagedChannelBuilder to ease migration to the new name by current
users.
2019-11-04 13:16:08 -08:00