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
360
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
86
МГТУ
davydovanton
0
51
Events. Events. Events! - krk.rb
davydovanton
0
140
Events. Events. Events!
davydovanton
0
740
Event Sourcing RubySPBConf 2k18
davydovanton
1
170
Architecture of hanami applications
davydovanton
1
7.4k
Hanami Architecture
davydovanton
2
250
viewing ruby blossom kaigi2017
davydovanton
0
480
viewing ruby blossom rdrc2017
davydovanton
2
190
Other Decks in Programming
See All in Programming
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
130
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
390
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
170
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
120
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
600
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.3k
Оптимизируем производительность блока Казначейство
lamodatech
0
890
Flatt Security XSS Challenge 解答・解説
flatt_security
0
600
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
100
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
410
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
220
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
270
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
490
Writing Fast Ruby
sferik
628
61k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
How GitHub (no longer) Works
holman
312
140k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Bash Introduction
62gerente
609
210k
Optimising Largest Contentful Paint
csswizardry
33
3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
19
2.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
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!