Direct Mode

From Ilianko
Revision as of 15:07, 26 October 2026 by Anko (talk | contribs) (Recreated DP-420 term page: Direct Mode (Client Connectivity & SDK))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

← Back to DP-420 Terminology Reference

Category: Client Connectivity & SDK

Summary: SDK connectivity direct to backend replicas over TCP; lower latency, more ports needed.

Overview

Direct mode is an Azure Cosmos DB SDK connectivity mode where the client connects directly to backend replicas over TCP, bypassing the gateway for data operations after initial address resolution. It typically offers better performance and lower latency than gateway mode, but requires more open ports and is less firewall-friendly.

More Info & Links

DP-420 Style Practice Questions

Q1. Which connectivity mode generally offers the best performance for the Azure Cosmos DB SDK?

  • A. Direct mode
  • B. Gateway mode
  • C. REST mode
  • D. Batch mode

Q2. What is a downside of using direct mode in a restrictive network environment?

  • A. It requires more open ports, making it less firewall-friendly than gateway mode
  • B. It cannot be used with the .NET SDK
  • C. It disables session consistency
  • D. It prevents the use of point operations

Answer Key

Answers are listed at the very end so you can attempt the questions first.

  • Q1 (Direct Mode): A. Direct mode — Direct mode connects straight to backend replicas over TCP, typically offering the lowest latency and best performance.
  • Q2 (Direct Mode): A. It requires more open ports, making it less firewall-friendly than gateway mode — Direct mode needs broader port access for TCP connections, which can be problematic behind restrictive firewalls.

DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page