0

Im building a real-time *(5 second latency) analytics server. During load testing with ~600 concurrent connections I've noticed severe discrepancies between the number of known test documents and the number of reported documents. That is, I know there should have been 600 "currently active" records, but on find()s mongo is reporting much less.

This seems to be caused by the "write and forget" nature of mongo and that the default syncdelay is set to 60 seconds. Is this correct?

I believe that I can fix the issue either by using safe writes, or using a syncdelay of 5 seconds. Either will surely degrade performance, but I'm curious as to how each might affect performance.

talentedmrjones
  • 235
  • 3
  • 8

1 Answers1

1

I'm not trying to be difficult, but, like your previous question about system load, there is no "best" in this situation. It is totally, completely, entirely, 100% dependent on your application.

If your application and its users won't be adversely affected by a bit of sync delay, then running how you have been is just fine. If the delay will cause problems, though, well you'll need to try one of your proposed solutions. We have no idea what your application is, what hardware it's running on, or how it would be affected by the reduced performance. Only you can tell that through testing your app.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • No I dont think you're being difficult, maybe I am :) I'm just new to this type of infrastructure, and new to systems that need to handle millions of requests per day (and growing). So Im just trying to get some general guidelines, some things to keep in mind as I continue to develop. But I do agree with you that ultimately the "best" solution will depend on my specific application. Given that, I'm still hoping someone can share experiences with safe writes or syncdelay – talentedmrjones Sep 28 '11 at 20:04
  • Fair enough. You may want to edit your question (or delete this one and post new) to pull out the "what is best" stuff. Just ask about those two options and see what kind of response you get. – EEAA Sep 28 '11 at 20:07