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
370
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
88
МГТУ
davydovanton
0
55
Events. Events. Events! - krk.rb
davydovanton
0
140
Events. Events. Events!
davydovanton
0
750
Event Sourcing RubySPBConf 2k18
davydovanton
1
170
Architecture of hanami applications
davydovanton
1
7.4k
Hanami Architecture
davydovanton
2
260
viewing ruby blossom kaigi2017
davydovanton
0
500
viewing ruby blossom rdrc2017
davydovanton
2
190
Other Decks in Programming
See All in Programming
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.7k
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
11
1.9k
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
SwiftUI Viewの責務分離
elmetal
PRO
1
230
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
380
Formの複雑さに立ち向かう
bmthd
1
830
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
160
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
550
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
560
CNCF Project の作者が考えている OSS の運営
utam0k
6
710
Ruby on cygwin 2025-02
fd0
0
140
sappoRo.R #12 初心者セッション
kosugitti
0
250
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Navigating Team Friction
lara
183
15k
Six Lessons from altMBA
skipperchong
27
3.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
A Philosophy of Restraint
colly
203
16k
Site-Speed That Sticks
csswizardry
4
380
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Become a Pro
speakerdeck
PRO
26
5.1k
Optimizing for Happiness
mojombo
376
70k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
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!