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

Make fixes to client proxy definitions #921

Merged
merged 11 commits into from
Feb 29, 2024
Merged

Conversation

tsmith023
Copy link
Contributor

@tsmith023 tsmith023 commented Feb 28, 2024

This PR fixes the definitions of HTTP/1.1 proxies used through httpx and allows for the definition of an HTTP/2 proxy through grpc with a specific configuration. In order to make use of a gRPC proxy, users will have to bare in mind the limitations of Google's official Python grpc implementation.

To summarise, users should reach for Envoy proxy when configuring any gRPC proxy for themselves. (The Weaviate Cloud Service (WCS) in fact uses this solution in some of its deployments.) For this, their docs should be the first place to look as too should our example that works in our CI within ci/proxy/envoy.yaml. In short, the proxy must accept a CONNECT request and mutate it into a POST request that Weaviate can understand.

Example usage:

with weaviate.connect_to_local(
    additional_config=wvc.init.AdditionalConfig(
        proxies=wvc.init.Proxies(
            http="http://localhost:8070",
            grpc="http://localhost:10000",
        )
    )
) as client:
    ...

@tsmith023 tsmith023 requested a review from a team as a code owner February 28, 2024 16:27
@weaviate-git-bot
Copy link

Great to see you again! Thanks for the contribution.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Slack channel?

integration/test_client.py Outdated Show resolved Hide resolved
@tsmith023 tsmith023 merged commit 1c49aea into main Feb 29, 2024
3 checks passed
@tsmith023 tsmith023 deleted the improve-proxy-definitions branch February 29, 2024 12:05
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.

3 participants