Skip to content

Improve MongoDB connection pooling and clustering #28

@anitnilay20

Description

@anitnilay20

Description

Enhance MongoDB connection management with advanced pooling and cluster support.

Requirements

  • Advanced connection pooling configuration
  • Replica set support
  • Sharded cluster support
  • Read preference configuration
  • Connection monitoring and health checks
  • Write comprehensive tests

Acceptance Criteria

  • Robust connection pooling
  • Full replica set support
  • Sharded cluster compatibility
  • Advanced read preferences

Files to modify

  • beatrix_core/src/mongo.rs
  • beatrix_core/src/mongo/connection.rs (new file)

Example Usage

let db = MongoDatabase::new("mongodb://host1,host2,host3/mydb?replicaSet=rs0")
    .read_preference(ReadPreference::SecondaryPreferred)
    .max_pool_size(50)
    .connect().await?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    connectionsDatabase connection managementmongodbMongoDB database supportperformancePerformance improvements

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions