A fault tolerant, protocol-agnostic RPC system

Overview


Finagle

Build Status Codecov Project status Gitter Maven Central

Status

This project is used in production at Twitter (and many other organizations), and is being actively developed and maintained.

Releases

Releases are done on an approximately monthly schedule. While semver is not followed, the changelogs are detailed and include sections on public API breaks and changes in runtime behavior.

Getting involved

Finagle is an extensible RPC system for the JVM, used to construct high-concurrency servers. Finagle implements uniform client and server APIs for several protocols, and is designed for high performance and concurrency. Most of Finagle’s code is protocol agnostic, simplifying the implementation of new protocols.

For extensive documentation, please see the user guide and API documentation websites. Documentation improvements are always welcome, so please send patches our way.

Adopters

The following are a few of the companies that are using Finagle:

For a more complete list, please see our adopter page. If your organization is using Finagle, consider adding a link there and sending us a pull request!

Contributing

We feel that a welcoming community is important and we ask that you follow Twitter's Open Source Code of Conduct in all interactions with the community.

The release branch of this repository contains the latest stable release of Finagle, and weekly snapshots are published to the develop branch. In general pull requests should be submitted against develop. See CONTRIBUTING.md for more details about how to contribute.

License

Copyright 2010 Twitter, Inc.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0

Comments
  • finagle-*: scala 2.11 compatibility

    finagle-*: scala 2.11 compatibility

    It looks like several people are interested in converting finagle over to scalatest. Since finagle has many small projects, and @p-antoine has already done the biggest chunk, finagle-core, I'm optimistic that we can be done with this quickly.

    coordination

    Here are the finagle-benchmark :heavy_check_mark: finagle-commons-stats :heavy_check_mark: finagle-core :heavy_check_mark: finagle-example :heavy_check_mark: finagle-exception :heavy_check_mark: finagle-exp :heavy_check_mark: finagle-http :heavy_check_mark: @adamdecaf finagle-kestrel :o: @chester89 finagle-mdns :heavy_check_mark: finagle-memcached :heavy_check_mark: @rlazoti finagle-mux :heavy_check_mark: finagle-mysql :heavy_check_mark: finagle-native :heavy_check_mark: @adamdecaf finagle-ostrich4 :heavy_check_mark: finagle-protobuf :heavy_check_mark: finagle-redis :o: @penland365 finagle-serversets :heavy_check_mark: finagle-spdy :heavy_check_mark: finagle-stats :heavy_check_mark: finagle-stream :o: @bajohns finagle-stress :heavy_check_mark: finagle-swift :heavy_check_mark: finagle-test :heavy_check_mark: finagle-testers :heavy_check_mark: finagle-thrift :o: @bajohns finagle-thriftmux :heavy_check_mark: finagle-validate :heavy_check_mark: finagle-zipkin :heavy_check_mark:

    If we could coordinate our efforts, that would be super awesome.

    @penland365 has already staked a claim to finagle-redis. If there's a project that you want to work on, please post on this thread!

    If someone is working on something you want to help with, please get in contact with them, make sure they're OK with you helping out, and then get in contact with us.

    tips

    1. Follow the CONTRIBUTING guidelines.
    2. Make sure your test works with JUnit (see other scalatest tests to see how to go about doing it).
    3. Test with 2.9.2, 2.10.x, and 2.11.x. They need to all work for your submission to be accepted.
    4. Make sure your scalatest versions are lined up properly. It seems like scalatest has stopped making new versions for 2.9.2, and the earliest scalatest_2.11 is after that cutoff, so there will have to be two scalatests.
    5. Remove the specs dependency from your project to be 100% sure that you're no longer depending on it.
    6. Don't touch the maven or pants files, we'll do it on our end.
    7. Please rename scalatest-ified classes and file names from XSpec to XTest
    8. For mocking, please use org.scalatest.mock.MockitoSugar.
    9. If you have a question about something, look around the rest of the repo to see how it's done. If you still have questions, reach out on this thread.
    opened by mosesn 101
  • Build for 2.13.0

    Build for 2.13.0

    Scala 2.13.0 was released, so it would be great to have finagle build for it.

    If it's marked with an asterisk, it doesn't have any dependencies and will be easy to target next. If you want to discover what the dependencies of a given project are, take a peek inside of the build.sbt file.

    If you start working on one of these subprojects, please add a comment on this thread and I'll add your name next to it so people know not to duplicate your work.

    • [x] finagle-base-http* (@martijnhoekstra)
    • [x] finagle-benchmark-thrift* (@joroKr21)
    • [x] finagle-benchmark(@martijnhoekstra)
    • [x] finagle-core (@martijnhoekstra)
    • [x] finagle-exception (@DieBauer)
    • [x] finagle-exp (@DieBauer)
    • [x] finagle-grpc-context* (@martijnhoekstra)
    • [x] finagle-http (@martijnhoekstra, @spockz)
    • [x] finagle-http2 (@martijnhoekstra, @spockz)
    • [x] finagle-init (@martijnhoekstra)
    • [x] finagle-integration (@felixbr)
    • [x] finagle-memcached(@martijnhoekstra)
    • [x] finagle-mux* (@martijnhoekstra)
    • [x] finagle-mysql (@martijnhoekstra)
    • [x] finagle-netty4 (@martijnhoekstra)
    • [x] finagle-netty4-http (@martijnhoekstra, @spockz)
    • [x] finagle-opencensus-tracing(@hderms)
    • [x] finagle-partitioning (@martijnhoekstra)
    • [x] finagle-redis (@martijnhoekstra)
    • [x] finagle-serversets* (@joroKr21)
    • [x] finagle-stats (@hderms)
    • [x] finagle-stats-core (@hderms)
    • [x] finagle-thrift (@martijnhoekstra)
    • [x] finagle-thriftmux (@martijnhoekstra)
    • [x] finagle-toggle (@martijnhoekstra)
    • [x] finagle-tunable (@martijnhoekstra)
    • [x] finagle-zipkin-core (@DieBauer)
    • [x] finagle-zipkin-scribe (@DieBauer)
    help wanted 
    opened by rnd4222 54
  • finagle-http: Remove body (and Content-Length) from 1xx, 204 and 304 responses

    finagle-http: Remove body (and Content-Length) from 1xx, 204 and 304 responses

    Problem

    ~~We currently have two problems. Firstly, as described in RFC2616 and RFC7231, 204 and 304 responses must not contain a message-body. This requirement was not enforced in finagle, i.e., a message-body can be added. Moreover, a Content-Length header field can be added to these responses, which is not allowed as mentioned in RFC7230#section-3.3.2.~~

    We currently have two problems. Firstly, as described in RFC2616 and
    RFC7230, 1xx, 204 and 304 responses must not contain a message-body. This
    requirement was not enforced in finagle, i.e., a message-body can be
    added. Moreover, a Content-Length header field can be added to 1xx and
    204 responses, which is not allowed as mentioned in RFC7230#section-3.3.2.
    

    Solution

    ~~First of all, we have to clear a message-body, which we call content in finagle, if the response status code is either 204 or 304 to satisfy RFC7231. Secondly, we need to make sure not to add a Content-Length header field in a 204 response to follow RFC7230#section-3.3.2. With regard to a 304 response, a server may send a Content-Length header as mentioned in the same section. Thus it'd be better for us to allow users to set the field with a value of 0 if they like. Most importantly, we make sure that these things are achieved and the new system is bugwards-compatible by provding a new filter.~~

    Firstly, we have to clear a message-body, which we call content in finagle,
    if the response status code is either 1xx, 204 or 304 to satisfy RFC7230.
    Then, we need to remove a Content-Length header field in 1xx and 204 responses
    to follow RFC7230#section-3.3.2. With regard to a 304 response, we don't
    intentionally remove it even though a Content-Length header field is set.
    

    Result

    We follow the specification of RFC with regard to a message-header and message-body except that we have not added some header fields required in a response with status code 304 to satisfy RFC7232#section-4.1; Any of the following header fields must be generated: Cache-Control, Content-Location, Date, ETag, Expires, and Vary. ~~As we achieve this by creating a new filter and set it to Http.scala, users who are not willing to make use of the functionality can easily disable it by removing the filter.~~

    Ship It In Progress 
    opened by monkey-mas 35
  • base-http: -> 2.13

    base-http: -> 2.13

    Problem

    no 2.13 cross build

    Solution

    ~* HeaderMap: The big one. Rework into a trie as not to depend on HashTable's implementation.~

    • Other maps: split into 2.12- and 2.13+ versions
    • build: enable 2.13

    Result

    ~Performance changes in 2.12 vs baseline are a mixed bag. ~

    ~* Create: 2.5 times as fast~ ~* Create and add a single element: 1.3 times as fast~ ~* Create and add 24 life-like headers: 34% slower~ ~* Get one out of 20 random headers: 30% slower~ ~* Get one out of 24 life-like headers: 2.98 times as slow (!!)~ ~* Foreach: 2.5 times as fast~ ~* Iterating keys and values separtely is slow. There is likely still a lot to get there.~

    In Progress 
    opened by martijnhoekstra 33
  • Publish finagle to maven central

    Publish finagle to maven central

    To ease consumption and help with adoption, finagle should be published to Maven Central.

    https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

    opened by caniszczyk 33
  • Finagle client doesn't deal well with servers that

    Finagle client doesn't deal well with servers that "Connection: close"

    It appears that when using a ClientBuilder to access a service that closes connections after requests, Finagle emits ChannelClosedExceptions:

    com.twitter.finagle.ChannelClosedException: ChannelException at remote address: localhost/127.0.0.1:8083
        at com.twitter.finagle.NoStacktrace(Unknown Source)
    

    The gist at https://gist.github.com/robstar-nest/5624388 emits "." for successful requests and "E" for requests that errored out. When run normally (e.g. sbt run) it prints 5000 dots and is happy. When told to close connections (e.g. sbt "run --close") it emits a significant number of "E"s. (note that the quotes are important in geting the program to see that "--close")

    I ran this (and saw the described errors) on:

    • Linux ubuntu 2.6.32 / Java HotSpot(TM) Server VM, Java 1.6.0_31
    • MacOS X 10.8 / Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_17

    Suggestions? Work-arounds? Is this a Finagle bug?

    opened by robstar-nest 32
  • Support unsigned integer

    Support unsigned integer

    Problem

    finagle-mysql does not support unsigned integers. If an integer field is with unsigned attribute, it has larger maximum limit (4294967295) than signed integer. Since there is no support for unsigned integer in Java, if the value is higher than Integer.MAX_VALUE (2147483647), it is interpreted as IntValue(-1)

    Solution

    In order to understand the field is unsigned or not, I added bit masks for type attributes and a function to Field class. Bit masks for attributes are listed in the source code of mysql (https://github.com/mysql/mysql-server/blob/5.7/include/mysql_com.h). During field decoding, if the field is unsigned, I created a LongValue and used readUnsignedIntLE function from MysqlBufReader.

    Additionally, added an integration test case into com.twitter.finagle.mysql.integration.TypeTest.NumericTypeTest. Added unsigned int field, inserted an integer value higher than Integer.MAX_VALUE, and expected to be parsed as LongValue.

    Merged Internally 
    opened by mehmetgunturkun 30
  • Finagle streaming client not closing sockets

    Finagle streaming client not closing sockets

    The finagle client does not seem to close connections that are closed by the other side when streaming is enabled. If you run the application from the repository linked to below, you should notice the open number of sockets in the CLOSE_WAIT status held by the process to increase rapidly (Tomcat is configured to close connections after 5 seconds). This ultimately caused our application to hit its open file limit. When setting the max connection size of the connection pool to 1, finagle keeps using the same connection while timing out with each request that it makes.

    When streaming is disabled none of the issues occur.

    https://github.com/mritman/finagle-not-closing-sockets

    opened by mritman 28
  • finagle-core: Set finite SSL handshake timeout. Fixes #345

    finagle-core: Set finite SSL handshake timeout. Fixes #345

    Problem

    Netty3Transporter does not set explicit handshake timeout on SslHandler.

    If a channel configured this way establishes TCP connection with a remote that does not respond to a handshake, the channel would get stuck in "connecting" state indefinitely.

    Solution

    Add Transporter.SSLHandshakeTimeout stack param. Set its value to 10 seconds by default. Use this param to configure SslHandler.

    Result

    Connections do not get stuck in SSL handshake. Fixes #345

    opened by sirmax 28
  • Extract transport agnostic zipkin code into finagle-zipkin-core

    Extract transport agnostic zipkin code into finagle-zipkin-core

    Problem

    Address issue https://github.com/twitter/finagle/issues/465 (Add http and kafka transports to zipkin-tracer). Zipkin can receive traces via Kafka, HTTP and Scribe. Some Finagle users (including Quizup) already using Kafka are reluctant to introduce Scribe into their stack as it is no longer maintained. So the purpose of this PR is to support Kafka as a transport for Zipkin traces, as well as structuring the code such that it allows other transports to be added (like HTTP).

    Solution

    Extract most of finagle-zipkin into finagle-zipkin-core, leaving finagle-zipkin with only scribe specific stuff (with no api breaking changes to finagle-zipkin of course). ~~Then implement finagle-zipkin-kafka, which depends on finagle-zipkin-core~~. Kafka transport will be introduced in a separate PR.

    This structure was initially suggested by @kevinoliver in https://github.com/twitter/finagle/issues/465#issuecomment-183012155.

    Todo

    • [x] Extract common code into finagle-zipkin-core (largest part)
    • [ ] ~~Implement finagle-zipkin-kafka (in progress)~~ (separate PR)
    • [x] Clean up Pants and SBT dependencies

    Questions

    @mosesn can you check this out and provide some feedback? @adriancole is this in line with what you had envisioned?

    Ship It Merged Internally 
    opened by sveinnfannar 27
  • finagle-base-http: add MapBackedHeaderMap

    finagle-base-http: add MapBackedHeaderMap

    Problem

    The default headermap implementation is not future-proof, and relies on HashMap internals that will change in scala 2.13

    Solution

    Provide an alternative headermap implemtation that is backed by Map, an interface that will work across versions.

    Result

    The option to use a 2.13-proof headermap.

    Ship It 
    opened by martijnhoekstra 25
  • Finagle `22.7.0` uses vulnerable `jackson-databind` dependency: `2.13.3`

    Finagle `22.7.0` uses vulnerable `jackson-databind` dependency: `2.13.3`

    Describe the bug Finagle 22.7.0 uses vulnerable jackson-databind dependency: 2.13.3 ref:

    • https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.13.3
    • https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-42004
    • https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-42003

    To Reproduce NA

    Expected behavior NA

    Screenshots NA

    Environment NA

    Additional context NA

    opened by the-lazy-val 0
  • Custom Monitor not picked up for the ChannelStatsHandler

    Custom Monitor not picked up for the ChannelStatsHandler

    I try to get my monitor handle exceptions thrown in the netty pipeline. (Client.withMonitor, or Monitor.using(monitor, service(request))), the check Monitor.isActive is always false in that Thread, which means that the full stacktrace is logged.

    To Reproduce Steps to reproduce the behavior:

    Create a client with tls hostname verification with a custom Monitor, and have a server with a TLS certificate that does not contain that hostname.

    val s = Http.Client.withTls("google.com").withMonitor(myMonitor).newService("localhost:1234")
    s(Request())
    

    This logs many stacktraces like this, even though my Monitor should kick in and 'eat' the throwable and log something different.

    2022-10-26 16:06:04.248  WARN 33917 --- [agle/netty4-2-2] c.t.f.n.channel.ChannelStatsHandler$     : ChannelStatsHandler caught an exception
    io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN
    	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:480) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23) ~[finagle-core_2.13-22.7.0.jar:22.7.0]
    	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
    Caused by: javax.net.ssl.SSLHandshakeException: error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.shutdownWithError(ReferenceCountedOpenSslEngine.java:1086) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.sslReadErrorResult(ReferenceCountedOpenSslEngine.java:1377) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1317) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1404) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1447) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler$SslEngineType$1.unwrap(SslHandler.java:222) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1343) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1236) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	... 20 common frames omitted
    2022-10-26 16:06:04.251  WARN 33917 --- [agle/netty4-2-2] com.twitter.finagle                      : Unhandled exception in connection with /192.168.2.148:61072, shutting down connection
    io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN
    	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:480) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23) ~[finagle-core_2.13-22.7.0.jar:22.7.0]
    	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
    Caused by: javax.net.ssl.SSLHandshakeException: error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.shutdownWithError(ReferenceCountedOpenSslEngine.java:1086) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.sslReadErrorResult(ReferenceCountedOpenSslEngine.java:1377) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1317) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1404) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1447) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler$SslEngineType$1.unwrap(SslHandler.java:222) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1343) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1236) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	... 20 common frames omitted
    2022-10-26 16:06:04.251  WARN 33917 --- [agle/netty4-2-1] c.t.f.n.channel.ChannelStatsHandler$     : ChannelStatsHandler caught an exception
    io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: No subject alternative DNS name matching google.com found.
    	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:480) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) ~[netty-transport-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23) ~[finagle-core_2.13-22.7.0.jar:22.7.0]
    	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.78.Final.jar:4.1.78.Final]
    	at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
    Caused by: javax.net.ssl.SSLHandshakeException: No subject alternative DNS name matching google.com found.
    	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131) ~[na:na]
    	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:353) ~[na:na]
    	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:296) ~[na:na]
    	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:291) ~[na:na]
    	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:654) ~[na:na]
    	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:473) ~[na:na]
    	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:369) ~[na:na]
    	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392) ~[na:na]
    	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443) ~[na:na]
    	at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1074) ~[na:na]
    	at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1061) ~[na:na]
    	at java.base/java.security.AccessController.doPrivileged(Native Method) ~[na:na]
    	at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:1008) ~[na:na]
    	at io.netty.handler.ssl.SslHandler.runDelegatedTasks(SslHandler.java:1549) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1395) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1236) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285) ~[netty-handler-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449) ~[netty-codec-4.1.78.Final.jar:4.1.78.Final]
    	... 20 common frames omitted
    Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching google.com found.
    	at java.base/sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:212) ~[na:na]
    	at java.base/sun.security.util.HostnameChecker.match(HostnameChecker.java:103) ~[na:na]
    	at java.base/sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:455) ~[na:na]
    	at java.base/sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:415) ~[na:na]
    	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:283) ~[na:na]
    	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:141) ~[na:na]
    	at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:632) ~[na:na]
    	... 34 common frames omitted
    

    Expected behavior My monitor is picked up, and active.

    opened by DieBauer 1
  • finagle-core: Use configured deadline params

    finagle-core: Use configured deadline params

    Problem

    We can set the TimeoutFilter.PropagateDeadlines and TimeoutFilter.PreferDeadlineOverTimeout to configure behavior on the Client. When the MethodBuilder interface is used, the perRequestModule does only look at the Default values of these configurations, preventing custom configuration.

    Solution

    Pass the TimeoutFilter.PropagateDeadlines and TimeoutFilter.PreferDeadlineOverTimeout as Params to the perRequestModule to instantiate the TimeoutFilter with correct configuration.

    Result

    The MethodBuilder will pick up configured TimeoutFilter.PropagateDeadlines and TimeoutFilter.PreferDeadlineOverTimeout parameters.

    Signed-off-by: Jens Kat [email protected]

    opened by DieBauer 0
  • DeadlineFilter takes `rejectWithdrawal` regardless of passed Deadline

    DeadlineFilter takes `rejectWithdrawal` regardless of passed Deadline

    Describe the bug The DeadlineFilter will always take a rejectWithdrawal (default 5000) amount of tokens, while only restoring serviceDeposit (default 1000 tokens), in case rejection is not required.

    Expected behavior Tokens get only withdrawn when the deadline is truly passed, as it was before the Traceability PR.

    Additional context https://github.com/twitter/finagle/blob/develop/finagle-core/src/main/scala/com/twitter/finagle/service/DeadlineFilter.scala#L283

    opened by DieBauer 1
  • Growth of the number of prepared statements on server

    Growth of the number of prepared statements on server

    Hey folks!

    I don't know why but we noticed that PrepareCache in finagle-mysql does not send enough CloseRequests to match PrepareRequests when the cache's capacity gets reached. That leads to a growing number of prepared statements on server. We noticed that it lags behind at around 2-4 rps and this is the exact growth rate we see on the server.

    However we see that only in production and I can't reproduce that locally.

    Any ideas on why this could it happen?

    Don't pay attention to the spikes, it's application restart image

    Environment MySQL 8.0 Fiangle 21.8.0

    opened by notxcain 0
  • Scala 3 support

    Scala 3 support

    Is your feature request related to a problem? Please describe.

    I'm not really a Finagle user but maintain jackson-module-scala. Finagle does not yet support Scala 3 but many of its dependencies do. I'm just opening this issue for discussion purposes.

    A few twitter util jars are not supported - see https://github.com/twitter/util/issues/274#issuecomment-1148594402

    For Scala 3, this class will need to change to use jackson-module-scala ClassTagExtensions instead of ScalaObjectMapper.

    https://github.com/twitter/finagle/blob/develop/finagle-mysql/src/main/scala/com/twitter/finagle/mysql/Value.scala

    In theory, you could keep using ScalaObjectMapper for Scala 2 builds. This class is deprecated but there are no plans to remove it from jackson-module-scala 2.x (but it will probably not be part of jackson-module-scala 3.x - the v3.x release is not yet planned and is not worth worrying about yet).

    Describe the solution you'd like

    Generally, it would be nice to get everyone onto Scala 3.

    opened by pjfanning 3
