In our current setup, most of our database calls are updates where we increment a key by 1.
If all one is doing is incrementing certain keys on a document (a lot) in mongodb, and there are several application servers doing so at once, does it ever make sense to somehow aggregate these increments at the application layer and then send the pre-aggregated documents to the main mongodb database every set time interval?
I understand it could be risky because if you somehow lose one of these pre-aggregated documents you can potentially lose more data, but is this technique ever used? I also understand sharding is the accepted way to scale writes, but I was just curious if this technique is ever used because it seems like it could potentially help scale if done right, I could be completely wrong here though.