-
-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Labels
enhancement 🌟New feature or requestNew feature or requesthard 🧑🔬Difficult to deal with or require researchDifficult to deal with or require research
Description
What would you like to be added:
Yorkie uses a PushPull-based synchronization mechanism to exchange document changes between clients and the server. During each PushPull operation:
- Push: The client pushes local changes to the server.
- Pull: The server responds with changes the client has not yet seen.
- During the
Pull
phase, Yorkie also updatescheckpoints
andversionvectors
to MongoDB, recording which changes the client has received.
As a result, compared to typical web services, Yorkie exhibits a significantly higher write load, and overall performance is tightly coupled to the database's write throughput and durability guarantees.
Current performance
In our current setup (Apple M1 Max / 32GB) using standalone Yorkie + MongoDB 8.0, we achieve:
- 3,000 concurrent connections with presence updates in a single document (skewed workload)
- 10,000 concurrent connections with an even distribution across documents
- https://github.com/yorkie-team/yorkie/tree/main/test/k6#run-the-load-test

Related work: Discord and ScyllaDB
- Discord originally built their message system on MongoDB but transitioned to ScyllaDB to handle scale and improve write performance.
- In a benchmark report by Tractian, ScyllaDB demonstrated 10x better throughput in write-heavy workloads compared to MongoDB.
Given that Yorkie is similarly write-intensive due to its PushPull operations, evaluating ScyllaDB as a backend database might offer significant performance improvements.
Proposal
- Implement a ScyllaDB backend interface in the Yorkie database layer
- Compare performance (especially write latency and throughput) against MongoDB 8.0
- Use the same presence load test to measure improvements
- Decide whether it is viable for high-scale workloads
References
- MongoDB 8.0 performance improvements: https://medium.com/@jsupskills/mongodb-8-0-ready-to-use-with-reduce-memory-and-faster-speed-85a16adc8686
- Tractian’s benchmark and migration to ScyllaDB: https://www.scylladb.com/2023/04/03/mongodb-vs-postgres-vs-scylladb-tractians-benchmarking-and-migration/
Why is this needed:
krapie and sigmaith
Metadata
Metadata
Assignees
Labels
enhancement 🌟New feature or requestNew feature or requesthard 🧑🔬Difficult to deal with or require researchDifficult to deal with or require research
Type
Projects
Status
Backlog