Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在启动时,我的服务实例需要加载整个 Mongo 集合。不要问为什么。我希望它100 mb > x < 500 mb大小适中,并且只包含1M轻量级文档。
100 mb > x < 500 mb
1M
实现它的最佳方式是什么,用一致性换取可用性和延迟?
我的计划是同时拥有find()和watch()。第一个会给我一个集合中所有文档的迭代器,第二个会通知我同时数据可能发生的变化。
但是有更好的方法吗?
PS 读/写问题可以帮助我吗?
我会尝试使用事务和快照读取问题。