Reputation: 5462
Environment
I'm installing Airbrake
on Heroku
for a Ruby
web app (not Rails).
So Airbrake#notify
for Airbrake
version 5 for Ruby
sends a notification asynchronously.
My worry is that if I don't use Sidekiq
worker + Redis
, then it might still be possible that calling Airbrake#notify
might still slow down the app's response time depending on how it's used (whether in a Rails-like controller or some other part of the app).
Besides overcoming the potential issue mentioned above, the other advantage of using Sidekiq
worker + Redis
to call Airbrake#notify
I can think of is that Redis
has a couple of persistence strategies so if the app crashes I can backtrack and look over the backed up error notifications from the Sidekiq
queue.
Whereas if I don't use Sidekiq
+ Redis
and the app crashes, then there will be no backed up data....
Questions
Does that mean I don't need to use Sidekiq
+ Redis
(or some other equivalent database)?
Am I understanding the issue correctly? I don't have a very complete understanding of "pooled connections" and asynchronous processing, so this makes understanding what to do here a bit challenging.
Upvotes: 0
Views: 227
Reputation: 7301
This is the class that sends async notices https://github.com/airbrake/airbrake-ruby/blob/master/lib/airbrake-ruby/async_sender.rb
It's using standard ruby threads to send messages, so no background service should be necessary
Upvotes: 1