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
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
flutterkaigi_2024.pdf
kyoheig3
0
150
受け取る人から提供する人になるということ
little_rubyist
0
250
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.5k
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Jakarta EE meets AI
ivargrimstad
0
600
C++でシェーダを書く
fadis
6
4.1k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
Designing Experiences People Love
moore
138
23k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
GitHub's CSS Performance
jonrohan
1030
460k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
The Art of Programming - Codeland 2020
erikaheidi
52
13k
BBQ
matthewcrist
85
9.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
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