by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Philippe Laflamme
@plaflamme
@spockz I'm not sure what you mean, but from what I can tell, pretty much all systems I've seen use (unsigned) 64 bit IDs for span ID and trace ID. I suppose there are different representations of those (uuid, unsigned longs or strings), but ultimately it shouldn't matter too much.
Alessandro Vermeulen
@spockz
@plaflamme incidentally our system uses 128 bit identifiers for trace and span ids. In finagle 128 bit ids is only supported for one of the ids.
2 replies
bollmann
@bollmann
Hi Finagle experts, I'd like to know how many different TCP channels are currently connected to my finagle HTTP/1.1 server. Does the finagle server export such a transport-level metric? I'd be grateful for pointers about it :-)
Hamdi Allam
@hamdiallam
the /connections metrics shows the currently open number of connections https://twitter.github.io/finagle/guide/Metrics.html
bollmann
@bollmann
@hamdiallam Thanks!
Alessandro Vermeulen
@spockz
@hamdiallam, strictly necessary, perhaps not. But it is what we are using right now.
Hamdi Allam
@hamdiallam
@spockz I see. It don't see why 128bit span ids couldn't be supported as it is with the trace id. It is not a high priority but would happy to accept a PR for it
3 replies
Alessandro Vermeulen
@spockz
@hamdiallam, Allright I’ll cook a PR to support them similarly to as with trace ids. I can imagine that it leads to extra memory pressure. Maybe it would be better though to be able to specific the trace type/container. We are actually using strings as ids (please don’t ask 🧐)
Paul K.
@paulkore

Hello, I have a general utility question, posting here in lieu of a twitter-util channel.
Are there existing implemenations of Runnable, and/or Executor that handle state management between threads?

Similar to what's done in ExecutorServiceFuturePool, with Local.save() / Local.restore() -
https://github.com/twitter/util/blob/develop/util-core/src/main/scala/com/twitter/util/FuturePool.scala#L128-L150

We need something like this in order to support context-switching that is thread sensitive, seems like a fairly generic scenario to have an abstraction for.

