shiny new http shit

24
Shiny new* HTTP shit. Mark Nottingham * or coming sometime soon. Or old shit that you probably don’t know about.

Upload: mark-nottingham

Post on 29-Jan-2018

3.200 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Shiny New HTTP Shit

Shiny new* HTTP shit.Mark Nottingham

* or coming sometime soon. Or old shit that you probably don’t know about.

Page 2: Shiny New HTTP Shit

New Specs.

Page 3: Shiny New HTTP Shit

HTTPbis

• IETF Working Group to clean up the mess.

• One 176 page spec -> Seven modular specs

• Mere mortals SHOULD now be able to understand.

Page 4: Shiny New HTTP Shit

header i18n

• HTTP/1.1 makes headers Latin-1

• Can encode using RFC2231, but that’s freaking MIME!

• Asia, rest of world: “pls fix this kthxbye.”

• draft-reschke-rfc2231-in-http

Page 5: Shiny New HTTP Shit

HTTPstate

• Netscape Specification - NOT COMPLETE

• RFC2109 - WRONG

• RFC2965 - FAIL

• IETF Working Group to document reality.

Page 6: Shiny New HTTP Shit

Stale Controls

• Two Cache-Control extensions:

• Hide latency by serving stale content while doing an async refresh.

• Serve stale content if there’s a problem.

• RFC5861

Page 7: Shiny New HTTP Shit

Prefer

• Allow clients to ask for an empty response

• E.g., on a POST / PUT API

• draft-snell-http-prefer-02

Page 8: Shiny New HTTP Shit

Link

• HTTP header to express typed links

• Coordination between Atom, HTML5, W3C TAG, RDF, IETF, IESG...

• Registry of link relation types

• Build protocols -- e.g., discovery

• draft-nottingham-http-link-header-10

Page 9: Shiny New HTTP Shit

PATCH

• Send a diff to a resource to update it

• Think of it as a partial PUT

• Requires client support

• RFC5789

Page 10: Shiny New HTTP Shit

CORS

• “Cross-Origin Resource Sharing”

• Protocol to enable cross-site requests

• e.g., in XmlHttpRequest

Page 11: Shiny New HTTP Shit

Misc. Security Headers

• X-Content-Security-Policy

• X-Content-Type-Options

• X-Download-Options

• X-Frame-Options

• X-XSS-Protection

Page 12: Shiny New HTTP Shit

Shit that Might Happen.

Page 13: Shiny New HTTP Shit

Optimised Long Poll

• (a.k.a. Comet)

• Intermediary fan-out

• Connection hinting

Page 14: Shiny New HTTP Shit

Signed Responses

• Intermediaries should look but not touch.

• Signing the response bytes + some headers

• Allows caches to work without worrying about integrity / modification.

• SINE

Page 15: Shiny New HTTP Shit

SPDY

• HTTP header compression

• Connection multiplexing

• Semi-binary encoding

• Two-way?

Page 16: Shiny New HTTP Shit

New Implementations.

Page 17: Shiny New HTTP Shit

Apache Traffic Server

• 4 Core HT box = 75,000 req/sec

• 16ms latency at that load

Page 18: Shiny New HTTP Shit

node.js

• Just really cool.

Page 19: Shiny New HTTP Shit

Other Shit.

Page 20: Shiny New HTTP Shit

Back-End Caching

• Memcache vs. [ Squid | Traffic Server ]

Page 21: Shiny New HTTP Shit

Browsers

• BrowserScope

Page 22: Shiny New HTTP Shit

Browser APIs

• Cache-Control

• Connection hinting

• Invalidation

Page 23: Shiny New HTTP Shit

Edge Processing

• ESI

Page 24: Shiny New HTTP Shit

REDbot

• Check your HTTP resources for common problems, cacheability and more:http://redbot.org/