Your App and Next Generation Networks



Similar documents
D. SamKnows Methodology 20 Each deployed Whitebox performs the following tests: Primary measure(s)

Network support for TCP Fast Open. Christoph Paasch

Load Balance Mechanism

Operational Problems in IPv6: Fallback and DNS issues

SAN/iQ Remote Copy Networking Requirements OPEN iscsi SANs 1

Bump In Host a Host-based IPv4 to IPv6 Translation

Akamai CDN, IPv6 and DNS security. Christian Kaufmann Akamai Technologies DENOG 5 14 th November 2013

Final for ECE374 05/06/13 Solution!!

Measuring Wireless Network Performance: Data Rates vs. Signal Strength

IP - The Internet Protocol

HP LeftHand SAN Solutions

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

Mobile Communications Chapter 9: Mobile Transport Layer

Iperf Tutorial. Jon Dugan Summer JointTechs 2010, Columbus, OH

1. Introduction What is Axis Camera Station? What is Viewer for Axis Camera Station? AXIS Camera Station Service Control 5

ICS 351: Today's plan. IP addresses Network Address Translation Dynamic Host Configuration Protocol Small Office / Home Office configuration

ITL Lab 5 - Performance Measurements and SNMP Monitoring 1. Purpose

VoIP network planning guide

Empowering Developers to Estimate App Energy Consumption. Radhika Mittal, UC Berkeley Aman Kansal & Ranveer Chandra, Microsoft Research

QUALITY OF SERVICE INTRODUCTION TO QUALITY OF SERVICE CONCEPTS AND PROTOCOLS

networks Live & On-Demand Video Delivery without Interruption Wireless optimization the unsolved mystery WHITE PAPER

TCP for Wireless Networks

Stochastic Forecasts Achieve High Throughput and Low Delay over Cellular Networks

Operating Systems Design 16. Networking: Sockets

VOICE OVER IP AND NETWORK CONVERGENCE

Towards Wearable Cognitive Assistance

Application Delivery Networking

10 Key Things Your VoIP Firewall Should Do. When voice joins applications and data on your network

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Testing & Assuring Mobile End User Experience Before Production. Neotys

Transport Layer Protocols

Managing Apple Devices

Компјутерски Мрежи NAT & ICMP

Networking part 3: the transport layer

LAN TCP/IP and DHCP Setup

Distributed Systems 3. Network Quality of Service (QoS)

Networking Test 4 Study Guide

Introduction to Socket Programming Part I : TCP Clients, Servers; Host information

Internet Protocol: IP packet headers. vendredi 18 octobre 13

TCP Pacing in Data Center Networks

The Case Against Jumbo Frames. Richard A Steenbergen <ras@gtt.net> GTT Communications, Inc.

Visualizations and Correlations in Troubleshooting

Allocating Network Bandwidth to Match Business Priorities

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Application Note. Windows 2000/XP TCP Tuning for High Bandwidth Networks. mguard smart mguard PCI mguard blade

Network Security TCP/IP Refresher

Continuous Integration with Xcode 6

Small is Better: Avoiding Latency Traps in Virtualized DataCenters

Open vswitch and the Intelligent Edge

Chapter 5. Data Communication And Internet Technology

Debugging With Netalyzr

TCP/IP Basis. OSI Model

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

20. Switched Local Area Networks

IPv4/IPv6 Transition for SIP VoIP Applications

Accessing Remote Devices via the LAN-Cell 2

Software changes for Website and Application IPv6 Readiness

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

Yealink VCS Network Deployment Solution

Networking 4 Voice and Video over IP (VVoIP)

IP addressing and forwarding Network layer

VRT Testing What Makes BullsEye Better and Different from the rest (Our competitive Advantage)

How To Manage Performance On A Network (Networking) On A Server (Netware) On Your Computer Or Network (Computers) On An Offline) On The Netbook (Network) On Pc Or Mac (Netcom) On

A Measurement-based Study of MultiPath TCP Performance over Wireless Networks

Cisco Packet Tracer 6.3 Frequently Asked Questions

Virtual Office Network Tests Version 2.0 Revision 1.0 8x8, Inc O'Nel Drive San Jose, CA Phone: Fax:

