Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge serverless functionality from @elastic/elasticsearch-serverless #2695

Merged
merged 4 commits into from
Apr 3, 2025

Conversation

JoshMock
Copy link
Member

@JoshMock JoshMock commented Apr 3, 2025

@elastic/elasticsearch-serverless is being deprecated, so all appropriate serverless functionality is being merged back into the main stack client.

This PR exposes a new option, serverMode, which can be either "stack" or "serverless". "stack" keeps all defaults consistent with current behavior. "serverless" modifies a few defaults:

  • turns off sniffing and ignores any sniffing-related options
  • ignores all nodes passed in config except the first one, and ignores any node filtering and selecting options
  • enables compression and TLSv1_2_method (same as when configured for Elastic Cloud)
  • adds an elastic-api-version HTTP header to all requests
  • uses CloudConnectionPool by default instead of WeightedConnectionPool
  • turns off vendored content-type and accept headers in favor or standard MIME types

Also adds documentation to reflect the change.

Fixes #2459.

@JoshMock JoshMock merged commit e8dc747 into main Apr 3, 2025
23 checks passed
@JoshMock JoshMock deleted the merge-serverless branch April 3, 2025 19:42
github-actions bot pushed a commit that referenced this pull request Apr 3, 2025
…#2695)

* Expose a serverMode option to enable serverless-friendly defaults

* Update basic config docs to note how the serverMode flag works

* Docs cleanup

* Add another note to docs about connecting to serverless

(cherry picked from commit e8dc747)
JoshMock added a commit that referenced this pull request Apr 3, 2025
…#2695) (#2696)

* Expose a serverMode option to enable serverless-friendly defaults

* Update basic config docs to note how the serverMode flag works

* Docs cleanup

* Add another note to docs about connecting to serverless

(cherry picked from commit e8dc747)

Co-authored-by: Josh Mock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge serverless client back into stack
1 participant