Grokking MongoDB
0% completed
Change Streams
An application that needs to know when a price changes could query the collection every few seconds and compare the results. That approach adds load on the database and reports each change late, and it misses a value that changes twice between queries. A change stream works the other way around: the application opens one connection to MongoDB and receives an event for each change, in order, shortly after the change is committed.
A change stream reads from the oplog of a replica set. For this reason, it does not exist on a standalone server:
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%