How do I get to

ADSL MODEM. User Manual V1.0

Multi-Homing Security Gateway

SSVVP SIP School VVoIP Professional Certification

Technical Support Information Belkin internal use only

Internet Control Protocols Reading: Chapter 3

Implementing Cisco Quality of Service QOS v2.5; 5 days, Instructor-led

TCP in Wireless Networks

NEW! CLOUD APPS ReadyCLOUD & genie remote access

Optimizing Background Sync on Smartphones

Challenges of Sending Large Files Over Public Internet

Measure wireless network performance using testing tool iperf

Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?

Cisco AnyConnect VPN Client Installation Guide for Single Factor Authentication: Windows

How the Netflix ISP Speed Index Documents Netflix Congestion Problems

TCP Adaptation for MPI on Long-and-Fat Networks

Computer Networks & Security 2014/2015

"Charting the Course to Your Success!" QOS - Implementing Cisco Quality of Service 2.5 Course Summary

HIGH-SPEED BRIDGE TO CLOUD STORAGE

Multimedia Transport Protocols for WebRTC

PRTG NETWORK MONITOR. Installed in Seconds. Configured in Minutes. Master Your Network for Years to Come.

Corporate Network Services of Tomorrow Business-Aware VPNs

Personal Telepresence. Place the VidyoPortal/VidyoRouter on a public Static IP address

Network Address Translation (NAT)

Performance Measurement of Wireless LAN Using Open Source

A Transport Protocol for Multimedia Wireless Sensor Networks

Measuring YouTube Quality of Experience for Users in Residential ISPs*

PRTG NETWORK MONITOR. Installed in Seconds. Configured in Minutes. Masters Your Network for Years to Come.

Transcription:

System Frameworks #WWDC15 Your App and Next Generation Networks Session 719 Prabhakar Lakhera Core OS Networking Engineer Stuart Cheshire DEST 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Part One Transitioning to IPv6-Only Networks Part Two Reducing Delays in Networking

Transitioning to IPv6-Only Networks

Cellular Data Network IPv4 Access Connectivity IPv4 Server

Cellular Data Network IPv4 Access IPv4 Access Connectivity Connectivity with NAT IPv4 Server

Cellular Data Network IPv4 Access IPv4 Access Connectivity Connectivity with NAT IPv4 Server IPv6 Access Connectivity IPv6 Server

Cellular Data Network 75% Verizon AT&T T-Mobile 50% 25% Jun, 2012 Mar, 2013 Dec, 2013 Sep, 2014 May, 2015

Cellular Data Network IPv4 Access Connectivity with NAT IPv4 Server IPv6 Access Connectivity IPv6 Server

Cellular Data Network IPv4 Server IPv6 Access Connectivity IPv6 Server

Cellular Data Network DNS64 NAT64 IPv4 Server IPv6 Access Connectivity IPv6 Server

Cellular Data Network DNS64 synthesizes IPv6 address for IPv4 server DNS64 NAT64 IPv4 Server IPv6 Access Connectivity IPv6 Server

Cellular Data Network DNS64 synthesizes IPv6 address for IPv4 server NAT64 performs IPv6 to IPv4 address translation DNS64 NAT64 IPv4 Server IPv6 Access Connectivity IPv6 Server

Your App Has To Be IPv6 Ready It will be an app submission requirement later this year!

Step 1 Option Click Sharing

Step 2 Option Click Internet Sharing Step 1 Option Click Sharing Step 3 Turn on NAT64

Step 2 Option Click Internet Sharing Step 1 Option Click Sharing Step 3 Turn on NAT64

NAT64 + DNS64 Internet Sharing IPv6 Access Connectivity IPv4 WAN DNS64 NAT64

Make NAT64 Testing Part of Your Regular Development Process

Top 100 Free ios Applications IPv4-Only Apps 30% 70% IPv6-Savvy Apps * Results for Top 100 Free ios Applications that need Networking

What Breaks? IPv4-only code IPv4-only storage objects: IPv4-only APIs: IPv4-only usage of an API: uint32_t, in_addr, sockaddr_in inet_aton, gethostbyname gethostbyname2(hostname, AF_INET); Pre-flight checks before connecting Checking if device has an IPv4 address Checking for reachability to 0.0.0.0

