3

May be somebody can share his experience how to solve such issues. Would be glad to learn from you.

In short: we have a huge Rails app with ReactJS frontend and Solr as a search engine (gem Sunspot). So our problem is when you update some entity and put the task for reindex this object in a queue (Sidekiq), it takes up to 3 seconds to finish object reindex. And user can see this object in lists where it already shouldn't be. If using synchronous reindex calls without queue there can be a potential problem with losing tasks in a case of high load.

How do you design your architecture to solve such issues?

Ivan Schneider
  • 1,145
  • 1
  • 11
  • 20
  • So where your current bottleneck is? Is it Solr indexing command itself or the update command being stuck / processed within the queue (Sidekiq)? – Pavel Vasilev Mar 10 '17 at 21:20
  • it is not clear how is structured and how big is the object that needs 3 seconds to be reindexed. – freedev Mar 11 '17 at 23:46
  • @PaulVasilev It needs time to wait a task turn in a queue (the more load you have the more queue is) and then handle reindex which also takes some time. In this period user can see an object with an old state. – Ivan Schneider Mar 12 '17 at 11:30

0 Answers0