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
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
130
CursorはMCPを使った方が良いぞ
taigakono
1
190
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
320
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
100
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
340
A2A プロトコルを試してみる
azukiazusa1
2
1.2k
エラーって何種類あるの?
kajitack
5
320
PipeCDのプラグイン化で目指すところ
warashi
0
130
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
400
Team operations that are not burdened by SRE
kazatohiei
1
270
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
520
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Designing for humans not robots
tammielis
253
25k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Gamification - CAS2011
davidbonilla
81
5.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
24k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Code Review Best Practice
trishagee
68
18k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
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!