Netflix / zuul

Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.
Apache License 2.0
13.49k stars 2.37k forks source link

Zuul Netty Logs showing that the calls are still going as HTTP1.1 after enabling HTTP2 in Zuul 2.0 #584

Closed ronisac closed 6 days ago

ronisac commented 5 years ago

Hi All,

I have enabled HTTP2 in Zuul 2.0 server. And the same is up and running in our cloud test environment. But when I have enabled the INFO logs for Zuul Netty, I could see the logs are showing me that the API calls are still made with HTTP1.1 instead of HTTP2 at Netty level.

Please see the following logs for the same.

2019-05-20 11:06:44,017 INFO  zuul.server.nettylog [Salamander-ClientToZuulWorker-0] [id: 0x1b008d36, L:/10.16.3.72:443 - R:/10.1.1.87:49250] USER_EVENT: SslHandshakeCompletionEvent(SUCCESS)
2019-05-20 11:06:44,018 INFO  zuul.server.nettylog [Salamander-ClientToZuulWorker-0] [id: 0x1b008d36, L:/10.16.3.72:443 - R:/10.1.1.87:49250] READ COMPLETE
2019-05-20 11:06:44,035 INFO  zuul.server.nettylog [Salamander-ClientToZuulWorker-0] [id: 0x1b008d36, L:/10.16.3.72:443 - R:/10.1.1.87:49250] USER_EVENT: com.netflix.netty.common.HttpLifecycleChannelHandler$StartEvent@2d43172d
2019-05-20 11:06:44,040 INFO  zuul.server.nettylog [Salamander-ClientToZuulWorker-0] [id: 0x1b008d36, L:/10.16.3.72:443 - R:/10.1.1.87:49250] READ: DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
POST /aggregationservice/0.0.1/rest/genie HTTP/1.1
Connection: upgrade
Host: xxxxxx
Content-Length: 0
origin: https://xxxx.xxxxx.io
x-xsrf-token: 7e7da2df-647b-4831-9f24-1e97b0fe9a30
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36
content-type: application/json
accept: application/json, text/plain, */*
genieclient: mesh
geniebrand: worldpay
referer: https://xxxxxx.xxxxxxx.io/?xxxxxxx
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cookie: cg=mh_wp_gg_gcp; JSESSIONID=5D5300DADC281BA87CE6F66EC307B758; XSRF-TOKEN=7e7da2df-647b-4831-9f24-1e97b0fe9a30
2019-05-20 11:06:44,108 INFO  zuul.server.nettylog [Salamander-ClientToZuulWorker-1] [id: 0x8e90e4d7, L:/10.16.3.72:443 - R:/10.16.3.1:49256] USER_EVENT: SslHandshakeCompletionEvent(SUCCESS)
2019-05-20 11:06:44,111 INFO  zuul.server.nettylog [Salamander-ClientToZuulWorker-1] [id: 0x8e90e4d7, L:/10.16.3.72:443 - R:/10.16.3.1:49256] USER_EVENT: com.netflix.netty.common.HttpLifecycleChannelHandler$StartEvent@479d8db
2019-05-20 11:06:44,112 INFO  zuul.server.nettylog [Salamander-ClientToZuulWorker-1] [id: 0x8e90e4d7, L:/10.16.3.72:443 - R:/10.16.3.1:49256] READ: DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
GET /aggregationservice/0.0.1/ws/genie HTTP/1.1
Upgrade: websocket
Connection: upgrade
Host: xxxxxxx
Pragma: no-cache
Cache-Control: no-cache
Origin: https://xxxxx.io
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: cg=mh_wp_gg_gcp; JSESSIONID=5D5300DADC281BA87CE6F66EC307B758; XSRF-TOKEN=7e7da2df-647b-4831-9f24-1e97b0fe9a30
Sec-WebSocket-Key: Mf6dzvochTmvfuwMC0dxXw==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
2019-05-20 11:06:44,194 INFO  zuul.origin.nettylog.AGGREGATIONSERVICE-0-0-1-SNAPSHOT [Salamander-ClientToZuulWorker-1] [id: 0x7fc0aa3d] REGISTERED
2019-05-20 11:06:44,194 INFO  zuul.origin.nettylog.AGGREGATIONSERVICE-0-0-1-SNAPSHOT [Salamander-ClientToZuulWorker-0] [id: 0x8adaf055] REGISTERED
ronisac commented 5 years ago

As per my analysis, "ApplicationProtocolNegotiationHandler" object is getting SslHandler object with null protocol. Hence it is getting defaulted to fallbackprotocol which is HTTP1.1 I am setting the server type as HTTP2 in my server startup class.

Can anybody please help what is going wrong? Is this is a Netflix Zuul2.0 issue?

ronisac commented 5 years ago

@artgon ... Could you please let me know whether I am missing something while enabling HTTP2 or netflix will be fixing this issue in upcoming release?

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 6 days ago

This issue was closed because it has been stalled for 7 days with no activity.