aboutsummaryrefslogtreecommitdiff
path: root/grpclb
AgeCommit message (Collapse)Author
2018-10-24grpclb: enter fallback when LB stream broken even before fallback timer ↵Kun Zhang
expires (#4990) (#4997) Previously the client waits ~10 seconds until the fallback timer has expired. While the timer is useful to address the long tail, it shouldn't delay using the fallback in case of obvious errors, like the channel failing to connect or an UNIMPLEMENTED response. This is a cherry-pick of b701e8920daaccf9e6eb2916d2ea94da8df74be5 from master.
2018-09-14all: use Java7 bracketsCarl Mastrangelo
2018-09-07grpclb: more useful debug logs. (#4831)Kun Zhang
The addresses from the string dump of the LoadBalanceResponse proto is in binary format and not human-readable. We will log the BackendAddressGroups when using a new list from the balancer. The original logging of LoadBalanceResponse is downgraded to FINER level.
2018-09-05all: prepend internal classes with Internal (#4826)zpencer
This is a safer way to hide the classes, because they will not appear in public targets for some build configurations.
2018-09-04all: move Channelz to io.grpc as InternalChannelz (#4797)zpencer
This is an API used to coordinate across packages and must live in `io.grpc`. Prepending `Internal` makes it easier to detect and hide this class from public visibility when using certain build tools. fixes #4796
2018-08-09grpclb: fix unused variable lintSpencer Fang
2018-08-02grpclb: Fix proto's java_package to match the proto and include versionEric Anderson
2018-07-24grpclb: remove unnecessary support for lb delegation Carl Mastrangelo
2018-07-12compiler,stub: update RpcMethod docs and usageCarl Mastrangelo
2018-07-10compiler, stub: Rename inputType and outputType in @RpcMethodjbingham-google
2018-07-09grpclb: Plumb attributes for OOB and backend channelsEric Anderson
These attributes can be used by ALTS-specific code to determine whether ALTS or TLS should be used.
2018-07-06compiler, stub: Add @RpcMethod annotationjbingham-google
This annotation will enable Java APT to generate code. Addresses part of #3173.
2018-06-22grpclb: sync LB proto with grpc-protoJuanli Shen
2018-06-12grpclb: sync with grpc-protoCarl Mastrangelo
2018-06-12grpclb: use exponential back-off for retries of balancer RPCs (#4525)Kun Zhang
2018-06-11all: add gradle format checkerZHANG Dapeng
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
2018-06-05stub: remove static Method descriptors and stabilize method accessorsCarl Mastrangelo
2018-05-21all: TimeProvider to use nanos rather than millisZHANG Dapeng
This is the same practice as #2833
2018-05-17protobuf,examples: move json encoding to examplesCarl Mastrangelo
2018-05-14core: partially stabilize Attributes API (#4458)zpencer
Deprecate static builder method, Keys.of(), add a notice of plans to remove keys(), emphasize that the name is only a debug label. The `@ExperimentalAPI` is left on the class because there are still issues around hashCode/equals.
2018-05-03 all: normalize copyright header Carl Mastrangelo
2018-04-30 grpclb: move load balancer proto to package-matching directoryCarl Mastrangelo
2018-03-28Fix compilation in Java 9Eric Anderson
2018-03-26build.gradle: bump protobuf plugin to 0.8.5 (#4101)zpencer
This update automatically adds generated sources and proto IDLs to the `idea` plugin.
2018-03-22 grpclb: Cache Subchannels for 10 seconds after it is removed from the ↵Kun Zhang
backendlist (#4238) This is to conform with the GRPCLB spec. The spec doesn't (yet) define the actual timeout. We choose 10 seconds here arbitrarily. It may be configurable in the future. This will fix internal bug b/74410243
2018-03-01 buildscripts,travis: fetch from mvn with retries (#4140)zpencer
A band aid for #3284, to make its symptoms less noticeable.
2018-02-08compiler: avoid invoking experimental method in generated codeEric Gribkoff
2018-02-07grpclb: enter fallback mode immediately when balancer and all backend… (#4007)Kun Zhang
grpclb: enter fallback mode immediately when balancer and all backend connections are lost Changed according to updated spec.
2018-01-25core: move Instrumented, LogId, WithLogId to io.grpc.internal as public (#3995)zpencer
2018-01-17bazel,grpclb: add a bazel build definitionShohei Kamimori
2018-01-11all: Prefer mock+delegatesTo() over Mockito.spy()Eric Anderson
Spies are really magical and easily produce unexpected results. Using them in tests can easily yield tests that don't do what you think they do. Delegation is much safer when possible. Delegation doesn't work when methods `return true`, final methods, and with restricted visibility, though. So CensusModulesTest and MaxConnectionIdleManagerTest are left as-is.
2017-12-19core/grpclb: resolve TXT records in DNS name resolver and include balancer ↵Carl Mastrangelo
addresses
2017-12-07cronet, grpc-lb, interop-testing: fix lints #3848zpencer
2017-12-04all: add Status messages to all statusesCarl Mastrangelo
2017-11-30core: move WithLog and LogId to io.grpc (#3813)zpencer
The channelz service must not live in io.grpc.internal, and channelz needs to be able to get the identifier of the entities it tracks. Since io.grpc can not refer to io.grpc.internal, the LogId must be moved out of internal.
2017-11-30all: update to proto 3.5.0Carl Mastrangelo
2017-11-29grpclb: switch to fallback mode if all connections are lost (#3744)Kun Zhang
Previously fallback mode can be entered only if the client has not received any server list and the fallback timeout has expired. Now the fallback timer is started when the stream to the balancer is broken AND there is no ready Subchannels. Fallback mode is activated when the timer expires. When a new server list is received from the balancer, either the fallback timer is cancelled, or fallback mode is exited. Also fixed a bug that the fallback timer should've been cancelled when GrpcState is shut down.
2017-11-01core: set sampled for local span per MethodDescriptor. (#3627)Kun Zhang
This moves away from the global String-based Span name registry which is not as flexible as we desire. Also renamed the option name to be more accurate. This is not API-breaking because the origianl addition to MethodDescriptor and code-gen didn't make it into the 1.7.0 release.
2017-10-31 compiler: remove references to static fieldsCarl Mastrangelo
2017-10-30compiler: add methods for accessing method descriptorsCarl Mastrangelo
* MethodDescriptor is lazy loaded, so protobuf loading only happens on demand. This also means tracing registration happens on demand. * The names of the getters all being with `method`. This makes it harder for autocomplete to pick them up. * A new field is used, which matches the getter name. Rather than make the new-getters reference the old-fields, make the old-fields reference the new getters. This makes removal of the old-fields a simple operation. * The getters may not be inlineable, but thats an easy fix if it ends up being a problem. Not worth premature optimization (but is worth future work). The expected timeline for this is adding this to the 1.8 cut, and deprecating the old-fields. They will be removed in 1.9.
2017-10-06core,grpclb: use denser atomics for censusCarl Mastrangelo
2017-10-06core: add first-class drop support in LoadBalancer.Kun Zhang
Resolves #3355 GrpclbLoadBalancer should use PickResult.withDrop() instead of PickResult.withError() when dropping RPCs.
2017-09-25core/compiler: register Span names for code-generated methods (take 2)Kun Zhang
This is a more favorable approach than #3467. Doing the registration in MethodDescriptor should allow us to deregister in case the generated stub and its MethodDescriptors are garbage-collected routinely, e.g., if they are loaded by a separate ClassLoader.
2017-09-19core: record individual messages with sizes to Census/tracing (#3461)Kun Zhang
Two methods, outboundMessageSent() and inboundMessageRead() are added to StreamTracer in order to associate individual messages with sizes. Both types of sizes are optional, as allowed by Census tracing. Both methods accept a sequence number as the type ID as required by Census. The original outboundMesage() and inboundMessage() are also replaced by overrides that take the sequence number, to better match the new methods. The deprecation of the old overrides are tracked by #3460
2017-09-12grpclb: fallback to backend addresses (#3439)Kun Zhang
The GRPCLB client will use the backend addresses from resolver if it has not received any server list from any balancer after a certain timeout (10s).
2017-09-11core, compiler, protobuf: introduce MethodDescriptor#setSchemaDescriptorLukasz Strzalkowski
2017-08-25all: update to proto 3.4.0Carl Mastrangelo
2017-08-25grpclb: remove expiration_interval. (#3398)Kun Zhang
2017-08-23compiler: Add option to disable version outputEric Anderson
If the option becomes popular, we can just remove the version.
2017-08-23grpclb: refactor main GRPCLB logic out of GrpclbLoadBalancer. (#3369)Kun Zhang
GrpclbLoadBalancer can work in non-GRPCLB (delegate) mode according to name resolution results. Previously the policy selection, delegation and GRPCLB logic are in the same file, which is not very readable. It will get worse as we going to implement policy fallback logic soon. This PR refactors the GRPCLB logic out, and makes GrpclbLoadBalancer focus on the policy selection and delegation logic.