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
Sidekiq under the hood
Search
Anton Davydov
September 26, 2015
Programming
0
300
Sidekiq under the hood
Anton Davydov
September 26, 2015
Tweet
Share
More Decks by Anton Davydov
See All by Anton Davydov
How to make a technical decision
davydovanton
0
79
МГТУ
davydovanton
0
35
Events. Events. Events! - krk.rb
davydovanton
0
130
Events. Events. Events!
davydovanton
0
640
Event Sourcing RubySPBConf 2k18
davydovanton
1
160
Architecture of hanami applications
davydovanton
1
7.2k
Hanami Architecture
davydovanton
2
220
viewing ruby blossom kaigi2017
davydovanton
0
340
viewing ruby blossom rdrc2017
davydovanton
2
170
Other Decks in Programming
See All in Programming
使ってみよう Azure AI Document Intelligence
kosmosebi
2
370
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
470
Direct Style Effect Systems The Print[A] ExampleA Comprehension Aid
philipschwarz
PRO
0
150
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
200
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
530
CREってこういうこと? 体験入社 - 提案資料 - / what-is-cre-trial-employment
shinden
1
550
Goのmultiple errorsについて (2024年4月版)
syumai
4
1.2k
Milestoner
bkuhlmann
1
420
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
180
Code Reviews
bkuhlmann
4
900
Webアプリをできるだけコードを手書きしないで作ってみる
tomokusaba
2
190
Try creating your own orderedmap
kazamori
1
250
Featured
See All Featured
Visualization
eitanlees
137
14k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Designing Experiences People Love
moore
136
23k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
46k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
The Invisible Customer
myddelton
114
12k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
Design by the Numbers
sachag
274
18k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
21
1.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Transcript
Hello!
github: davydovanton twitter: anton_davydov Anton Davydov
RCNTEC developer sidekiq commiter ruby doc / rails / crystal
OSS one love <3
@rubyunderhood curator https://twitter.com/rubyunderhood
@moscowrb http://moscow-rb.org
You Beer
You Beer Me
I (we) <3 sidekiq!
Simple, efficient background processing for Ruby.
Sidekiq server New thread
I (we) <3 actors!
Manager actor
Fetcher actors Manager actor
Redis Fetcher actors Manager actor
Redis Fetcher actors Processor actors Manager actor
Redis Fetcher actors Processor actors Manager actor Workers
MyWorker.perform_async
irb > MyWorker.perform_async Redis queue Serialization prams
Processor actors Fetcher actors Redis Manager actor Workers
Processor actors Manager actor Workers Fetcher actors Redis
Processor actors Manager actor Workers Fetcher actors Redis
Workers Processor actors Manager actor Fetcher actors Redis
LongWorker Redis
Redis Serialization prams LongWorker After 8 seconds
middleware
Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add YourMiddleware, options end
end
def call(worker, msg, queue) # code before call you worker
yield rescue => e # run if your worker is failed raise e ensure # run in your worker passed or failed end
def call(worker, msg, queue) # code before call you worker
yield rescue => e # run if your worker is failed raise e ensure # run in your worker passed or failed end
def call(worker, msg, queue) # code before call you worker
yield rescue => e # run if your worker is failed raise e ensure # run in your worker passed or failed end
def call(worker, msg, queue) # code before call you worker
yield rescue => e # run if your worker is failed raise e ensure # run in your worker passed or failed end
Sidekiq-statistic github.com/davydovanton/sidekiq-statistic
Improved display of statistics for your sidekiq workers and jobs.
None
None
None
None
Worker name Last job status Runtime Start time
Jobs per day charts for each worker Last job status
for each worker Passed and failed jobs count Average job time Max and min jobs time Total jobs time Last job time
I <3 feedback!
Anton Davydov github.com/davydovanton twitter.com/anton_davydov Thank you!