8. Persistance?
What happen when we restart Redis server?
• by default there is no data anymore
• you can have non structured dump to
fi
le to restore on crash/restart
10. Screw-up
Custom Redis usage
• On event add (and in failover job)
• Set enqueued job_ids in Redis with keys:
• "ac_noti
fi
cations.start.1244"
• "ac_noti
fi
cations.end.1244"
• On event postpone, get from redis job_ids, delete them from sidekiq queue
and repeat above procedure after create callback
• After Redis restart we have also a job to ensure that future events
will be re-enqueued if no entries in Redis
22. Why to use DB for caching?
From DHH keynote
• Disk space is 10x more cheaper than RAM (using Redis)
• Cache life time can be months
(we can have persistent Redis also, but not such big as DB)
• Sharding (not trivial for Redis)
• 1 less process if you already use disk DB
• Is multithreaded in comparison to Redis :D
• Why not ?
• it's slower 0,5 times than Redis
23. Sources
• Rails World opening DHH Ketnote
• https://dev.to/molly/how-to-safely-navigate-redis-with-ruby-j9l
• Transactions in Redis (Go example)