[SERVER-35855] Allow Change streams in standalone servers Created: 28/Jun/18  Updated: 06/Dec/22  Resolved: 27/Oct/22

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Replication
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Julien Chaumond Assignee: Backlog - Replication Team
Resolution: Duplicate Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-38079 Change Streams without Replication Closed
Assigned Teams:
Replication
Participants:

 Description   

I understand the technical reason behind Change streams not currently being implemented for standalone servers, but I think you should implement this sooner rather than later.



 Comments   
Comment by Judah Schvimer [ 01/Dec/21 ]

Hi at.tonchev@gmail.com,

Standalones will have a slightly different performance profile, so in some cases they may be faster, but in general we would not recommend using a standalone server in production, see our docs here.

Comment by Anton Tonchev [ 01/Dec/21 ]

Hi Judah Schvimer,

thanks, I converted one of our system into replica set. It looks like it works fine. Is there any performance or other benefit from using standalone server instead of replica set? 

Comment by Judah Schvimer [ 29/Nov/21 ]

Hi at.tonchev@gmail.com,

Thank you for your inquiry! Standalone servers are meant for maintenance events where the oplog is not present. If you would like a single server with an oplog present, please use a single-node replica set. If that is not a workable solution for you, please let me know.

Thank you,
Judah

Comment by Anton Tonchev [ 29/Nov/21 ]

Is it not possible to add oplog on standalone server and to be possibly optionally activated, e.g. via mongo config?

Comment by NOVALUE Mitar [ 18/Sep/19 ]

This would be useful because it can make it easier to quickly turn on MongoDB and has this change streams available. For testing/CI this is useful, or for simple tutorials. Explaining that you have to do the whole replica setup first is trickier.

Comment by Daniel Faust [ 04/Mar/19 ]

@Asya Kamsky you're right, my mistake. Thanks a lot for the heads-up.

Comment by Asya Kamsky [ 12/Feb/19 ]

danielfaust what is the obstacle to creating a single node replica with a 20MB oplog (or however small you want it to be)?

Comment by Daniel Faust [ 08/Feb/19 ]

Hi, is there any development regarding this issue?

Comment by Daniel Faust [ 14/Nov/18 ]

I erroneously opened a duplicate issue of this one here: https://jira.mongodb.org/browse/SERVER-38079

The following was my line of reasoning in that issue: "The issue is that in the case of a small database, for example a 20 MB database storing the current status of devices in a local area network, like environment sensors, it is not feasible to enable replication if it is not required for the data, because that would force the creation of a 1 GB oplog."

Comment by Tess Avitabile (Inactive) [ 10/Jul/18 ]

greg.mckeon, can you please create the standalones with oplog epic and add this ticket?

Comment by Julien Chaumond [ 28/Jun/18 ]

Yes, we have considered that, but it makes setting up development environments significantly more complex (as opposed to `brew install mongodb` right now). Our devs aren't MongoDB specialists, and the feature we wanted to use change streams for is not central, so we will probably keep using an inferior polling-based system for now.

Comment by Charlie Swanson [ 28/Jun/18 ]

julien_c we can't produce change streams on a standalone server because a standalone server does not have an oplog. As a workaround, you can turn your standalone server into a single-node replica set. This will create an oplog and allow us to provide a change stream, without requiring more than one server. Have you considered that?

Generated at Thu Feb 08 04:41:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.