Skip to content

feat: AWS RDS Limitless Router Balancing #185

@rcollette

Description

@rcollette

Describe the feature

Provide the same ability to load balance across RDS Limitless routers as the JDBC driver does.

Use Case

I'm doing some testing for a SaaS application.

  • I load two batches of 100k rows, to two different shardIds (1,2)
  • Each batch is initiated in parallel with the other (kicked off with no await)
  • Each batch is allocated 6 threads
  • Each batch is microbatched into 1000 records with each of the 6 threads being assigned a microbatch
  • Each microbatch is inserted using EFCore.BulkExtensions.MIT bulk insert
  • Each microbatch gets a new dbContext and thus a new connection from the connection pool.

The behavior that I am seeing is that the insertion time for two batches is twice the time (plus a little more) than it is to insert one batch.

The theory is that this is due the connections being assigned to the same router. It's odd to me that the shard group doesn't handle this and it requires "special" awareness on client. If the client can figure this out, why can't the shardgroup?

Proposed Solution

Do it nearly identical to the AWS JDBC advanced driver.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

The AWS Advanced .NET Data Provider Wrapper version used

n/a

dotnet version used

10.0.0

Operating System and version

macOS 15.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions