Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Distributed Request Tracing
Search
Kenny Hoxworth
April 23, 2014
Programming
2
1k
Distributed Request Tracing
Overview of tracing in a distributed system from a Ruby / Rails perspective
Kenny Hoxworth
April 23, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
Web Components で実現する Hotwire とフロントエンドフレームワークの橋渡し / Bridging with Web Components
da1chi
2
1.4k
Advance Your Career with Open Source
ivargrimstad
0
240
Build your own WebP codec in Swift
kishikawakatsumi
2
860
Server Less Code More - コードを書かない時代に生きるサーバーレスデザイン / server-less-code-more
gawa
5
1.9k
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osk2025-duckdb
takahashiikki
1
230
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
130
実践AIチャットボットUI実装入門
syumai
7
2.4k
エンジニアとして高みを目指す、 利益を生み出す設計の考え方 / design-for-profit
minodriven
23
11k
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
150
いま中途半端なSwift 6対応をするより、Default ActorやApproachable Concurrencyを有効にしてからでいいんじゃない?
yimajo
2
230
Local Peer-to-Peer APIはどのように使われていくのか?
hal_spidernight
2
420
大規模アプリにおけるXcode Previews実用化までの道のり
ikesyo
0
970
Featured
See All Featured
A Tale of Four Properties
chriscoyier
160
23k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
For a Future-Friendly Web
brad_frost
180
9.9k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Faster Mobile Websites
deanohume
310
31k
Building an army of robots
kneath
306
46k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
GraphQLとの向き合い方2022年版
quramy
49
14k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Optimizing for Happiness
mojombo
379
70k
Transcript
DISTRIBUTED REQUEST TRACING
Kenny Hoxworth
Request Profiler Request Lifecycle (40ms) WebService (25ms) AuthService (15ms) DB
(3ms) Worker (13ms)
SMS Trace
SMS Trace
SMS Trace
Performance 500 ms
Bad Nodes
Cats as a service
Catspammer API web
Catspammer API AUTH PurrMQ Social Media Workers web
Catspammer API AUTH PurrMQ Social Media Workers web
Tracing done Right
Low Overhead Goal 1.
Scalable Goal 2.
Transparent Instrumentation Goal 3.
X-Trace, Magpie, Pinpoint
Request Lifecycle (40ms) WebService (25ms) AuthService (15ms) DB (3ms) Worker
(13ms) trace id
Request Lifecycle (40ms) WebService (25ms) AuthService (15ms) DB (3ms) Worker
(13ms) span id
Dapper
Dapper Architecture Instrumented Services Dapper Collectors Dapper UI
Zipkin
Zipkin Pluggable Datastore Scribe Collector Highly configurable
None
Zipkin Example
System Setup Zipkin
System Setup Zipkin $> git clone https://github.com/twitter/zipkin.git $> ./zipkin/bin/collector &
$> ./zipkin/bin/query & $> ./zipkin/bin/web &
Scribe Ruby Setup finagle-thrift zipkin-tracer
gemfile.rb gem 'scribe' gem 'finagle-thrift' gem 'zipkin-tracer', :git => ‘
[email protected]
:mszenher/zipkin-
tracer.git', :require => 'zipkin-tracer', :tag => 'v0.4.0'
config/initializers/zipkin.rb config = Rails.application.config ! zipkin_tracer_config = { service_name: 'catspammer',
service_port: 9410, sample_rate: 1, scribe_server: '127.0.0.1:9410' } ! config.middleware.use ZipkinTracer::RackHandler, zipkin_tracer_config
ActiveRecord? Redis? Trace.record(Trace::Annotation.new(Trace::Annotation::CLIENT_SEND, Trace.default_endpoint)) Trace.record(Trace::Annotation.new(Trace::Annotation::CLIENT_RECV, Trace.default_endpoint)) Cat.where(:fur => “orange”)
Demo
Questions?
catspammer.com
Thanks! @hoxworth :: http://github.com/hoxworth