What Works? Address-family agnostic code Connect without pre-flight If connection succeeds, great If connection fails, handle that gracefully Use higher-layer networking frameworks NSURLSession and CFNetwork-layer APIs RFC 4038 Application Aspects of IPv6 Transition Connect-by-name APIs

What Works? IPv4 address literals, in NAT64 + DNS64 networks New for OS X 10.11 and ios 9 Use higher-layer networking frameworks NSURLSession and CFNetwork-layer APIs Client supplies IPv4 address Literal OS synthesizes IPv6 address

Reducing Delays in Networking

Delay Reduction

Delay Reduction Reliable Network Fallback Explicit Congestion Notification TCP_NOTSENT_LOWAT TCP Fast Open

Delay Reduction Reliable Network Fallback Reduce Connection Setup Stalls Explicit Congestion Notification TCP_NOTSENT_LOWAT TCP Fast Open

Reliable Network Fallback Fringe of Wi-Fi TCP connection not succeeding OS initiates parallel connection over mobile data First to complete wins like RFC 6555 (Happy Eyeballs)

Reliable Network Fallback Fully automatic No more bill shock Use NSURLSession and CFNetwork-layer APIs For best user experience: Better Route Notification Networking with NSURLSession Pacific Heights Thursday 9:00AM

Delay Reduction Reliable Network Fallback Reduce Connection Setup Stalls Explicit Congestion Notification Reduce Network Delays TCP_NOTSENT_LOWAT TCP Fast Open

Test: 10Mb/s Downstream 256kB FIFO queue with Tail Drop vs. CoDel with ECN Gateway Device: CeroWRT 3.10.18-1 (< 1 ms intrinsic delay, so any delay is self-induced queueing delay)

tcptrace http://www.tcptrace.org/

Data Packet

Data Packet Cumulative Acknowledgement Line

Receive Window Ceiling Cumulative Acknowledgement Line Data Packet

Standard FIFO Queue

Standard FIFO Queue

Standard FIFO Queue

Standard FIFO Queue

Standard FIFO Queue

Standard FIFO Queue

Standard FIFO Queue

Standard FIFO Queue

Smart Queueing and ECN CoDel Controlled Delay queueing Limits Bufferbloat Explicit Congestion Notification Signals congestion by marking packets instead of discarding Available in OS X, ios, Windows, Linux, etc.

CoDel with ECN

CoDel with ECN

CoDel with ECN

Conclusions CoDel (or similar Smart Queue Management) helps ECN helps SQM+ECN really helps a lot

TCP for Streaming Video Packet loss causes irregular data delivery to client No problem for file transfer (e.g. sending an email) Big problem for streaming video over TCP YouTube Netflix etc.

Changing Applications Fixed data: Email, file transfer, etc. Fixed data Variable time (as fast as network can manage) Adaptive data: Screen Sharing, Video Streaming, etc. Fixed time Variable data (as much as network can carry in allotted time)

Current State of ECN Servers 56% of Alexa top million web sites already support ECN http://wan.poly.edu/pam2015/papers/4.pdf Clients Routers aren t doing marking Some routers might drop the packets small risk; no reward Routers Clients aren t requesting ECN Enabling ECN might expose code bugs small risk; no reward

Apple Is Taking the Initiative ECN now enabled in OS X 10.11 and ios 9 Test on your own home and work networks Report bugs to Apple We could have a billion ios devices using ECN! Finally, an incentive for ISPs to start offering ECN packet marking All apps get this for free

Delay Reduction Reliable Network Fallback Reduce Connection Setup Stalls Explicit Congestion Notification Reduce Network Delays TCP_NOTSENT_LOWAT Reduce Sender-Side Delay TCP Fast Open

Screen Sharing Screen Sharing to home Mac over DSL 5 Mb/s downlink, 500 kb/s uplink 3-second delay on Screen Sharing But ping time is 35 ms Huh?

Socket Send Buffer Socket Send Buffer is 128 kilobytes Need send buffer large enough to hold Bandwidth-Delay Product (BDP) Any additional buffering just adds extra delay At approximately 50 kb/sec transfer rate 128 kilobytes = 2.5 seconds of delay

