Skip to content

Releases: twitter/finagle

Finagle 21.10.0

01 Nov 19:59
Compare
Choose a tag to compare

21.10.0

Breaking API Changes

  • finagle-core: c.t.f.loadbalancer.distributor.AddressedFactory has been removed. Use
    c.t.f.loadbalancer.EndpointFactory directly instead. 4043382a

  • finagle-core: Moved c.t.finagle.stats.LoadedStatsReceiver and c.t.finagle.stats.DefaultStatsReceiver
    from the finagle-core module to util-stats. 709c0c37

Finagle 21.9.0

01 Oct 20:46
Compare
Choose a tag to compare

21.9.0

Breaking API Changes

  • finagle-thrift: Removed c.t.finagle.thrift.ThriftClient#newMethodIface and
    ThriftClient#thriftService, use c.t.f.thrift.ThriftClient#methodPerEndpoint. fc21cccf

Bug Fixes

  • finagle-core/partitioning: Close balancers and their gauges when repartitioning.
    d0bd053d

Runtime Behavior Changes

  • finagle: Upgrade to Netty 4.1.67.Final and netty-tcnative 2.0.40.Final. c373fc08
  • finagle: Downgrade to Netty 4.1.66.Final cbfbef89
  • finagle: Bump version of Jackson to 2.11.4. 19750a80
  • finagle-core: OffloadFilter hands off work from Netty I/O thread to the offload CPU thread pool
    right after we enter the Finagle stack by default. Previously this could be enabled via a toggle.
    The com.twitter.finagle.OffloadEarly toggle has been removed. 2b5086fe

Finagle 21.8.0

14 Aug 17:57
Compare
Choose a tag to compare

New Features

  • finagle-mysql: introduce newRichClient(dest: String, label: String) method, which removes the
    need for extra boilerplate to convert the destination String to a c.t.finagle.Name when
    specifying both dest and label in String form. c211bfbe
  • finagle-http, finagle-thriftmux: introduce client.withSni() API. Use this api to specify an
    SNI hostname for TLS clients. a8ec457b

