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
400
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
97
МГТУ
davydovanton
0
66
Events. Events. Events! - krk.rb
davydovanton
0
140
Events. Events. Events!
davydovanton
0
770
Event Sourcing RubySPBConf 2k18
davydovanton
1
180
Architecture of hanami applications
davydovanton
1
7.5k
Hanami Architecture
davydovanton
2
280
viewing ruby blossom kaigi2017
davydovanton
0
610
viewing ruby blossom rdrc2017
davydovanton
2
200
Other Decks in Programming
See All in Programming
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
150
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
880
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
1.1k
エンジニア向け採用ピッチ資料
inusan
0
180
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
660
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
600
ふつうの技術スタックでアート作品を作ってみる
akira888
0
300
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
460
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
680
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
250
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
570
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
240
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
42
7.6k
We Have a Design System, Now What?
morganepeng
53
7.7k
Balancing Empowerment & Direction
lara
1
390
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Rails Girls Zürich Keynote
gr2m
94
14k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Typedesign – Prime Four
hannesfritz
42
2.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Six Lessons from altMBA
skipperchong
28
3.9k
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!