Releases(finagle-22.12.0)
  • finagle-22.12.0(Dec 26, 2022)

    22.12.0

    New Features

    • finagle-core: Enable tracing for individual fanout requests via the FanoutTracer. 8b92a584
    • finagle-core: Added helpers for local and peer ServiceIdentity to SslSessionInfo. b9f0f177
    • finagle-core: Expose StackClient.DefaultInjectors. 15c25153
    • finagle-http: RequestBuilder's c.t.f.http.FileElement now has isText (default: false) attribute. When set to true, no Content-Transfer-Encoding header is populated on the request. dcfb5923
    • finagle-http: When Finagle Http servers are secured with S2S, write c.t.finagle.SslSessionInfo#peerIdentity as remote user in access log. b903165a

    Runtime Behavior Changes

    • util: Bump version of Jackson to 2.14.1. cd3a239f
    • finagle-http: Remove DeadlineFilter from Server stack. 8f96a534
    • finagle-core: Ensure BackupRequestFilter respects maxExtraLoad. For low QPS finagle clients this may mean fewer backup requests, so such clients can increase their maxExtraLoad setting if they actually want higher backup request rates. c0876691
    • finagle-serversets: Remove Endpoints with a weight of -1.0 from resolved zookeeper serversets Negative weights aren't normally valid so we use "-1.0" as a specific signal to not include the node in the resolved serverset returned to the client. This is useful for various types of testing. 3bc1f6ea

    Breaking API Changes

    • finagle-core: DeadlineFilter.module has been replaced with DeadlineFilter.clientModule and DeadlineFilter.serverModule. PHAB_ID=D943426
    • finagle-http: c.t.f.Http.Http2 and c.t.f.Http.Netty4Impl values were removed because they were confusing. Use .withHttp2 and .withNoHttp2 to toggle HTTP/2 support ON and OFF respectively. PHAB_ID=D935292
    • finagle-core: Allow users of MethodBuilder.idempotent to specify non-retryable responses for idempotent methods. Previously these were overridden to be retryable. b8133350
    • finagle-core: The com.twitter.finagle.offload.queueSize has been removed. eb98b64f
    Source code(tar.gz)
    Source code(zip)
  • finagle-22.7.0(Jul 28, 2022)

    22.7.0

    • finagle-thrift: Changing visibility of InputBuffer and OutputBuffer from [finagle] to [twitter]. d56bb847

    New Features

    • finagle-core: Introduce panic mode in load balancers. Configure the threshold for panic mode to start using withLoadBalancer.panicMode. c6060de8
    • finagle-core: Provide ServerParamsInjector, a class that will be service-loaded at run-time by Finagle servers, and will allow generic configuration of all sets of parameters. f00434c1
    • finagle-memcached: Add new function, newLoadBalancedTwemcacheClient, to create a TwemcacheClient that doesn't use a partitioning service. `PHAB_ID=D911789

    Bug Fixes

    • finagle-core: fix issue where Trace.traceLocal and Trace.traceLocalFuture nested traces mistakenly annotate to the parent span. 77a7e774

    Breaking API Changes

    • finagle-core: Remove unused DeterministicAperture along with pathways to use weight-unaware aperture loadbalancers. a5004ecc
    • finagle-base-http: Methods for getting/setting Accept, Authorization, Host, Referer, User-Agent, X-Forwarded-For headers were moved from c.t.f.http.Message class to c.t.f.http.Request as these headers are only valid on requests and not on responses. Methods for getting/setting Location, Retry-After, Server, and WWW-Authenticate headers were moved from c.t.f.http.Message class to c.t.f.http.Response as they are only valid on responses and not on requests.
    • finagle-core: Update OffloadFilter.Param API to encourage recommended construction. b684552f
    • finagle-core: Trace.recordLocalSpan is private[this] and no longer protected. 77a7e774
    • finagle-core: "ServiceFactory#status" is abstract and requires implementation in the inherited classes. b2a7f4ea
    • finagle-core: StackTransformer has been renamed to ServerStackTransformer and the symmetric client equivalent (ClientStackTransformer) has been added. For those using the older StackTransformer API you will both need to change the code (fix the extends) __and__ rename the META-INF file from resources/META-INF/services/com.twitter.finagle.StackTransformer to resources/META-INF/services/com.twitter.finagle.ServerStackTransformer in order to have your transformer continue to service-load correctly. f5de196d

    Runtime Behavior Changes

    • finagle-core: Changed the default implementation for random and deterministic aperture load balancers to weighted aperture. f67c839c

    • finagle-partitioning: ThriftCustomPartitioningServices now allow fanning out the same request to multiple partitions. 59381065

    • finagle-core: Rename the counter metric loadbalancer/max_effort_exhausted to loadbalancer/panicked. a055f74b
    • finagle: Upgrade to Netty 4.1.76.Final and netty-tcnative 2.0.51.Final. c07a9b0b
    • finagle: Update Jackson library to version 2.13.3 92d39db2
    • finagle: Bump version of lz4-java to 1.8.0. 305c467c
    • finagle: Upgrade to Netty 4.1.78.Final and netty-tcnative 2.0.53.Final to support tls tracing for finagle in [Pixie](https://pixie.dev/). The Pixie changes aren't complete yet, but upgrading netty is a prerequisite for that. d251883b`
    Source code(tar.gz)
    Source code(zip)
  • finagle-22.4.0(Apr 20, 2022)

    22.4.0

    Bug Fixes

    • finagle-integration: we discovered that we had a dead code in MuxClientSession. Let's remove Timer as a parameter in MuxClientSession since it's a dead code. 77396f84
    Source code(tar.gz)
    Source code(zip)
  • finagle-22.3.0(Mar 29, 2022)

    22.3.0

    Breaking API Changes

    • finagle-core: Removed the stack param WhenNoNodesOpenParam from LoadBalancerFactory. Removed NoNodesOpenServiceFactory and NoNodesOpenException. When the majority of nodes are busy or closed (approx 60%), the load balancer will probabilistically fail open and pick a node at random. 1ec9ffa4

    Runtime Behavior Changes

    • finagle: Bump version of Jackson to 2.13.2. 0f83179d
    Source code(tar.gz)
    Source code(zip)
  • finagle-22.2.0(Mar 4, 2022)

    22.2.0

    New Features

    • finagle-logging: Introduced finagle-logging, a new module for SLF4J-integrated filters. 0e6a3b68
    • finagle-logging: Introduced SlowTracesFilter, which observes your requests and logs the slowest ones that are also sampled for tracing. 0e6a3b68
    • finagle-core: Introduced MinSendBackupAfterMs to the stack param Configured in BackupRequestFilter and propagated changes to MethodBuilder by adding new versions of idempotent function. When traffic load is low, this is useful to increase the delay when backup requests are sent and prevent the client from sending unnecessary backup requests. b0b8a6bb
    • finagle-core: Added a new annotation clnt/has_dark_request in tracing and Finagle Local context. The new annotation can be used to indicate whether or not the request has a span that is sent to dark service. dab1e48d

    Bug Fixes

    • finagle-netty4-http: On a Request, adding multiple cookies with the same name to a CookieMap preserves all of them. Only cookies on Responses are deduplicated. Previously, adding a Request cookie with the same name would overwrite the old value with the new value. 6a49bfda
    • finagle-postgres: Fixed a bug where a single framer instance was shared across all connections to a host when using TLS. 185e2115

    Breaking API Changes

    • finagle-core: Changed the shouldInvoke parameter in method serviceConcurrently and sendDarkRequest in AbstractDarkRequestFilter to be a Boolean instead of a function of (Req => Boolean). dab1e48d
    • finagle-core: Renamed the existing clnt/dark_request to clnt/is_dark_request in c.t.finagle.filter.DarkTrafficFilterdab1e48d

    Runtime Behavior Changes

    • finagle: Bump version of Caffeine to 2.9.3. c42cea2c
    • finagle: Upgrade to Netty 4.1.73.Final and netty-tcnative 2.0.46.Final.cccbae40
    • finagle-core: in TimeoutFilter, only transform a timeout exception caused by TimeoutFilter. This also changes the type of exception raised by the TimeoutFilter from a java.util.concurrent.TimeoutException to a com.twitter.finagle.RequestTimeoutException. 6a95f37d
    • finagle-mux: Exceptions raised when Mux negotiation has failed have been moved to a Debug log level as the stack trace is generally long and not necessarily helpful. The logged message now includes the remote address and that is logged at both the Debug level (with the exception and stack trace) and Warning level (without). 712878ef
    • finagle-core: c.t.f.ssl.SslConfigurations.initializeSslContext now creates an engine which includes TLSv1.3 as a supported protocol. cc6c9db8
    • finagle-netty4: c.t.f.n.ssl.client.Netty4ClientSslConfigurations.createClientContext and c.t.f.n.ssl.server.Netty4ServerSslConfigurations.createServerContext now create contexts using the provided cipher suites. 9c6898ef
    Source code(tar.gz)
    Source code(zip)
  • finagle-22.1.0(Jan 18, 2022)

  • finagle-21.12.0(Dec 17, 2021)

    21.12.0

    Deprecations

    • finagle-zipkin-core: c.t.f.zipkin.core.Sampler.DefaultSampleRate is deprecated in favor of c.t.f.zipkin.core.DefaultSampler.sampleRate. bd04e1c9

    Bug Fixes

    • finagle-zipkin-core: c.t.f.zipkin.core.Sampler would sample at 1/10,000 rate when configured with a lower (but non-zero) rate. It can now sample at rates as low as 1/16,777,216. 17cfb580

    Runtime Behavior Changes

    • finagle-zipkin-scribe: c.t.f.zipkin.thrift.ZipkinTracer uses c.t.f.zipkin.core.DefaultSampler.sampleRate as the default sample rate instead of deprecated c.t.f.zipkin.core.Sampler.DefaultSampleRate. This allows it to correctly observe user-configured overrides to the default sample rate. When a ZipkinTracer is constructed with default parameters and there are no user-configured overrides, the behavior is unchanged. bd04e1c9
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.11.0(Nov 24, 2021)

    21.11.0

    Changed

    • finagle-base-http: Promote several classes out of exp experimental package: c.t.f.http.{GenStreamingSerialServerDispatcher, IdentityStreamTransport, StreamTransport} along with internal support classes. 81169d53

    Breaking API Changes

    • finagle-core: Remove c.t.f.loadbalancer.Balancer.maxEffort. Remove the maxEffort argument from Balancers.{p2c, p2cPeakEwma, aperture, aperturePeakEwmaUse, roundRobin}. 25f01f77
    • finagle-core: c.t.f.tracing.ClientRequestTracingFilter has been removed. Record relevant tracing information in your service or client directly. bcd89491
    • finagle: Remove com.twitter.finagle.Group, and other rarely used and deprecated pieces that depend on it com.twitter.finagle.memcached.TwitterCacheResolver, com.twitter.finagle.memcached.CacheNodeGroup, com.twitter.finagle.memcached.RubyMemCacheClient, and com.twitter.finagle.memcached.PHPMemCacheClient. Instead of Group, please use Var[Set[T]] or Activity[Set[T]] directly instead. f6021319

    Runtime Behavior Changes

    • finagle: Update Caffeine cache library to version 2.9.2 7c91f966
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.10.0(Nov 1, 2021)

    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

    Source code(tar.gz)
    Source code(zip)
  • finagle-21.9.0(Oct 1, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.8.0(Aug 14, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.6.0(Jun 22, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.5.0(May 29, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.4.0(Apr 28, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.3.0(Mar 30, 2021)

    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 https://github.com/scoverage/sbt-scoverage/issues/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
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.2.0(Feb 11, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
  • finagle-21.1.0(Jan 19, 2021)

    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
    Source code(tar.gz)
    Source code(zip)
  • finagle-20.12.0(Dec 11, 2020)

    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
    Source code(tar.gz)
    Source code(zip)
  • finagle-20.10.0(Oct 27, 2020)

    Breaking API Changes

    • finagle-thrift: Change the partition locator function getLogicalPartitionId in PartitioningStrategy from Int => Int to Int => Seq[Int], which supports many to many mapping from hosts and logical partitions. ab641adc

    Runtime Behavior Changes

    • finagle-core: Disable eager connections for balancers with a non 1.0 weight. 11eae0d6
    Source code(tar.gz)
    Source code(zip)
  • finagle-20.9.0(Sep 25, 2020)

    New Features

    • finagle-core: Add RelativeName field to Metric Metadata and populate it for client and server metrics. de589ffa
    • finagle-scribe: Add c.t.finagle.scribe.Publisher for publishing messages to a Scribe process. 7723a949

    Runtime Behavior Changes

    • finagle: Bump version of Jackson to 2.11.2. 6c6c882a

    Bug Fixes

    • finagle-core: The TraceId alternative constructor now forwards the traceIdHigh parameter to the primary constructor. 567e8d66
    Source code(tar.gz)
    Source code(zip)
  • finagle-20.8.1(Aug 27, 2020)

  • finagle-20.8.0(Aug 12, 2020)

    20.8.0

    Runtime Behavior Changes

    • finagle-netty4-http: Post, Put, Patch non-streaming outbound requests with empty bodies will be added the Content-Length header with value 0. 9ce18e85
    • finagle-core: A ServiceFactory created by ServiceFactory.const/constant propagates the wrapped service status. 3347c095
    • finagle-http: c.t.f.http.filter.PayloadSizeFilter no longer adds an annotation on each streaming chunk and instead aggregates the byte count and adds a single record on stream termination. e87b1c35
    • finagle-zipkin-scribe: zipkin scribe log_span prefix replaced with scribe. zipkin-scribe/scribe/<stats>. 5b100ee9

    New Features

    • finagle-core: introduce type-safe ReqRep variant 459daf68
    • finagle-core: Added a new variant of Filter.andThenIf which allows passing the parameters as individual parameters instead of a Scala tuple. fb071d9b
    • finagle-core: new metric (counter) for traces that are sampled. finagle/tracing/sampled 1d6503e0
    • finagle-netty4: Add the c.t.f.netty4.Netty4Listener.MaxConnections param that can be used to limit the number of connections that a listener will maintain. Connections that exceed the limit are eagerly closed. 9991aae3
    • finagle-thrift: Added java-friendly c.t.f.thrift.exp.partitioning.ClientHashingStrategy and c.t.f.thrift.exp.partitioning.ClientCustomStrategy create methods, and added java-friendly c.t.f.thrift.exp.partitioning.RequestMergerRegistry#addRequestMerger and c.t.f.thrift.exp.partitioning.ResponseMergerRegistry#addResponseMerger to make partitioning easier to use from Java. e0d78d14

    Breaking API Changes

    • finagle-core: ReqRep can no longer be created via new ReqRep(..). Please use ReqRep.apply(..) instead. 459daf68
    • finagle-thrift: Updated the c.t.f.thrift.exp.partitioning.ClientHashingStrategy and the c.t.f.thrift.exp.partitioning.ClientCustomStrategy to take constructor arguments instead of needing to override methods on construction. e0d78d14
    • finagle-zipkin-core: Removed unused statsReceiver constructor argument from RawZipkinTracer. 5b100ee9
    Source code(tar.gz)
    Source code(zip)
  • finagle-20.7.0(Jul 22, 2020)

    20.7.0

    Breaking API Changes

    • finagle-core: Correct the spelling of Tracing.recordClientSendFrargmet() to Tracing.recordClientSendFragment() 30726c01
    • finagle-redis: Use StrictKeyCommand for XDEL d174f9d6
    • finagle-toggle: Toggle.isDefinedAt(i: Int) has become Toggle.isDefined. Additionally, a new method Toggle.isUndefined has been added. 3bb78ce8
    • finagle-zipkin-scribe: The scribe.thrift file was moved to finagle-thrift/src/main/thrift under a new namespace. com.twitter.finagle.thrift.scribe.(thrift|thriftscala) 01a20b79

    Bug Fixes

    • finagle-zipkin-scribe: The scribe client should be configured using the NullTracer. Otherwise, spans produced by the client stack will be sampled at initialSampleRate. 0446dd3e
    Source code(tar.gz)
    Source code(zip)
  • finagle-20.6.0(Jun 24, 2020)

    Runtime Behavior Changes

    • finagle-core: FailFastFactory is now disabled at runtime when a client's destination has only one endpoint, since the client cannot do anything meaningful by breaking the circuit early. This is recommended as a best practice anyway, now it's the default behavior. Less things to configure and worry about! f2c100e8
    • finagle-core: namer annotations are prefixed with "clnt/". c8680fff
    • finagle-core: namer.success & namer.failure are not annotated as they are not request based. namer.tree annotation was also removed to reduce the size of traces. c8680fff
    • finagle-core: The offload filter client annotation is annotated under the child request span instead of its parent. The offload filter annotations are also changed to be binary annotations with the key (clnt|srv)/finagle.offload_pool_size and the value being the pool size 011f096d
    • finagle-memcached: The key in RetrievalCommand are ommited in traces. The total number of Hits and Misses are annotated via a counter instead under clnt/memcached.(hits/misses) 6fd0e2c9

    Breaking API Changes

    • finagle-core: Migrated List[Tracer] to Seq[Tracer] in Tracing, and tracersCtx. cb06890b
    • finagle-core: PayloadSizeFilter and WireTracingFilter are now public APIs. fc1951a5
    • finagle-zipkin-core: initialSampleRate flag will now fail if the sample rate is not in the range [0.0, 1.0]. 180f333c
    • finagle-mysql: mysql client annos are prefixed with clnt/ 37d55c2a

    New Features

    • finagle-thrift: Expose c.t.f.thrift.exp.partitioning.PartitioningStrategy, the bundled PartitioningStrategy APIs are public for experiments. bf1d47be
    • finagle-http: Add LoadBalancedHostFilter to allow setting host header after LoadBalancer 5304ce69
    • finagle-core: Trace the request's protocol identified by the ProtocolLibrary of the client stack. This is annotated under clnt/finagle.protocol. 464bbeb6
    • finagle-core: Add letTracers to allow setting multiple tracers onto the tracer stack. cb06890b
    • finagle-core: DeadlineFilter now exposes a metric admission_control/deadline/remaining_ms which tracks the remaining time in non-expired deadlines on the server side. An increase in this stat, assuming request latency is constant and timeout configurations upstream have not changed, may indicate that upstream services have become slower. 939f9a3e
    • finagle-redis: Make partitionedClient accessible. 7ba107e1
    • finagle-core, finagle-http, finagle-thriftmux: introduce MethodBuilder maxRetries configuration. A ThriftMux or HTTP method can now be configured to allow a specific number of maximum retries per request, where the retries are gated by the configured RetryBudget. This configuration can be applied via Http.client.methodBuilder(name).withMaxRetries(n) or ThriftMux.client.methodBuilder(name).withMaxRetries(n). 4328896d
    • finagle-memcached: Annotate the shard id of the backend the request will reach. 6fd0e2c9

    Bug Fixes

    • finagle-zipkin-core: Remove flush and late-arrival annotations, which artificially extend trace durations. 967ef1fc
    • finagle-core: namer annotations are added at the Service level instead of ServiceFactory as traces are intended to be request based c8680fff
    Source code(tar.gz)
    Source code(zip)
  • finagle-20.5.0(May 29, 2020)

  • finagle-20.4.1(Apr 26, 2020)

    New Features

    • finagle-redis: Add ConnectionInitCommand stack to set database and password. 9fe05301

    • finagle-mysql: Add ConnectionInitSql stack to set connection init sql. bd4411dd

    Runtime Behavior Changes

    • finagle-core: Requeued reqeuests due to the c.t.finagle.service.RequeueFilter will generate their own spanId. af490773

    Bug Fixes

    • finagle-core: Restrict OffloadFilter from allowing interruption of the work performed in the worker pool. This is to ensure that the worker thread isn't interruptible, which is a behavior of certain FuturePool implementations. f0af6ad7 59f9f2b5

    • finagle-netty4: ChannelStatsHandler will now only count the first channel close(..) call when incrementing the closes counter. 3fa91944

    Breaking API Changes

    • finagle-toggle: Removed abstract type for c.t.finagle.Toggle, all Toggles are of type Int. This is to avoid Integer auto-boxing when calling Toggle.apply, thus to improve overall toggle performance. c81a87b0

    • finagle-core: Retried requests due to the c.t.finagle.service.RetryFilter will generate their own spanId. 762471a0

    Source code(tar.gz)
    Source code(zip)
  • finagle-20.4.0(Apr 2, 2020)

    New Features

    • finagle-thrift/thriftmux: Thrift and ThriftMux client side can set a sharable TReusableBuffer by withTReusableBufferFactory. 9213ca35

    Breaking API Changes

    • finagle-partitioning: Rename c.t.finagle.partitioning.CacheNode and CacheNodeMetadata to c.t.finagle.partitioning.PartitionNode and PartitionNodeMetadata. d32f0c25

    • finagle-partitioning: Rename c.t.finagle.partitioning.KetamaClientKey to HashNodeKey 2d0cd33e

    Bug Fixes

    • finagle-base-http: RequestBuilder headers use SortedMap to equalize keys in different caps. setHeader keys are case insensitive, the last one wins. 535f324c
    Source code(tar.gz)
    Source code(zip)
  • finagle-20.3.0(Mar 8, 2020)

    New Features

    • finagle-opencensus-tracing: Add support for providing a custom TextFormat for header propagation. a02d377a

    Runtime Behavior Changes

    • finagle-netty4: When not using the JDK implementation, the Netty reference counted SSL types are used which move SSL cleanup out of the GC cycle, reducing pause durations. 466aa5bf

    • finagle-base-http: Support for the SameSite cookie attribute is now on by default. This can be manipulated via the com.twitter.finagle.http.cookie.supportSameSiteCodec flag. This means that cookies that have a value other than Unset for the sameSite field will have the attribute encoded (by servers) and decoded (by clients). See this Chromium blog post for more information about the SameSite attribute. f96c3729

    • finagle-core: The default NullTracer for ClientBuilder has been removed. Affected clients may now see tracing enabled by default via the Java ServiceLoader, as described in the Finagle User's Guide. 6b3f0940

    • finagle-http2: The HTTP/2 frame logging tools now log at level INFO. This is symmetric with the behavior of the ChannelSnooper tooling which serves a similar purpose which is to aid in debugging data flow and isn't intended to be enabled in production. 78e4596b

    Bug Fixes

    • finagle-zipkin-scribe: add a logical retry mechanism to scribe's TRY_LATER response 23ff595b

    • finagle-http2: Initialize state in H2Pool before use in the gauge to avoid a NullPointerException. 289de8a3

    • finagle-http2: HTTP/2 server pipeline now traps close calls to ensure that events from the initial HTTP/1.x pipeline don't close the HTTP/2 session. For example, the initial pipeline was subject to session timeouts even though the tail of the socket pipeline was effectively dead. Closing of HTTP/2 server pipelines is now handled through the H2ServerFilter. 670dbf74

    • finagle-http2: HTTP/2 servers clean out unused channel handlers when upgrading from a HTTP/1.x pipeline, removing some traps such as unintended timeouts. 3dfe8226

    • finagle-opencensus-tracing: Fixed internal server error when invalid or no propagation headers are provided. a02d377a

    • finagle-zipkin-scribe: export application metrics under a consistent zipkin-scribe scope. Finagle client stats under clnt/zipkin-scribe a17659dd

    Breaking API Changes

    • finagle-zipkin-scribe: update the deprecated FutureIface to MethodPerEndpoint 23ff595b

    • finagle-zipkin-scribe: Coalesce ScribeRawZipkinTracer apply methods into two simple ones. a17659dd

    • finagle-zipkin-scribe: DefaultSampler moved to c.t.f.zipkin.core in finagle-zipkin-core. ac9c7ec1

    • finagle-zipkin-scribe: initialSampleRate GlobalFlag is moved to finagle-zipkin-core, under the same package scope c.t.f.zipkin. ac9c7ec1

    Source code(tar.gz)
    Source code(zip)
  • finagle-20.1.0(Jan 29, 2020)

    New Features

    • finagle-memcached: Upgrade to Bijection 0.9.7. de0ec2c6
    • finagle-opencensus-tracing: Enables cross-build for 2.13.0. fee83b10
    • finagle-thriftmux: Add support for automatically negotiating compression between a client and server. Off by default, clients and servers must be configured to negotiate. d42c87a9
    • finagle-stats: Enables cross-build for 2.13.0. 4144d73c
    • finagle-stats-core: Enables cross-build for 2.13.0. 4144d73c
    • finagle-serversets: Add generic metadata support in ServerSet. Add support for announcing the generic metadata via ZkAnnouncer. Add support to resolve the generic metadata via Zk2Resolver 180bb925

    Breaking API Changes

    • finagle-partitioning: ZKMetadata case class has a new default argument breaking API for Java users. 180bb925
    • finagle-serversets: Endpoint case class has a new metadata argument. 180bb925
    Source code(tar.gz)
    Source code(zip)
  • finagle-19.12.0(Dec 13, 2019)

    New Features

    • finagle-core, finagle-exp: Add annotations to DarkTrafficFilter to identify which span is dark, as well as which light span it correlates with. ba351f4d
    • finagle-core: Introduce Trace#traceLocal for creating local spans within a trace context. 1c6d5d24

    Runtime Behavior Changes

    • finagle: Upgrade to jackson 2.9.10 and jackson-databind 2.9.10.1 e333c839
    • finagle-core: Per-method metrics on MethodBuilder are now created lazily, so if you have methods that you don't use, the associated metrics won't be exported. 6be5dc48
    • finagle-mysql: The RollbackFactory no longer attempts to roll back if the underlying session is closed since it is highly unlikely to succeed. It now simply poisons the session and calls close. 99135e00
    • finagle-netty4: Change the 'connection_requests' metric to debug verbosity. a6dc1296
    • finagle-serversets: Ensure ZkSession#retrying is resilient to ZK host resolution failure. 7125026a
    • finagle-thrift: Per-method metrics are now created lazily, so if you have methods on a Thrift service that you don't use, the associated metrics won't be exported. 6be5dc48
    • finagle-zipkin-core: Tracing produces microsecond resolution timestamps in JDK9 or later. 08a926c6
    • finagle-core: Trace#time and Trace#timeFuture no longer generate timestamped annotations or silently discard timing information. They now instead generate a BinaryAnnotation containing the timing information. In order to also get timestamped Annotations for when the operation began and ended, use in conjunction with Trace#traceLocal. 1c6d5d24

    Breaking API Changes

    • finagle-core: The RetryPolicy companion object is no longer a JavaSingleton. 9ffb3d13
    • finagle-thrift: The RichClientParam constructors are now all either deprecated, so to construct it, you must call one of the RichClientParam.apply methods. 6be5dc48

    Deprecations

    • finagle-core: Deprecate Tracing#record(message, duration) as it does not have the intended effect and silently discards any duration information in the resulting trace. Instead you should use either Tracing#recordBinary or a combination of Trace#traceLocal and Trace#time. 1c6d5d24

    Bug Fixes

    • finagle-core: ClosableService client stack module that prevents the reuse of closed services when FactoryToService is not set. This is important for clients making use of the newClient api. c64bea09
    Source code(tar.gz)
    Source code(zip)
Owner
Twitter
Twitter 💙 #opensource
Twitter
💡极致性能的企业级Java服务器框架,RPC,游戏服务器框架,web应用服务器框架。(Extreme fast enterprise Java server framework, can be RPC, game server framework, web server framework.)

?? 为性能而生的万能服务器框架 ?? Ⅰ. zfoo简介 ?? 性能炸裂,天生异步,Actor设计思想,无锁化设计,基于Spring的MVC式用法的万能RPC框架 极致序列化,原生集成的目前二进制序列化和反序列化速度最快的 zfoo protocol 作为网络通讯协议 高可拓展性,单台服务器部署,

null 1k Jan 1, 2023
How To Implement Fault Tolerance In Microservices Using Resilience4j

springboot-resilience4j-demo How To Implement Fault Tolerance In Microservices Using Resilience4j? Things todo list: Clone this repository: git clone

Hendi Santika 4 Mar 30, 2022
Fault tolerance and resilience patterns for the JVM

Failsafe Failsafe is a lightweight, zero-dependency library for handling failures in Java 8+, with a concise API for handling everyday use cases and t

Failsafe 3.9k Dec 29, 2022
High performance RPC framework based on netty

RPC(Remote Procedure Call)实战 @desc: 仅用于个人学习、了解RPC @date: 2021/01/16 技术组成: 版本一 版本二 版本三 传输层 Netty4 * * 编码层 Kryo * * 应用层 JDK动态代理 * * 服务注册与发现 手动注册+guava缓存

XDD 10 Nov 22, 2022
✈A high-performance RPC based on Java & Netty.

bRPC README 中文版本 一个基于netty的RPC框架 基于netty NIO、IO多路复用。 client与server端建立心跳包保活机制。发生未知断连时,重连保证可靠长连接。 使用kryo序列化,自定义传输包,及传输格式,避免TCP沾包问题。 支持zookeeper或nacos做服务

vincent 238 Dec 16, 2022
Lightweight service-based PubSub, RPC and public APIs in Java

kite - service-based RPC, public APIs and PubSub in Java kite is a collection of reactive application messaging libraries that aim at providing high l

teris.io 3 Feb 17, 2022
A base repo for creating RPC microservices in Java with gRPC, jOOQ, and Maven.

Wenower Core OSX local installation Install Protocol Buffer $ brew install protobuf Install Postgresql and joopc database and user $ brew install pos

Hamidreza Soleimani 1 Jan 9, 2022
A simple implementation of the Dubbo protocol.

Codec-dubbo Codec-dubbo is a binary codec framework for dubbo protocol Features Fully compatible with Dubbo protocol Completely rewritten based on Net

ESA Stack 13 Nov 21, 2022
A lightweight messaging library that simplifies the development and usage of RabbitMQ with the AMQP protocol.

kryo-messaging This library contains a simple MessagingService which simplifies the setup and work with RabbitMQ and the AMQP protocol. Usage Gradle r

Kryonite Labs 3 Jan 10, 2022
UHI is envisioned as an open protocol for various digital health services.

UHI is envisioned as an open protocol for various digital health services. UHI Network will be an open network of End User Applications (EUAs) and participating Health Service Provider (HSP) applications. UHI will enable a wide variety of digital health services between patients and health service providers (HSPs) including appointment booking, teleconsultation, service discovery and others

National Health Authority 59 Dec 21, 2022
Flash Sale System AKA. seckill system

FlashSaleSystem Project highlights Distributed system scheme From a single machine to a cluster, it is easy to scale horizontally simply by adding ser

wsbleek 12 Sep 13, 2022
Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

null 4 Oct 4, 2022
E-Commerce System Simulation with layered architecture

ECommermeSimulation E-Commerce System Simulation with layered architecture Users can become a member of the system by entering their information. User

Esranur Türkmen 5 Jul 16, 2021
Human Resource Management System (Java & React)

?? HumanResourceManagementSystem ?? Steps İş Arayanlar sisteme kayıt olabilmelidir. ✔️ İş verenler sisteme kayıt olabilmelidir. ✔️ ️ Sisteme genel iş

Furkan Paşaoğlu 5 Sep 12, 2022
Human Resources Management System

Human Resource Management System ( HRMS ) The following tools / languages will be used in this project; Java (Spring Boot based) - on the Backend side

Fatih Deniz 17 Dec 1, 2022
Human Resource Management System - Backend

Human Resource Management System - Backend File Structure ??️ Layered Architecture Entities - The package in which the assets are kept DataAcces - Pac

Tarık Kaan Koç 30 Jan 1, 2023
Human resource management system with java spring

Pair Programming This project developed with Emin Ümüt Erarslan a.k.a 8CA5F İnsan Kaynakları Yönetim Sistemi Bu proje Engin Demiroğ' un Java-React kam

Burak KALAYCI 45 Dec 26, 2022
Backend For Human Resource Management System

?? Presentation This is a hrms project. At the backend of this project I used Java(Spring Boot) and I used PostgreSQL as database management. At the f

Salih Bora Öztürk 13 Aug 5, 2022
A repository that contains the backend part of the Human Resources Management System.

Human Resources Management System Backend A human resources management system is a form of human resources (HR) software that combines several systems

Bulent Baris Kilic 24 Dec 26, 2022