Runtime Behavior Changes

  • finagle: Update Caffeine cache library to version 2.9.1 d9e551a3

  • finagle: Update ScalaCheck to version 1.15.4 145ab4aa

  • finagle-core: change ServiceClosedException to extend FailureFlags and to be
    universally retryable e621e5ff

  • finagle-http: remove the com.twitter.finagle.http.UseH2,
    com.twitter.finagle.http.UseH2CClients2, com.twitter.finagle.http.UseH2CServers and
    com.twitter.finagle.http.UseHttp2MultiplexCodecClient toggles. The configuration for
    c.t.finagle.Http.client and c.t.finagle.Http.server now default to using the HTTP/2 based
    implementation. To disable this behavior, use c.t.finagle.Http.client.withNoHttp2 and
    c.t.finagle.Http.server.withNoHttp2 respectively.

    Alternatively, new GlobalFlag's have been introduced to modify the default behavior of clients
    and servers that have not been explicitly configured, where
    the com.twitter.finagle.http.defaultClientProtocol
    and com.twitter.finagle.http.defaultServerProtocol flags can be set to HTTP/1.1 to modify
    the default client or server configuration, respectively. PHAB_ID=D625880`

  • finagle-netty4: Finagle now reuses Netty "boss" (or parent) threads instead of creating a new
    thread per server. Netty parent threads are servicing the server acceptor, a relatively
    lightweight component that listens for new incoming connections before handing them out to the
    global worker pool. 5e9998fc

  • finagle-http2: introduce optional parameter NackRstFrameHandling to enable or disable NACK
    conversion to RST_STREAM frames. 728aed03

  • finagle-thrift, finagle-thriftmux: clients may start reporting (correctly) lower success rate.
    Previously server exceptions not declared in IDL were erroneously considered as successes.
    The fgix also improves failure detection and thus nodes previously considered as healthy
    by failure accrual policy may be considered as unhealthy. 3bba41c6

Bug Fixes

  • finagle-core: Add BackupRequestFilter to client registry when configured. 56092e96
  • finagle-thrift, finagle-thriftmux: clients now treat server exceptions
    not declared in IDL as failures, rather than successes,
    and do not skip the configured response classifier for failure accrual.
    3bba41c6

Finagle 21.6.0

22 Jun 20:15
Compare
Choose a tag to compare

New Features

  • finagle-core: Introduce Dtab.limited, which is a process-local Dtab that will
    NOT be remotely broadcast for any protocol, where Dtab.local will be
    broadcast for propagation on supported protocols. For path name resolution, the
    Dtab.local will take precedence over the Dtab.limited, if the same path is
    defined in both, and both take precedence over the Dtab.base. The existing
    Dtab.local request propagation behavior remains unchanged. 2e06c669
  • finagle-core: Add descriptions to RequestDraining, PrepFactory, PrepConn, and
    protoTracing modules in StackClient. Add descriptions to preparer and
    protoTracing modules in StackServer. 1ea1a3eb

Breaking API Changes

  • finagle-memcached: Ketama Partitioned Client has been removed and the Partition Aware
    Memcached Client has been made the default. As part of this change,
    com.twitter.finagle.memcached.UsePartitioningMemcachedClient toggle has been removed,
    and it no longer applies. 2628b84b

Runtime Behavior Changes

  • finagle-core: Broadcast context keys lookups are now case insensitive. This change is backwards
    compatible as the marshalled key id is unchanged. Although enabled by default, this change will
    be temporarily sitting behind a toggle, com.twitter.finagle.context.MarshalledContextLookupId
    that can be used to turn off this change. 69c29093

Deprecations

  • finagle-core: The ServerBuilder pattern has been deprecated. Use the stack server pattern
    instead. 386171ad

Finagle 21.5.0

29 May 01:47
Compare
Choose a tag to compare

New Features

  • finagle-http2: Added c.t.f.http2.param.EnforceMaxConcurrentStreams which allows users to
    configure http2 clients to buffer streams once a connection has hit the max concurrent stream
    limit rather than rejecting them. A buffered_streams gauge has been added to track the
    current number of buffered streams. c6d5f520
  • finagle-mux: Added support for TLS snooping to the mux protocol. This allows a thriftmux
    server to start a connection as TLS or follow the existing upgrade pathway at the leisure of
    the client. This also allows the server to support opportunistic TLS and still downgrade to
    vanilla thrift. 60705fd2
  • finagle-netty4: Added a new counter to keep track of the number of TLS connections that were
    started via snooping. 5569615e
  • finagle-thrift: Thrift(Mux) clients and servers now fill in a c.t.f.Thrift.param.ServiceClass
    stack param with the runtime class corresponding to a IDL-generated service stub.
    04a2de2c

Breaking API Changes

  • finagle-core: c.t.f.param.Logger has been removed. Use external configuration supported by
    your logging backend to alter settings of com.twitter.finagle logger. 99982cda

Runtime Behavior Changes

  • finagle-http: Make handling of invalid URI consistent across client implementations. There are
    behavioral inconsistencies amongst the current HTTP client implementations:

    Our HTTP/1.x clients allow for submitting requests that contain non-ASCII characters and
    invalid character encoded sequences, while our HTTP/2 clients will either mangle
    the URI and strip out non-ASCII characters within the Netty pipeline or result in an
    UnknownChannelException when attempting to parse invalid character encoded sequences.
    With this change, we now consistently propagate an InvalidUriException result, which
    is marked as NonRetryable for all HTTP client implementations. All HTTP server implementations
    maintain behavior of returning a 400 Bad Request response status, but now also correctly
    handle invalid character encoded sequences. fa58caab

Bug Fixes

  • finagle-core: Failed writes on Linux due to a remote peer disconnecting should now
    be properly seen as a c.t.f.ChannelClosedException instead of a
    c.t.f.UnknownChannelException. 6214e6ac
  • finagle-http2: The streams gauge is now correctly added for http2 connections over TLS.
    c6d5f520
  • finagle-core: c.t.f.n.NameTreeFactory will now discard empty elements in
    c.t.f.NameTree.Unions with zero weight. cf73946d
  • finagle-http: All HTTP server implementations consistently return a 400 Bad Request
    response status when encountering a URI with invalid character encoded sequences.
    fa58caab

Finagle 21.4.0

28 Apr 18:01
Compare
Choose a tag to compare

New Features

  • finagle-core: Introduce a new ResponseClassifier ('IgnoreIRTEs') that treats
    com.twitter.finagle.IndividualRequestTimeoutExceptions as ResponseClass.Ignored.
    This response classifier is useful when a client has set a super low RequestTimeout and
    receiving a response is seen as 'best-effort'. e897bd67
  • finagle-mysql: Introduce support of opportunistic TLS to allow mysql clients
    with enabled TLS to speak over encrypted connections with MySQL servers where
    TLS is on, and fallback to plaintext connections if TLS is switched off on
    the server side. e02495aa

Runtime Behavior Changes

  • finagle-core: The "failures" counter is changed to be created eagerly, when no failure
    happens, the counter value is 0. d81a57c6

Finagle 21.3.0

30 Mar 17:23
Compare
Choose a tag to compare

New Features

  • finagle-core: Added value ForceWithDtab to flag
    -com.twitter.finagle.loadbalancer.exp.apertureEagerConnections that forces the
    aperture load balancer to eagerly connect, even in staging environments where
    Dtab locals are set. 9dab522d
  • finagle-core: Introduce a new Backoff to create backoffs based on varies strategies, where
    backoffs are calculated on the fly, instead of being created once and memoized in a Stream.
    Also introduced Backoff.fromStream(Stream) and Backoff.toStream to help with migration to
    the new API. 91d24c33
  • finagle-netty4: Upgrade to Netty 4.1.59.Final and TcNative 2.0.35.Final. ee6ced91
  • finagle-http: Integrate Kerberos authentication filter to finagle http client and server.
    e3bfa0c3 eefc21c8
  • finagle-core: Provided c.t.f.ssl.TrustCredentials.X509Certificates to enable directly
    passing X509Certificate instead of passing a File. 61c2a596

Breaking API Changes

  • finagle: Builds are now only supported for Scala 2.12+ 8a48eab7
  • finagle-core: Changed flag -com.twitter.finagle.loadbalancer.exp.apertureEagerConnections"
    from having Boolean values true or false to EagerConnectionsType` values Enable,
    Disable, and ForceWithDtab. 9dab522d
  • finagle-mysql: The constructor of c.t.f.mysql.transport.MysqlBufReader now takes an underlying
    c.t.io.ByteReader. Prior uses of the constructor, which took a c.t.io.Buf, should migrate to
    using c.t.f.mysql.transport.MysqlBufReader.apply instead. ad73f92d
  • finagle-base-http: Kerberos jaas config KerberosConfiguration is replaced with ServerKerberosConfiguration
    and ClientKerberosConfiguration concrete classes.

