Azure / Azure/azure-sdk-for-java

[FEATURE REQ] [Thin client]: Auto-enable thin client under gateway mode

Open
#42,890 0 comments 1 reaction 3 assignees Claimed by @jeet1995 View on GitHub
Client Cosmos cosmos-java-ecosystem-se-planning cosmos:v4-item
Dominant language
Java
Stars
2.6k
Forks
2.2k
Avg merge
2d 9h
Merged PRs (30d)
199

Description

## Summary

When a user calls `CosmosClientBuilder.gatewayMode()`, the SDK should automatically route through the thin client proxy (port 10250) if the account's gateway metadata response indicates a thin client endpoint is available. No new `ConnectionMode` enum value is needed — thin client IS gateway mode, just over HTTP/2 to a co-located proxy instead of HTTPS to the gateway frontend.

## Expected Behavior

- `gateway()` mode auto-detects thin client endpoint from gateway metadata response
- If available, routes data plane requests through thin client proxy (port 10250)
- Metadata/control plane requests continue to use port 443
- System property `COSMOS.THINCLIENT_ENABLED=false` available as opt-out escape hatch
- No new public API surface — transparent to users

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.