iOhYes Retired

iOhYes

A podcast by iOS developers for iOS developers, delivering news, tips, and rants for professional iOS/Mac developers, with something for enterprise and indie developers alike.

Hosted by Darryl Thomas and John Sextro.



← Previous Episode   |   Next Episode →

101: HTTP/2 101

February 11, 2016 at 1:45PM • 1 hour 11 minutes • Wiki Entry

Discussion

HTTP/1.1 review

  • Widespread adoption in 1996 with full standard in 1997 RFC 2068 and later replaced with one in 1999 RFC 2616
  • Request (URL, method, headers, body) & Response (status code, headers, body)
  • Inherently async
  • Built for HyperText, makes it have problems
    • Head of line blocking
      • combining payloads to 1 response
      • multiple connections (Connection: Keep-Alive vs Close)
      • HTTP Pipelining
    • No cancellation, have to tear down connection
    • No prioritization, round robin over connections
  • iOS/Mac
    • NSURLRequest (NSHTTPURLRequest) and NSURLResponse (NSHTTPURLResponse)
    • NSURLConnection and NSURLSession

HTTP/2

  • Started by Google with SPDY (2012 - 2016), latest is SPDY/3.1
  • HTTP/2 is a binary protocol, where 1 and 1.1 are text
  • Previous episode on SPDY with M Schore
  • Reached standard in 2015 with RFC 7540 and adopted by Apple with iOS 9, Mac OS X 10.11
  • Resolves many issues with new features:
    • multiplexing (helps with head of line problem in HTTP/1.1)
      • cancellation
      • header compression
        • Always there
        • plain text, optimal for compression
      • dynamic prioritization
  • be responsible, set lower priority when possible
    • not guaranteed that the server will prioritize because it is optional in HTTP/2 spec
    • push responses (Nolan’s not a fan)
      • not supported by Apple
  • Upgrade to HTTP/2 dynamically with Upgrade Header or ALPN

Picks

Nolan

Darryl

John

Jason

Thanks to Braintree for sponsoring this episode of iOhYes. If you're building a mobile app and searching for a simple payments solution, check out Braintree. For your first $50,000 in transactions fee-free, go to braintreepayments.com/yes.




Show Notes & Links Presented by CacheFly

Tweet Shoutouts

Alternative show title suggestions

  • Inherently Asynchronous
  • Not in the Megabits
  • I do, do that
  • Feeding the streams
  • Don’t hit those people
  • Unilateral messaging
  • Dabbling in quantified self