Artwork

Content provided by 5by5 Broadcasting. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by 5by5 Broadcasting or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

108: Peeling the Onion on Networking

1:15:35
 
Share
 

Manage episode 125866422 series 27172
Content provided by 5by5 Broadcasting. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by 5by5 Broadcasting or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

Discussion

Testing normal networks (aka, not the US)

  • 62.5% of the world’s 3.2 Billion internet users have 2G connections (or worse). That number is growing. LTE speeds aren’t going to catch up for at least a decade if not much longer.
  • When building robust networking between your client apps and your services, the common case should be the default case. AKA: not WiFi and not LTE.
  • Things that help a great deal:
    • Test on 2G and flaky networks
      • Helps to do real world testing in parking garages, elevators and in transit.
      • Simulation will be the highest reproducible ROI way to test
    • Fail fast and accurately. Timeouts play a part in this.
    • Be dynamic with how you handle the network.
      • Slower speeds should have less networking
    • Use modern tech, like HTTP/2
    • Defer, defer, defer (and prioritize)
    • Robustly handle errors
      • If at first you don’t succeed, try again! And again and again. Retry policies can get you from one-9 of success to three-9s very simply.
    • Design your network API in a robust manner!
  • Simulating bad connections:
  • Timeouts

    • List of timeouts:
      • TCP: connection timeout (TLS connection timeout too), SYN timeout, keepalive/idle timeout, retransmission timeout
      • NSURL: request timeout (max time between data being received in response - default is 60 seconds), resource timeout (time for entire transfer to complete - default is 7 days)
      • Custom timeouts: transaction timeouts (time from initiation to completion including redirects and retries), queue timeout (how long can the request be queued without starting before it times), idle timeout (how long can a request do nothing regarding upload or download before timeout)
    • NSURLSession has a problem with scale. Every different configuration setting requires another NSURLSession to be maintained and managed. Timeouts, different default headers, different TLS settings, different cookie settings, different NSURLCache, cellular vs non-cellular
  • Robust API design

    • Transactional APIs
    • Robust error codes (not just HTTP status codes!)
  • Retry policies to the rescue

Picks

Darryl

  • Pain Free Constraints with Layout Anchors - A bit of follow-up from last week’s episode. I felt like John and I were having trouble explaining anchors, and I remembered this article from a few weeks back.

Nolan

Alternative show title suggestions

  • Just remember: You’re wrong
  • Not all requests are made equal
  • Item potency
  continue reading

100 episodes

Artwork
iconShare
 
Manage episode 125866422 series 27172
Content provided by 5by5 Broadcasting. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by 5by5 Broadcasting or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

Discussion

Testing normal networks (aka, not the US)

  • 62.5% of the world’s 3.2 Billion internet users have 2G connections (or worse). That number is growing. LTE speeds aren’t going to catch up for at least a decade if not much longer.
  • When building robust networking between your client apps and your services, the common case should be the default case. AKA: not WiFi and not LTE.
  • Things that help a great deal:
    • Test on 2G and flaky networks
      • Helps to do real world testing in parking garages, elevators and in transit.
      • Simulation will be the highest reproducible ROI way to test
    • Fail fast and accurately. Timeouts play a part in this.
    • Be dynamic with how you handle the network.
      • Slower speeds should have less networking
    • Use modern tech, like HTTP/2
    • Defer, defer, defer (and prioritize)
    • Robustly handle errors
      • If at first you don’t succeed, try again! And again and again. Retry policies can get you from one-9 of success to three-9s very simply.
    • Design your network API in a robust manner!
  • Simulating bad connections:
  • Timeouts

    • List of timeouts:
      • TCP: connection timeout (TLS connection timeout too), SYN timeout, keepalive/idle timeout, retransmission timeout
      • NSURL: request timeout (max time between data being received in response - default is 60 seconds), resource timeout (time for entire transfer to complete - default is 7 days)
      • Custom timeouts: transaction timeouts (time from initiation to completion including redirects and retries), queue timeout (how long can the request be queued without starting before it times), idle timeout (how long can a request do nothing regarding upload or download before timeout)
    • NSURLSession has a problem with scale. Every different configuration setting requires another NSURLSession to be maintained and managed. Timeouts, different default headers, different TLS settings, different cookie settings, different NSURLCache, cellular vs non-cellular
  • Robust API design

    • Transactional APIs
    • Robust error codes (not just HTTP status codes!)
  • Retry policies to the rescue

Picks

Darryl

  • Pain Free Constraints with Layout Anchors - A bit of follow-up from last week’s episode. I felt like John and I were having trouble explaining anchors, and I remembered this article from a few weeks back.

Nolan

Alternative show title suggestions

  • Just remember: You’re wrong
  • Not all requests are made equal
  • Item potency
  continue reading

100 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide