@alex
I think that is why u need kafka or sth like that before DB. There is no way to optimize it for peaks... currently I am working on the same problem and wasted few weeks for scaling optimizing, tests and the solution is one add this element to process data. I am also going to tokenize some data to process faster...
I am learning this shit right now...