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
350
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
85
МГТУ
davydovanton
0
48
Events. Events. Events! - krk.rb
davydovanton
0
130
Events. Events. Events!
davydovanton
0
730
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
460
viewing ruby blossom rdrc2017
davydovanton
2
180
Other Decks in Programming
See All in Programming
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
5
620
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
120
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
730
romajip: 日本の住所CSVデータを活用した英語住所変換ライブラリを作った話
sangunkang
0
170
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2.1k
CSC509 Lecture 12
javiergs
PRO
0
160
Tauriでネイティブアプリを作りたい
tsucchinoko
0
380
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
Macとオーディオ再生 2024/11/02
yusukeito
0
390
React への依存を最小にするフロントエンド設計
takonda
19
5.3k
RubyLSPのマルチバイト文字対応
notfounds
0
120
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Optimizing for Happiness
mojombo
376
70k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Site-Speed That Sticks
csswizardry
0
40
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Navigating Team Friction
lara
183
14k
RailsConf 2023
tenderlove
29
910
A Tale of Four Properties
chriscoyier
156
23k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Designing the Hi-DPI Web
ddemaree
280
34k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
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!