per request, 20min.ch: 400-600 requests Head of line blocking • 6 TCP Connections per Origin ( 6x protocol overhead) • Breaks TCP • http pipelining never took off, disabled
• No cache • Breaks priorization Concatenation • Ships to much, bad cache control • Cache invalidation expensive • Delayed execution! (needs full .js / .css) Domain sharding • Chrome limits to less than 10 parallel images • Use max 2 http://perf.fail/post/96104709544/zealous-sharding-hurts-etsy-performance
of the website • HTTPS protects the privacy and security of the user • HTTPS enables new powerful features on the web (users geolocation, taking pictures, recording video, enabling offline app experiences ) https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only https://blog.mozilla.org/security/2015/04/30/deprecating-non-secure-http/
send Application Data while last Hand Shake RT is in flight Restrictions by browsers: Protocol announcement ALPN (Chrome and Firefox) Ciphers with forward secrecy (Safari)
2.0 • Server needs storage stateless resumption: "Session Ticket" (RFC 5077) • Server encyrpts session settings, client saves them • No server storage • Still loadbalancers need to be initializedwiththe same key https://github.com/vincentbernat/rfc5077 tool for testing
CA can be queried, can add 350ms (!) latency and fails 15/100 https://blog.mozilla.org/security/2015/11/23/improving-revocation-ocsp-must-staple-and-short-lived-certificates/ OCSP Stapling: • Server makes OSCP request, gets signed • Server sends data within the handshake • config setting in your server
can only be consumed in full => Blocks that span TCP Segments might be delayed Small records incur overhead, large records incur latency => Dynamic record sizing, see isTLSfastYet.com for support
them in August) 256bit: RSA: 15360bit vs. EC: 521bit https://www.symantec.com/content/en/us/enterprise/white_papers/b-wp_ecc.pdf https://blog.cloudflare.com/ecdsa-the-digital-signature-algorithm-of-a-better-internet/
X 10.6 or later: • Internet Explorer 7 • Firefox 2 • Opera 8 (with TLS 1.1 enabled) • Google Chrome v5.0.342.0 • Safari 2.1 Mobile Browsers • Mobile Safari for iOS 4.0 • Android 3.0 (Honeycomb) and later • Windows Phone 7 https://support.cloudflare.com/hc/en-us/articles/203041594-What-browsers-work-with-CloudFlare-s-SSL-certificates-
HTTP Public Key Pinning (HPKP) Content-Security-Policy Upgrade all requests HTTPS. Content-Security-Policy-Report-Only : report violations to an endpoint
HEADER (HPACK compressed http headers) 0x2 PRIORITY (tell peer which streams to priorize) 0x3 RST_STREAM (terminate a stream) 0x4 SETTINGS - one MUST be sent at the beginning (empty for ACK). PER CONNECTION 0x5 PUSH_PROMISE (opens a stream from the sender) 0x6 PING (has priority!) 0x7 GOAWAY (shutdown connection) 0x8 WINDOW_UPDATE (for flow-control of DATA frames, per stream or per Connection) 0x9 CONTINUATION ( more 0x1 HEADER)
be cacheable • It is not possible to push a response to a request that includes a request body. (headers are specified) • Servers can become intelligent! (CASPER in h2o ) • Client can control or disable it https://h2o.examp1e.net/configure/http2_directives.html https://webtide.com/http2-push-with-experimental-servlet-api/
1: http headers for index html 2. Server: Push Promise for each asset in index.html 3. Server: http headers for each of the assets Server: Data Frames for Stream 1 (highest prio) Server: Other data frames with respective prio
as binary RPC calls ! Prediction most future APIs will use H2 You get API clients for free (e.g. curl!) Example SQL: Header Compression Table can be used in creative ways: Store SQL Prepared statements in a Header, transfer only variables!
via alt names in your Cert + CNAME) • Remove your asset pipeline (and think about caching) • Remove all Inlining • Add Preconnect Hints in your Application Server * • Pimp your H2 Server (priorization, server push etc). • Innovate & find new patterns * Add a Link: Http header that refers to the assets to load Enables CASPER (Cache aware server push): https://h2o.examp1e.net/configure/http2_directives.html#http2-casper