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

Does ETCD server support HTTP 2.0 request messages from client #10620

Closed
sanamsarath opened this issue Apr 8, 2019 · 2 comments
Closed

Does ETCD server support HTTP 2.0 request messages from client #10620

sanamsarath opened this issue Apr 8, 2019 · 2 comments

Comments

@sanamsarath
Copy link

etcd version 3.3.2

I am having a etcd client library developed in c++, and is using restful api (HTTP requests) instead of gRPC. we are planning to update the cleint library to use HTTP 2.0.

I am seeing some issues while using --http2-prior-knowledge with curl request while adding/updating the data. Can some one help me if I am using the http2 request correctly. following is the curl command I tried an I see that etcd server is not responding back.

[root@etcd-server-1-0-0-64df58ff74-7p6ms /]# curl -d '{"key": "Zm9v", "value": "YmFy"}' -X POST http://127.0.0.1:2379/v3beta/kv/put -vvv     curl --http2-prior-knowledge -X POST http://127.0.0.1:2379/v3beta/kv/put -vvv
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 2379 (#0)
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x555b99037440)
> POST /v3beta/kv/put HTTP/2
> Host: 127.0.0.1:2379
> User-Agent: curl/7.59.0
> Accept: */*
> 
* Connection state changed (MAX_CONCURRENT_STREAMS == -1)!
< HTTP/2 200 
< content-type: application/grpc
< grpc-status: 12
< grpc-message: unknown service v3beta/kv
< 
* Connection #0 to host 127.0.0.1 left intact
[root@etcd-server-1-0-0-64df58ff74-7p6ms /]# 

I believe grpc-Gateway supports http2 from the grpc-ecosystem/grpc-gateway#703.

Thanks,
Sarath.

@skydoctor
Copy link

@gyuho: Any ideas on this? I think the problem is that when the etcd-server received a HTTP/2 request, it follows the gRPC path and the grpc-gateway path is only invoked when a HTTP/1.1 is received. Is there a way to get JSON HTTP/2 requests through the grpc-gateway?

@stale
Copy link

stale bot commented Apr 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 7, 2020
@stale stale bot closed this as completed Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants