Skip to content

Changed connection mode from Gateway to Direct#204

Merged
xenobiasoft merged 1 commit into
mainfrom
feature/switch-connection-mode-for-cosmos
Apr 12, 2026
Merged

Changed connection mode from Gateway to Direct#204
xenobiasoft merged 1 commit into
mainfrom
feature/switch-connection-mode-for-cosmos

Conversation

@xenobiasoft

Copy link
Copy Markdown
Owner

Description

Changed connection mode from Gateway to Direct

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • Changed connection mode from Gateway to Direct

Testing

  • I have tested these changes locally
  • All existing tests pass
  • I have added new tests (if applicable)

Screenshots (if applicable)

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have updated the documentation (if necessary)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Cosmos DB client configuration in the backend infrastructure to use Direct connectivity mode, which can improve latency/throughput characteristics compared to Gateway in some environments.

Changes:

  • Switched CosmosClientOptions.ConnectionMode from Gateway to Direct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 47 to 51
var clientOptions = new CosmosClientOptions
{
ConnectionMode = ConnectionMode.Gateway,
ConnectionMode = ConnectionMode.Direct,
RequestTimeout = TimeSpan.FromSeconds(30),
MaxRetryAttemptsOnRateLimitedRequests = 3,
@xenobiasoft xenobiasoft merged commit 6c4c819 into main Apr 12, 2026
9 checks passed
@xenobiasoft xenobiasoft deleted the feature/switch-connection-mode-for-cosmos branch April 12, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants