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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Anton Davydov
September 26, 2015
Programming
440
0
Share
Sidekiq under the hood
Anton Davydov
September 26, 2015
More Decks by Anton Davydov
See All by Anton Davydov
How to make a technical decision
davydovanton
0
150
МГТУ
davydovanton
0
110
Events. Events. Events! - krk.rb
davydovanton
0
160
Events. Events. Events!
davydovanton
0
850
Event Sourcing RubySPBConf 2k18
davydovanton
1
210
Architecture of hanami applications
davydovanton
1
7.7k
Hanami Architecture
davydovanton
2
330
viewing ruby blossom kaigi2017
davydovanton
0
760
viewing ruby blossom rdrc2017
davydovanton
2
240
Other Decks in Programming
See All in Programming
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.4k
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
130
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
CSC307 Lecture 17
javiergs
PRO
0
310
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
1.5k
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.4k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
180
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
2
1.6k
AIとRubyの静的型付け
ukin0k0
0
510
3Dシーンの圧縮
fadis
1
580
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.3k
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
140
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Amusing Abliteration
ianozsvald
1
190
Everyday Curiosity
cassininazir
0
220
Chasing Engaging Ingredients in Design
codingconduct
0
200
Evolving SEO for Evolving Search Engines
ryanjones
0
210
Paper Plane
katiecoart
PRO
1
51k
Designing Powerful Visuals for Engaging Learning
tmiket
1
390
Bash Introduction
62gerente
615
210k
First, design no harm
axbom
PRO
2
1.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.8k
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!