Socket Send Buffer Data waiting to be sent BDP Data in flight

Socket Send Buffer At approximately 50 kb/sec transfer rate 128 kilobytes = 2.5 seconds Delay is in host, not just the network Do screen frames have to be aged in oak barrels before they re fit for consumption?

TCP_NOTSENT_LOWAT setsockopt(skt, IPPROTO_TCP, TCP_NOTSENT_LOWAT, &threshold, sizeof(threshold)); Socket Send Buffer remains at 128 kilobytes But kevent() doesn t report socket as writable until the unsent TCP data drops below specified threshold (typically 8 kilobytes) Application then writes next single semantic unit of data

TCP_NOTSENT_LOWAT setsockopt(skt, IPPROTO_TCP, TCP_NOTSENT_LOWAT, &threshold, sizeof(threshold)); Socket Send Buffer remains at 128 kilobytes But kevent() doesn t report socket as writable until the unsent TCP data drops below specified threshold (typically 8 kilobytes) Application then writes next single semantic unit of data

Socket Send Buffer Data waiting to be sent BDP Data in flight

Buffer Reaches Threshold Data waiting to be sent BDP Data in flight

Application Sends Next Chunk Write One Atomic Semantic Unit Data waiting to be sent BDP Data in flight

Demo

TCP_NOTSENT_LOWAT Screen Sharing now using this in 10.10.3 and later Used by AirPlay Available in Linux too, for your server software

Good for All Applications Obvious benefit for real time applications But all applications benefit Use the NSURLSession and CFNetwork-layer APIs When runloop reports socket is writable: Write a single semantic atomic chunk Don t loop until EWOULDBLOCK

Delay Reduction Reliable Network Fallback Reduce Connection Setup Stalls Explicit Congestion Notification Reduce Network Delays TCP_NOTSENT_LOWAT Reduce Sender-Side Delay TCP Fast Open Accelerating the TCP handshake

TCP Fast Open Accelerating the TCP handshake TCP handshake takes one round-trip-time Handshake Time

TCP Fast Open Accelerating the TCP handshake TCP handshake takes one round-trip-time Handshake Data can only be sent afterwards Data Time

TCP Fast Open Accelerating the TCP handshake TCP Fast Open TCP Fast Open Combines the handshake with data 50% latency reduction for short flows Handshake + Data Secured through Cookie-exchange Only for idempotent data Time

TCP Fast Open Only for Idempotent Data Handshake + Data Server acts and replies Time

TCP Fast Open Only for Idempotent Data Handshake + Data Server acts and replies Server acts and replies again Time

TCP Fast Open How to use it? Socket API - Using connectx() system call to combine handshake with data: connectx(fd,..., DATA_IDEMPOTENT CONNECT_RESUME_ON_READ_WRITE,...); // SYN delayed write(fd,...); // SYN goes out with first data segment Server-side - Must support TFO and application has to opt-in - ios/os X: Socket-option TCP_FASTOPEN - Linux (requires v4.1+)

Summary Use NSURLSession and CFNetwork-layer APIs Test on NAT64 + DNS64 network Reliable Network Fallback Better Route notifications Explicit Congestion Notification TCP_NOTSENT_LOWAT Don t over-stuff TCP Fast Open technology preview

More Information Documentation and Videos Networking Programming Topics https://developer.apple.com/library/ios/documentation/ NetworkingInternet/Conceptual/NetworkingTopics/Introduction/Introduction.html CFNetwork https://developer.apple.com/library/mac/documentation/ Networking/Conceptual/CFNetwork/Introduction/Introduction.html NSURLSession https://developer.apple.com/library/ios/documentation/ Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html#//apple_ref/doc/uid/ 10000165-BCICJDHA

More Information Technical Support Apple Developer Forums http://developer.apple.com/forums Developer Technical Support http://developer.apple.com/support/technical General Inquiries Paul Danbold, Core OS Evangelist danbold@apple.com

Related Sessions Networking with NSURLSession Pacific Heights Thursday 9:00AM What's New in Network Extension and VPN Nob Hill Friday 9:00AM

Related Sessions Networking Lab Frameworks Lab E Friday 1:30PM