http2

Can I enable HTTP/2 for specific server blocks (virtual hosts) only, on Nginx?

浪子不回头ぞ 提交于 2019-12-10 17:27:14
问题 I have several virtual hosts on nginx . Can I enable HTTP/2 for specific virtual hosts only on nginx ? When I enable HTTP/2 for a virtual host, like: server { listen 443 ssl http2; server_name a.b.com; ... } I can access a.b.com by HTTP2.0. But now every other virtual host on the same nginx supports HTTP/2 too. But I want to access them only by HTTP/1.1 . Is the http2 directive at server level? 回答1: Short answer: not possible on your current setup. When starting, nginx first creates a

High level client for golang http2 server push

元气小坏坏 提交于 2019-12-10 14:54:35
问题 golang 1.6 was released with Http2 support. I googled online but couldn't find any examples of how to do Http2 server push using Go. Is there any high level client implemented for that? Is there any examples that people have already done? 回答1: The http2 implementation in the std library doesn't expose http2-specific interfaces, however you can use golang.org/x/net/http2 directly. https://godoc.org/golang.org/x/net/http2#Framer.WritePushPromise 来源: https://stackoverflow.com/questions/37872924

Why does App Engine Flexible Enviroment not allow WebSockets and HTTP/2 traffic?

♀尐吖头ヾ 提交于 2019-12-10 12:14:45
问题 I'm more interested in WebSocket, but after reading documentation here, I was surprised when I read that: The following features are not supported by App Engine flexible environment: HTTP/2 traffic to the backend service, Websockets , HTTP requests that directly access instances I was planning to build an app with gorilla-websocket, but now that I've read this, I don't know how I could accomplish it. I understand WebSocket is not get supported in App Engine Standard Environment, but why not

How to enable h2c in Nginx?

做~自己de王妃 提交于 2019-12-10 10:18:11
问题 Is there a way to enable h2c aka HTTP2 cleartext in Nginx 1.9.5 onward? I've tried using h2 over TLs in https://chronic101.xyz and it works, however I would like to implement h2c on port 80 as well. Thanks, chrone 回答1: It should be as simple as adding http2 in the end of your listen directive. Example: server { listen 80 http2; However, keep in mind that most browsers do not support unencrypted HTTP/2, and so will still serve content as HTTP/1.1. 来源: https://stackoverflow.com/questions

How does a browser know if a site supports HTTP/2?

主宰稳场 提交于 2019-12-09 14:09:30
问题 If I type out https://http2.golang.org/ the chrome browser will automatically send the HTTP/2 request. How is this done? 回答1: Take stackoverflow for example, when the browser sends a request to stackoverflow.com , it has to do the following steps: DNS lookup. find the ip address of stackoverflow. TCP/IP handshake TLS handshake. HTTP request/response (Application Protocol). .... TLS handshake Regarding step3 TLS handshake, there is an nice explanation by @Oleg. In order to inspect the detail

HTTP2 and NGINX - when would I use a keepalive directive?

做~自己de王妃 提交于 2019-12-09 05:57:49
问题 I am experimenting with migration to http/2. I have set up a Wordpress website and configured NGINX to serve it using http/2 (using SSL/TLS). My understanding of http/2 is that by default it uses one connection to transfer a number of files - rather than opening new connections and repeating SSL handshakes for each file. To achieve a similar effect for http/1.x, NGINX offered the keepalive directive. So does using the keepalive directive make sense when using http/2 exclusively? Checking my

Tomcat 8.5.29 HTTP/2 is not supporting GZIP compression

爷,独闯天下 提交于 2019-12-08 19:58:26
I am using Tomcat 8.5.29 and using the respective configuration,I have enabled the HTTP2 support for the site. Below is the configuration in server.xml file. <Connector port="443" protocol="org.apache.coyote.http11.Http11AprProtocol" maxThreads="150" SSLEnabled="true" compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json" compression="on" compressionMinSize="1024" > <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> <SSLHostConfig> <Certificate certificateKeyFile="conf/localhost-key.pem" certificateFile="conf

Why is my server slow and SSL mismatching when combining IPv4 with IPv6

喜夏-厌秋 提交于 2019-12-08 16:00:19
问题 I'm setting up a new server with Ubuntu 18.04.1 Nginx 1.14.0 with HTTP2 and PHP 7.2.7 This is the first server that I try to setup with both IPv4 and IPv6 enabled. Everything works fine until I tested a page with a lot of missing images. It seems to take forever for the server to realise they are missing and respond to the http request. Some missing files give a HTTP status of "502 bad gateway". Is it a DNS problem that causes these delays and 502 errors and what should I change in the setup?

.NET 4.6 HttpResponse.PushPromise methods to manage http/2 PUSH_PROMISE header

跟風遠走 提交于 2019-12-08 11:22:27
I am a bit confused about PUSH PROMISE http/2 header handling in .NET4.6 . When I look HttpResponse.PushPromise there are two overloads: One that accepts path to resource public void PushPromise(string path) - am assuming resource is then read and binary sent across to client. Second public void PushPromise(string path, string method, NameValueCollection headers) that accepts sting method and NameValueCollection headers which I am failing to understand. Why would I want to pass method (assuming HttpMethod like GET, POST, etc) and collection of headers inside PUSH PROMISE header? From reading

What is the difference between HTTPS Load-Balancer w/ non-TLS backend and HTTPS Load-Balancer w/ TLS backend

亡梦爱人 提交于 2019-12-08 09:10:38
I'm trying to configure load balancer to serve in HTTPS with certificates provide by Lets Encrypt , even though I couldn't do it yet, reading this article gives steps how to configure Self-signed certs Network Load-Balancer w/ TLS backend HTTPS Load-Balancer w/ non-TLS backend HTTPS Load-Balancer w/ TLS backend As I'm intersting only in HTTPS, I wonder what is the difference between this two: HTTPS Load-Balancer w/ non-TLS backend HTTPS Load-Balancer w/ TLS backend But I meant not the obvious reason that is the first one is not encrypted from load balancer to backend, I mean in performance and