Skip to content

Evaluate ScyllaDB as a potential DB to improve write-heavy PushPull #1351

@hackerwins

Description

@hackerwins

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 updates checkpoints and versionvectors 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:

Image

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

Why is this needed:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement 🌟New feature or requesthard 🧑‍🔬Difficult to deal with or require research

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions