ReadSideProcessor is slower than usual after server is idle for a while



I’ve noticed this behavior recently. Normally stuff gets inserted within a sec, but after the server was idle for some time, it takes like 10 sec to get data inserted. On subsequent requests, it is back to normal.

Do you have any idea why that could be?

version 1.4.8 scala, and i’m on Slick read side persisting to Oracle.

(Logan Nelson) #2

From what you are describing, it sounds like you are experiencing the delay that happens when a passivated persistent entity is spinning back up via cluster sharding. That would explain why the first few calls get buffered because the entity is restoring it’s state from the journal by replaying events. Once restored, the entity is then able to persist events that correspond to your commands and those can in turn be written to the readside by the ReadSideProcessor. Also remember that there is a default eventual consistency delay for persisting the event to cassandra so keep that in mind too (considering the ReadSideProcessor is following the events that are persisted in cassandra).