Runtime Behavior Changes

  • finagle: Revert to scala version 2.12.12 due to scoverage/sbt-scoverage#319
    c2db97c2
  • finagle: Bump scala version to 2.12.13 b8e4e0ac
  • finagle-core: Move helper tracing methods like traceLocal in Trace into the Tracing class. This
    allows cheaper use of these APIs by first capturing a Trace via Trace#apply, avoiding the extra lookups
    that will add overhead on the request path. ec0097cd.
  • finagle-core: c.t.finagle.InetResolver, c.t.finagle.builder.ClientBuilder,
    c.t.finagle.liveness.FailureAccrualFactory, c.t.finagle.liveness.FailureAccrualPolicy,
    c.t.finagle.param.ClientParams, c.t.finagle.param.SessionQualificationParams,
    c.t.finagle.service.FailFastFactory, c.t.finagle.service.RequeueFilter,
    c.t.finagle.service.Retries, c.t.finagle.service.RetryFilter, and
    c.t.finagle.service.RetryPolicy will accept the new c.t.finagle.service.Backoff to create
    backoffs. Services can convert a Stream to/from a Backoff with Backoff.fromStream(Stream)
    and Backoff.toStream. 91d24c33
  • finagle-core: remove the com.twitter.finagle.loadbalancer.apertureEagerConnections Toggle and
    change the default behavior to enable eager connections for c.t.f.loadbalancer.ApertureLeastLoaded
    and c.t.f.loadbalancer.AperturePeakEwma load balancers. The state of the
    com.twitter.finagle.loadbalancer.apertureEagerConnections GlobalFlag now also defaults to enable
    this feature (Enable. You can disable this feature for all clients via setting the
    com.twitter.finagle.loadbalancer.apertureEagerConnections GlobalFlag to Disable for your process.
    (i.e. -com.twitter.finagle.loadbalancer.apertureEagerConnections=Disable).
    ef8d536e

Deprecations

  • finagle-core: Backoff.fromJava is marked as deprecated, since the new Backoff is java-friendly.
    For services using Stream.iterator on the old Backoff, please use the new API
    Backoff.toJavaIterator to acquire a java-friendly iterator. 91d24c33

Finagle 21.2.0

11 Feb 01:23
Compare
Choose a tag to compare

New Features

  • finagle-zipkin-core: Record zipkin.sampling_rate annotation to track sampling
    rate at trace roots. 2269eb6b

  • finagle-core: Added variant of c.t.f.Address.ServiceFactory.apply that does not require
    specifying c.t.f.Addr.Metadata and defaults to c.t.f.Addr.Metadata.empty. 11971f0f

  • finagle-core: Added variant of c.t.f.Name.bound which takes a c.t.f.Service as a parameter.
    Tying a Name directly to a Service can be extremely useful for testing the functionality
    of a Finagle client. 1422ffd5

  • finagle-mux: Added variant of c.t.f.mux.Request.apply and c.t.f.mux.Requests.make which takes
    only the body of the Request (in the form of c.t.io.Buf) as a parameter. This is useful for
    when the path value of a Request is not used by the server (e.g. testing). 3ca46304

Runtime Behavior Changes

  • finagle-memcached: The log level of messages pertaining to whether a Memcached client is using the
    older non-partitioned or the newer partitioned version has been lowered. These messages are no
    longer written at an 'info' level. 4bce560a

Finagle 21.1.0

19 Jan 20:03
Compare
Choose a tag to compare

New Features

Bug Fixes

  • finagle-core: Fix wraparound bug in Ring.weight, as reported by @nvartolomei c4dc4fdc
  • finagle-mysql: Update the UTF8 character set to cover those added in MySQL 8.
    25e581bb
  • finagle-thriftmux: Fixed a bug where connections were not established eagerly in ThriftMux
    MethodBuilder even when eager connections was enabled. ec67d48a

Runtime Behavior Changes

  • finagle-mysql: Don't use the full query when adding tracing annotations. b215d255

Finagle 20.12.0

11 Dec 17:34
Compare
Choose a tag to compare

New Features

  • finagle-core: Add a new stat (histogram) that reports how long a task has been sitting in the
    offload queue. This instrumentation is sampled at the given interval (100ms by default) that
    can be overridden with a global flag com.twitter.finagle.offload.statsSampleInterval.
    a7ebf2e1
  • finagle-core: Add a new experimental flag com.twitter.finagle.offload.queueSize that allows to
    put bounds on the offload queue. Any excess work that can't be offloaded due to a queue overflow
    is run on IO (Netty) thread instead. Put this way, this flag enables the simplest form of
    backpressure on the link between Netty and OffloadFilter. af228ca6
  • finagle-netty4: Add ExternalClientEngineFactory to the open source version of Finagle. This
    SslClientEngineFactory acts as a better example of how to build custom client and server engine
    factories in order to reuse SSL contexts for performance concerns. 931785d9
  • finagle-core: Provide com.twitter.finagle.naming.DisplayBoundName for configuring how to
    display the bound Name for a given client in metrics metadata. 67be8e1e
  • finagle-core: Provide ClientParamsInjector, a class that will be service-loaded at run-time
    by Finagle clients, and will allow generic configuration of all sets of parameters.
    b7bb5afc

Breaking API Changes

  • finagle-core: Move DarkTrafficFilter and AbstractDarkTrafficFilter from the experimental
    finagle-exp to supported finagle-core. The package containing these classes changed from
    c.t.finagle.exp to c.t.finagle.filter. 0ecaa5e7
  • finagle-core, finagle-thrift: Move ForwardingWarmUpFilter and ThriftForwardingWarmUpFilter
    from the experimental finagle-exp to supported finagle-core, and finagle-thrift, respectively.
    The package containing ForwardingWarmUpFilter changed from c.t.finagle.exp to
    c.t.finagle.filter, and the package containing ThriftForwardingWarmUpFilter changed from
    c.t.finagle.exp to c.t.finagle.thrift.filter. e725bc86
  • finagle-core: FailureAccrualFactory.isSuccess has been replaced with the method
    def classify(ReqRep): ResponseClass to allow expressing that a failure should be ignored.
    d586bd24

Runtime Behavior Changes

  • finagle-core: Use Scala default implementation to calculate Hashcode and equals method for
    ServiceFactoryProxy. c473b395
  • finagle: Update build.sbt to get aarch64 binaries and try the fast path acquire up to 5 times
    before failing over to the AbstractQueuedSynchronizer slow path in NonReentrantReadWriteLock
    for Arm64. d45dfb02

Bug Fixes

  • finagle-core: Users should no longer see the problematic
    java.lang.UnsupportedOperationException: tail of empty stream when a c.t.f.s.RetryPolicy
    is converted to a String for showing. e7ec247d