Alessandro Vermeulen
@spockz
@paulkore we have one in our toolkit. It is quite straightforward to contribute back to find god
1 reply
That should be finagle
@hamdiallam, other than making traceid a trait with different implementations or changing the interface for setting trace information in failures no.
Nick Andrievsky
@andrievsky
Hi Finagle experts, did you experienced TLS performance degradation when moving from Java 8 to 11? It seems to happens in all common environments (openjdk versions, linux/mac). Please check the issue twitter/finagle#856 for details. I'd be grateful for any help.
Alessandro Vermeulen
@spockz
@hamdiallam indeed either way could work as long as spans don’t get created manually somewhere. But they use the interface. At that point, it could make sense to switch to open census entirely
1 reply
Alessandro Vermeulen
@spockz
@andrievsky do you have the static bindings to boringssl on your class path ? Maybe it isn’t used in your jdk11 deployment? You should be able to see whether it used by turning debug lobbing on
1 reply
Alessandro Vermeulen
@spockz
@hamdiallam I meant to say open telemetry, we use OpenTracing as well. So I could contribute to move to OT if needed
Xi Yang
@yangxi
I tried to run the finagle-example, but got these missing dependencies, looks like Twitter forgot to make some artifacts public:
[error] coursier.ResolutionException: Encountered 4 error(s) in dependency resolution:
[error] com.twitter:util-logging_2.12:20.6.0-SNAPSHOT:
[error] not found:
[error] /home/xyang/.ivy2/local/com.twitter/util-logging_2.12/20.6.0-SNAPSHOT/ivys/ivy.xml
[error] https://repo1.maven.org/maven2/com/twitter/util-logging_2.12/20.6.0-SNAPSHOT/util-logging_2.12-20.6.0-SNAPSHOT.pom
[error] com.twitter:util-app_2.12:20.6.0-SNAPSHOT:
[error] not found:
[error] /home/xyang/.ivy2/local/com.twitter/util-app_2.12/20.6.0-SNAPSHOT/ivys/ivy.xml
[error] https://repo1.maven.org/maven2/com/twitter/util-app_2.12/20.6.0-SNAPSHOT/util-app_2.12-20.6.0-SNAPSHOT.pom
[error] com.twitter:util-stats_2.12:20.6.0-SNAPSHOT:
[error] not found:
[error] /home/xyang/.ivy2/local/com.twitter/util-stats_2.12/20.6.0-SNAPSHOT/ivys/ivy.xml
[error] https://repo1.maven.org/maven2/com/twitter/util-stats_2.12/20.6.0-SNAPSHOT/util-stats_2.12-20.6.0-SNAPSHOT.pom
[error] com.twitter:util-core_2.12:20.6.0-SNAPSHOT:
[error] not found:
[error] /home/xyang/.ivy2/local/com.twitter/util-core_2.12/20.6.0-SNAPSHOT/ivys/ivy.xml
[error] https://repo1.maven.org/maven2/com/twitter/util-core_2.12/20.6.0-SNAPSHOT/util-core_2.12-20.6.0-SNAPSHOT.pom
[error] (finagle-toggle / coursierResolutions) coursier.ResolutionException: Encountered 4 error(s) in dependency resolution:
[error] com.twitter:util-logging_2.12:20.6.0-SNAPSHOT:
[error] not found:
[error] /home/xyang/.ivy2/local/com.twitter/util-logging_2.12/20.6.0-SNAPSHOT/ivys/ivy.xml
[error] https://repo1.maven.org/maven2/com/twitter/util-logging_2.12/20.6.0-SNAPSHOT/util-logging_2.12-20.6.0-SNAPSHOT.pom
[error] com.twitter:util-app_2.12:20.6.0-SNAPSHOT:
[error] not found:
[error] /home/xyang/.ivy2/local/com.twitter/util-app_2.12/20.6.0-SNAPSHOT/ivys/ivy.xml
[error] https://repo1.maven.org/maven2/com/twitter/util-app_2.12/20.6.0-SNAPSHOT/util-app_2.12-20.6.0-SNAPSHOT.pom
[error] com.twitter:util-stats_2.12:20.6.0-SNAPSHOT:
[error] not found:
[error] /home/xyang/.ivy2/local/com.twitter/util-stats_2.12/20.6.0-SNAPSHOT/ivys/ivy.xml
[error] https://repo1.maven.org/maven2/com/twitter/util-stats_2.12/20.6.0-SNAPSHOT/util-stats_2.12-20.6.0-SNAPSHOT.pom
[error] com.twitter:util-core_2.12:20.6.0-SNAPSHOT:
[error] not found:
[error] /home/xyang/.ivy2/local/com.twitter/util-core_2.12/20.6.0-SNAPSHOT/ivys/ivy.xml
[error] https://repo1.maven.org/maven2/com/twitter/util-core_2.12/20.6.0-SNAPSHOT/util-core_2.12-20.6.0-SNAPSHOT.pom
[error] Total time: 3 s, completed Jun 18, 2020 1:46:11 PM
Christopher Coco
@cacoco
@yangxi you’ll need to follow the instructions in the CONTRIBUTING document if you want to build the example from the develop branch (and not master). Develop points as unstable snapshots.
Xi Yang
@yangxi
@cacoco Thanks, I will try again following the instructions in https://github.com/twitter/finagle/blob/develop/CONTRIBUTING.md
Kevin Pei
@kpei
Hi everyone. I am a bit new to the finagle clients but is it possible to restart/retry service discovery or reconnect to the host as a client when we receive a NoBrokersAvailableException?
Currently we have a couple of finagle-thriftmux clients that connect to zookeeper. Sometimes those services goes down but our clients do not auto reconnect and we have to restart the service manually. Is there a way to set up the client for it to self-heal?
Alessandro Vermeulen
@spockz
@kpei that is odd. What are your failure accrual settings? Or do you mean the connection to service discovery breaks?
Kevin Pei
@kpei
@spockz our failure accrual setting is default. We're not sure if its service discovery breaking or our external host is down that were connecting to. Could be a mix of both.
Btw i actually read about your post in 2015. But didnt decide to tag. I am trying to do what you wrote and that is have a retry policy to try reconnect to the host. Currently our solution is to implement a check inside our healthcheck endpoint so that if we lose connection, finagle monitor raises an issue and our kubernetes will automatically restart our service the next time it checks in on the healthcheck endpoint.
Alessandro Vermeulen
@spockz
What is the failure scenario? What do you see in the logs? I think restarting your whole consuming application on connectivity loss is a bit drastic and would actually decrease your availability @kpei
Kevin Pei
@kpei

Yes agreed. Unfortunately the logs do not provide much information. All I see is

19:40:08.509 [finagle/netty4-2-8] ERROR c.e.g.util.endpoint.ErrorEncoders$ - Unexpected exception occurred. No hosts are available for auth-service, Dtab.base=[], Dtab.local=[]. Remote Info: Not Available
com.twitter.finagle.NoBrokersAvailableException: No hosts are available for auth-service, Dtab.base=[], Dtab.local=[]. Remote Info: Not Available

Currently monitoring to see if it can self revive when the service comes back online.

Alessandro Vermeulen
@spockz
That error message means that the list of instances for the lookup was empty. So Zookeeper has no known instances l
Or at least, the zookeeper client can’t find them.
Not sure anymor, but depending on the resolver it might also mean that unresolvable hosts are filtered which means you end up with an empty list.
Ryan O'Neill
@ryanoneill
Hey folks, I'm going to kick off the June release of Finagle/Finatra shortly.
sky-eduardolopes
@sky-eduardolopes
Hi all, I'm getting a "com.twitter.finagle.http.TooLongMessageException: Response entity too large" on a response. I added two parameters on the server startup: -Dcom.twitter.finagle.Http.param.MaxRequestSize="15728640.bytes" -Dcom.twitter.finagle.Http.param.MaxResponseSize="15728640.bytes" but still getting same error with a 6454768.bytes response. Anyone can help?
Hamdi Allam
@hamdiallam
@sky-eduardolopes i don't believe those are system properties read by Finagle. You should configure your http client directly. i.e Http.client.withMaxResponseSize(15728640.bytes)
@kpei I believe @spockz 's assessment is right. Little confused on your setup. Are the thriftmux clients used to resolve names for service discovery? The Resolver/NameInterpreter used should be reactive to changes in the host list.
Christopher Coco
@cacoco
@sky-eduardolopes those are Stack params which are not read from System properties. They’re generally set as code via the Finagle client APIs: http://twitter.github.io/finagle/guide/FAQ.html#how-do-i-configure-clients-and-servers-with-finagle-6-apis as @hamdiallam mentioned.
Alessandro Vermeulen
@spockz
@vkostyukov I just read the spring update post containing the metrics meta data. Are you considering moving to micro meter? I think that offers the same level of meta data. Does this also mean we will get labels in stats receiver metrics?
sky-eduardolopes
@sky-eduardolopes
@hamdiallam @cacoco thank you for the replies, I'm actually using finagle via diffy and from what I understood in an issue reply that would be the way to set up such parameters. I'll bring it up directly on the diffy channel. Thanks again for taking the time.
Moses Nakamura
@mosesn
@spockz no, we hadn’t heard of micro meter before, but it looks interesting!
yes, we are probably going to try to add support for dimensional metrics later this year. no promises tho!
Alessandro Vermeulen
@spockz
@mosesn okay! We extract them from the metrics Seq right now. So it could save us some pattern matches
Would you consider using micrometer directly?
Moses Nakamura
@mosesn
tbh it’s unlikely. it’s extremely expensive for us to change this kind of fundamental API, so we’d have to see substantial benefits from moving. if micrometer becomes the industry standard, it might make more sense, but I don’t think there’s a clear frontrunner right now.
Alessandro Vermeulen
@spockz
@mosesn I suppose the change can be made incrementally by having overloaded methods with extra labels. With regards to micrometer and standard. I think open telemetry will be the standard. P
Micrometer is quite hot in Spring country
Ben Spencer
@dangerousben
is there a way to detect whether a Request is using http/2 (specifically h2c)?
Moses Nakamura
@mosesn
I think it has special headers. we might strip them before showing them to the user though . . . I recommend experimenting with it
why do you need to know?
Ben Spencer
@dangerousben
just for debugging reasons, I'd like to put it my access logs
Alessandro Vermeulen
@spockz
There is a protocol field. But it doesn’t have the h2 Option. I believe we discussed that before and then there was hesitation because adding the option might break pattern matches.
Maybe get low enough in the stack or netty to be able to add your own header?