Acquiring sequential id with MongoDB is simple, as it support $inc command for atomic sequence increment. However, naive implementation requires hit to database every single time id is required, and this can create latency and overhead issues.
Image may be NSFW.Clik here to view.
