SlideShare a Scribd company logo
Networking in .NET 7.0 and
YARP
WUG Days Brno 2022
Karel Zikmund – @ziki_cz
Agenda
• HTTP/3 and QUIC
• Evolution from HTTP/1.1 and HTTP/2 – key differences
• Advantages
• .NET 7.0 implementation
• Future in .NET 8.0+
• HTTP/2 WebSockets
• YARP – Yet Another Reverse Proxy
• What is Reverse Proxy
• When you need Reverse Proxy?
• YARP in production
HTTP versions
• What’s difference between:
• HTTP/1.1
• HTTP/2
• What’s difference between:
• HTTP/2
• HTTP/3
HTTP/1.1
• HTTP vs. HTTPS
• Textual protocol
• Multiple connections
• 3-way handshake (3 RTT)
• TCP – 1 RTT – SYN/ACK
• TLS 1.2 – 2 RTTs (Hello + Key)
• TLS 1.3 (2 RTT)
• TCP slow start – Window ramp up
• HTTP Pipelining
HTTP/2
• Binary protocol (packets with frames)
• Multiplexing streams on 1 connection
• TCP-based
• 3 RTT (or 2 RTT with TLS 1.3)
• Can be technically without SSL, unencrypted
• Head of the line blocking
• Packet loss blocks all streams, not just the one with lost packet
HTTP/3
• Binary protocol (packets with frames)
• Multiplexing streams on 1 connection
• QUIC-based
• QUIC = UDP + TLS
• 1 RTT
• 25.1% of all websites
• Major browsers – https://caniuse.com/http3
HTTP/3 – Advantages
• Unreliable networks – last mile network
• No head of the line blocking
• Improved loss recovery
• 0-RTT
• Keys from previous connection
• Dangerous – replay attacks
• Idempotent requests (e.g. harmless GET)
• Connection ID
• Transfer between networks
• Requires server support – by default in .NET
QUIC – Pros and Cons
• Multi-path … also for HTTP/3
• RFC in progress
• Increase bandwidth (multiple routes)
• Decrease latency (duplicated traffic) – streaming
• Unreliable delivery
• Not in .NET yet
• Extensible and versioned
• Network appliances (routers, proxies) – problems with UDP
HTTP/3 & QUIC – .NET support
• msquic-based – http://github.com/microsoft/msquic
• OSS, x-plat
• HTTP/3
• .NET 7.0 – full support (client and server) on Windows and Linux
• Performance – on par with HTTP/2
• QUIC APIs
• .NET 7.0 – GA quality
• API shape is Preview (reserve right to change it in .NET 8.0)
• Looking for consumers to validate
.NET Usage
• HTTP/3 opt-in
• HttpClient – defaults to HTTP/1.1
• HttpRequestMessage.Version = 3.0
• QUIC: EnablePreviewFeatures
.NET 8.0+
• HTTP/3 enabled by default in Kestrel
• More Performance work
• Finalize QUIC API shape
• Additional non-critical features
• 0-RTT (as opt-in)
• Support macOS, Mobile platforms (iOS, Android)
• Additional protocols and extensions
• gRPC over HTTP/3
• Multi-path
• WebTransport
• QUIC Datagram
HTTP/2 WebSockets
• Same WebSocket protocol, just over HTTP/2
• Pros:
• Reuse HTTP/2 connection – better perf
• Client:
HTTP/2 WebSockets
• Chrome and Edge – enabled by default
• Uses CONNECT word instead of GET – routes may need update
WebSockets Future
• HTTP/3 WebSockets
• WebTransport – WebSockets done right
• Session with multiple QUIC streams
• Multiple sessions on HTTP/3 connection
• Prototype in progress
YARP
• Yet Another Reverse Proxy
• https://microsoft.github.io/reverse-proxy
• OSS: https://github.com/microsoft/reverse-proxy
• Layer-7 proxy – terminates & re-issues requests
• Other popular reverse proxies: Nginx, HAProxy, Envoy, Ocelot, …
YARP and reverse proxies
• Who used YARP?
• Who used some Reverse Proxy?
• Who knows what a reverse proxy is?
What is a reverse proxy
• Public endpoint
• Load balancing between backend servers
• Can offload work from backend servers: Encryption, Auth, Compression, Caching
Reverse
proxy
contoso.com/orders
contoso.com/store
woodgrovebank.com
Public Internet Private Network
Reverse proxies – Why to use them?
• Load balancing
• A/B testing, or Version rollout
• Health checks, health status
• Indirection between URL-space and backend implementation
• API Management – consistent API surface for customers
• Offloading from backend
• Auth, compression, encryption, static files (like CDN)
• Authentication migration
• Cloud to On-prem reverse tunnel (*)
• Route local traffic to remote servers (single point of control and config)
• k8s and Service Fabric ingress control
• .NET Framework migration to .NET Core
YARP
• Library, not EXE
• 2 releases: 1.0 & 1.1
• .NET 5.0+ support
• Extensibility in C#, layered
• x-plat
• Great perf
• Latest protocols (gRPC , HTTP/3, HTTP/2 WebSockets)
• Drives innovation and perf improvements into .NET
YARP – docs
https://microsoft.github.io/reverse-proxy
YARP – Azure App Service
• Blog post
• 160B+ requests/day … 1.9M RPS
• 14M+ host names
• .NET 6.0 + YARP
• Why?
• Perf improvements
• 80% in throughput in perf tests
• Lower CPU usage
• More extensibility points
• New customer scenarios:
• gRPC, HTTP/3, per-host cipher suite config, custom error pages, …
YARP – Dynamics 365
• Announced 2021 November at .NET Conf
• >100B requests/month ... 38.5K RPS
• >7.5PB/month … transferred data
• ~700 instances of YARP
• Original authors
• Started on .NET Core 3.1
YARP – Architecture with pipeline
ASP.NET
Routing
TLS Termination
Auth2
Static Files
Other routes
Config
Session
Affinity
Load
Balancing
Request
Transformations
Http
Forwarder
Destination
Enumeration
HttpClient*
Health
checks
Specific
destination
server
http(s)
http(s)
Proxy process
Kestrel
Passive
Health
Checks
YARP – Architecture Http Forwarder
ASP.NET
Routing†
TLS Termination
Auth2
Static Files
Other routes
Http
Forwarder
HttpClient*
Specific
destination
server
http(s)
http(s)
Proxy process
Kestrel
Your custom
handler(s)
Request
Transformations
Site Information
/ Cache
Load balancing
Health checks
Summary
• HTTP/3 and QUIC support in .NET 7.0
• GA quality
• QUIC API shape may change in .NET 8.0
• Pro: Unreliable networks, Mobile scenarios
• HTTP/2 WebSockets
• Client needs new API call to reuse connection
• Server needs ConnectMethod change
• YARP
• Library, extensible via C#
• Micro-services world needs reverse proxies
@ziki_cz

More Related Content

PPTX
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
NGINX, Inc.
 
PPTX
MySQL_MariaDB로의_전환_기술요소-202212.pptx
NeoClova
 
PPTX
Spring data jpa
Jeevesh Pandey
 
PDF
The Ultimate Administrator’s Guide to HCL Nomad Web
panagenda
 
PDF
Java 8 Lambda Expressions
Scott Leberknight
 
PPT
Java servlets
lopjuan
 
PDF
Best Practices for Getting Started with NGINX Open Source
NGINX, Inc.
 
PDF
Spring MVC Framework
Hùng Nguyễn Huy
 
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
NGINX, Inc.
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
NeoClova
 
Spring data jpa
Jeevesh Pandey
 
The Ultimate Administrator’s Guide to HCL Nomad Web
panagenda
 
Java 8 Lambda Expressions
Scott Leberknight
 
Java servlets
lopjuan
 
Best Practices for Getting Started with NGINX Open Source
NGINX, Inc.
 
Spring MVC Framework
Hùng Nguyễn Huy
 

What's hot (20)

PDF
Redo log improvements MYSQL 8.0
Mydbops
 
PPTX
webworkers
Asanka Indrajith
 
PDF
[2019] 200만 동접 게임을 위한 MySQL 샤딩
NHN FORWARD
 
PDF
JSON Web Tokens
Ivan Rosolen
 
PDF
Lecture 3: Servlets - Session Management
Fahad Golra
 
PPTX
Welcome to React.pptx
PraveenKumar680401
 
PPTX
Spring Boot
Jiayun Zhou
 
PDF
Atomicity In Redis: Thomas Hunter
Redis Labs
 
PDF
Federated Engine 실무적용사례
I Goo Lee
 
PDF
Facebook architecture
mysqlops
 
PDF
Rest web services
Paulo Gandra de Sousa
 
PPTX
HCL Domino V12 Key Security Features Overview
hemantnaik
 
PPT
Grails Connecting to MySQL
ashishkirpan
 
PDF
Http methods
maamir farooq
 
PPTX
Room 1 - 3 - Lê Anh Tuấn - Build a High Performance Identification at GHTK wi...
Vietnam Open Infrastructure User Group
 
PPTX
DataPower Restful API Security
Jagadish Vemugunta
 
PDF
Introduction à React
Thibault Martinez
 
PDF
Achieving compliance With MongoDB Security
Mydbops
 
PDF
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...
ENSET, Université Hassan II Casablanca
 
PPTX
Express js
Manav Prasad
 
Redo log improvements MYSQL 8.0
Mydbops
 
webworkers
Asanka Indrajith
 
[2019] 200만 동접 게임을 위한 MySQL 샤딩
NHN FORWARD
 
JSON Web Tokens
Ivan Rosolen
 
Lecture 3: Servlets - Session Management
Fahad Golra
 
Welcome to React.pptx
PraveenKumar680401
 
Spring Boot
Jiayun Zhou
 
Atomicity In Redis: Thomas Hunter
Redis Labs
 
Federated Engine 실무적용사례
I Goo Lee
 
Facebook architecture
mysqlops
 
Rest web services
Paulo Gandra de Sousa
 
HCL Domino V12 Key Security Features Overview
hemantnaik
 
Grails Connecting to MySQL
ashishkirpan
 
Http methods
maamir farooq
 
Room 1 - 3 - Lê Anh Tuấn - Build a High Performance Identification at GHTK wi...
Vietnam Open Infrastructure User Group
 
DataPower Restful API Security
Jagadish Vemugunta
 
Introduction à React
Thibault Martinez
 
Achieving compliance With MongoDB Security
Mydbops
 
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...
ENSET, Université Hassan II Casablanca
 
Express js
Manav Prasad
 
Ad

Similar to WUG Days 2022 Brno - Networking in .NET 7.0 and YARP -- Karel Zikmund (20)

PPTX
.NET Conf 2022 - Networking in .NET 7
Karel Zikmund
 
PDF
SignalR: Add real-time to your applications
Eugene Zharkov
 
PDF
Better HTTP/2 Performance with Eclipse Vertx
Paolo de Dios
 
PDF
Better performances with HTTP/2
Thomas Segismont
 
PPTX
gRPC on .NET Core - NDC Sydney 2019
James Newton-King
 
PPTX
Building a Router
Hannes Gredler
 
PDF
Adding Support for Networking and Web Technologies to an Embedded System
John Efstathiades
 
PDF
A New Internet? Introduction to HTTP/2, QUIC and DOH
APNIC
 
PDF
PAC 2019 virtual Scott Moore
Neotys
 
PDF
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
Edward Burns
 
PDF
Data power v7 update - Ravi Katikala
floridawusergroup
 
PDF
Introduction to WebSockets
Gunnar Hillert
 
PDF
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
peychevi
 
PDF
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Marcin Bielak
 
PDF
Osnug meetup-tungsten fabric - overview.pptx
M.Qasim Arham
 
PDF
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
APNIC
 
PPTX
.NET Core Today and Tomorrow
Jon Galloway
 
PPTX
What's new in NGINX Plus R19
NGINX, Inc.
 
PDF
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Steffen Gebert
 
PDF
BKK16-205 RDK-B IoT
Linaro
 
.NET Conf 2022 - Networking in .NET 7
Karel Zikmund
 
SignalR: Add real-time to your applications
Eugene Zharkov
 
Better HTTP/2 Performance with Eclipse Vertx
Paolo de Dios
 
Better performances with HTTP/2
Thomas Segismont
 
gRPC on .NET Core - NDC Sydney 2019
James Newton-King
 
Building a Router
Hannes Gredler
 
Adding Support for Networking and Web Technologies to an Embedded System
John Efstathiades
 
A New Internet? Introduction to HTTP/2, QUIC and DOH
APNIC
 
PAC 2019 virtual Scott Moore
Neotys
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
Edward Burns
 
Data power v7 update - Ravi Katikala
floridawusergroup
 
Introduction to WebSockets
Gunnar Hillert
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
peychevi
 
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Marcin Bielak
 
Osnug meetup-tungsten fabric - overview.pptx
M.Qasim Arham
 
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
APNIC
 
.NET Core Today and Tomorrow
Jon Galloway
 
What's new in NGINX Plus R19
NGINX, Inc.
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Steffen Gebert
 
BKK16-205 RDK-B IoT
Linaro
 
Ad

More from Karel Zikmund (20)

PPTX
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
Karel Zikmund
 
PPTX
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
Karel Zikmund
 
PDF
.NET Core Summer event 2019 in Vienna, AT - .NET 5 - Future of .NET on Mobile...
Karel Zikmund
 
PPTX
.NET Core Summer event 2019 in Linz, AT - War stories from .NET team -- Karel...
Karel Zikmund
 
PPTX
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
Karel Zikmund
 
PPTX
.NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf...
Karel Zikmund
 
PPTX
.NET Core Summer event 2019 in Brno, CZ - War stories from .NET team -- Karel...
Karel Zikmund
 
PPTX
.NET Core Summer event 2019 in Prague, CZ - War stories from .NET team -- Kar...
Karel Zikmund
 
PPTX
.NET Core Summer event 2019 in Vienna, AT - War stories from .NET team -- Kar...
Karel Zikmund
 
PPTX
.NET Core Summer event 2019 in NL - War stories from .NET team -- Karel Zikmund
Karel Zikmund
 
PPTX
NDC Oslo 2019 - War stories from .NET team -- Karel Zikmund
Karel Zikmund
 
PPTX
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
PPTX
DotNext 2017 in Moscow - .NET Core Networking stack and Performance -- Karel ...
Karel Zikmund
 
PPTX
.NET MeetUp Brno 2017 - Microsoft Engineering teams in Europe -- Karel Zikmund
Karel Zikmund
 
PPTX
.NET MeetUp Brno 2017 - Xamarin .NET internals -- Marek Safar
Karel Zikmund
 
PPTX
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
PPTX
.NET Fringe 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
PPTX
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
PPTX
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
Karel Zikmund
 
PPTX
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
Karel Zikmund
 
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
Karel Zikmund
 
.NET Core Summer event 2019 in Vienna, AT - .NET 5 - Future of .NET on Mobile...
Karel Zikmund
 
.NET Core Summer event 2019 in Linz, AT - War stories from .NET team -- Karel...
Karel Zikmund
 
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
Karel Zikmund
 
.NET Core Summer event 2019 in Brno, CZ - .NET Core Networking stack and perf...
Karel Zikmund
 
.NET Core Summer event 2019 in Brno, CZ - War stories from .NET team -- Karel...
Karel Zikmund
 
.NET Core Summer event 2019 in Prague, CZ - War stories from .NET team -- Kar...
Karel Zikmund
 
.NET Core Summer event 2019 in Vienna, AT - War stories from .NET team -- Kar...
Karel Zikmund
 
.NET Core Summer event 2019 in NL - War stories from .NET team -- Karel Zikmund
Karel Zikmund
 
NDC Oslo 2019 - War stories from .NET team -- Karel Zikmund
Karel Zikmund
 
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
DotNext 2017 in Moscow - .NET Core Networking stack and Performance -- Karel ...
Karel Zikmund
 
.NET MeetUp Brno 2017 - Microsoft Engineering teams in Europe -- Karel Zikmund
Karel Zikmund
 
.NET MeetUp Brno 2017 - Xamarin .NET internals -- Marek Safar
Karel Zikmund
 
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
.NET Fringe 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
Karel Zikmund
 
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 

Recently uploaded (20)

PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PDF
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PPTX
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PDF
Immersive experiences: what Pharo users do!
ESUG
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
Presentation about Database and Database Administrator
abhishekchauhan86963
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
Presentation about variables and constant.pptx
kr2589474
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Presentation about variables and constant.pptx
safalsingh810
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Immersive experiences: what Pharo users do!
ESUG
 

WUG Days 2022 Brno - Networking in .NET 7.0 and YARP -- Karel Zikmund

  • 1. Networking in .NET 7.0 and YARP WUG Days Brno 2022 Karel Zikmund – @ziki_cz
  • 2. Agenda • HTTP/3 and QUIC • Evolution from HTTP/1.1 and HTTP/2 – key differences • Advantages • .NET 7.0 implementation • Future in .NET 8.0+ • HTTP/2 WebSockets • YARP – Yet Another Reverse Proxy • What is Reverse Proxy • When you need Reverse Proxy? • YARP in production
  • 3. HTTP versions • What’s difference between: • HTTP/1.1 • HTTP/2 • What’s difference between: • HTTP/2 • HTTP/3
  • 4. HTTP/1.1 • HTTP vs. HTTPS • Textual protocol • Multiple connections • 3-way handshake (3 RTT) • TCP – 1 RTT – SYN/ACK • TLS 1.2 – 2 RTTs (Hello + Key) • TLS 1.3 (2 RTT) • TCP slow start – Window ramp up • HTTP Pipelining
  • 5. HTTP/2 • Binary protocol (packets with frames) • Multiplexing streams on 1 connection • TCP-based • 3 RTT (or 2 RTT with TLS 1.3) • Can be technically without SSL, unencrypted • Head of the line blocking • Packet loss blocks all streams, not just the one with lost packet
  • 6. HTTP/3 • Binary protocol (packets with frames) • Multiplexing streams on 1 connection • QUIC-based • QUIC = UDP + TLS • 1 RTT • 25.1% of all websites • Major browsers – https://caniuse.com/http3
  • 7. HTTP/3 – Advantages • Unreliable networks – last mile network • No head of the line blocking • Improved loss recovery • 0-RTT • Keys from previous connection • Dangerous – replay attacks • Idempotent requests (e.g. harmless GET) • Connection ID • Transfer between networks • Requires server support – by default in .NET
  • 8. QUIC – Pros and Cons • Multi-path … also for HTTP/3 • RFC in progress • Increase bandwidth (multiple routes) • Decrease latency (duplicated traffic) – streaming • Unreliable delivery • Not in .NET yet • Extensible and versioned • Network appliances (routers, proxies) – problems with UDP
  • 9. HTTP/3 & QUIC – .NET support • msquic-based – http://github.com/microsoft/msquic • OSS, x-plat • HTTP/3 • .NET 7.0 – full support (client and server) on Windows and Linux • Performance – on par with HTTP/2 • QUIC APIs • .NET 7.0 – GA quality • API shape is Preview (reserve right to change it in .NET 8.0) • Looking for consumers to validate
  • 10. .NET Usage • HTTP/3 opt-in • HttpClient – defaults to HTTP/1.1 • HttpRequestMessage.Version = 3.0 • QUIC: EnablePreviewFeatures
  • 11. .NET 8.0+ • HTTP/3 enabled by default in Kestrel • More Performance work • Finalize QUIC API shape • Additional non-critical features • 0-RTT (as opt-in) • Support macOS, Mobile platforms (iOS, Android) • Additional protocols and extensions • gRPC over HTTP/3 • Multi-path • WebTransport • QUIC Datagram
  • 12. HTTP/2 WebSockets • Same WebSocket protocol, just over HTTP/2 • Pros: • Reuse HTTP/2 connection – better perf • Client:
  • 13. HTTP/2 WebSockets • Chrome and Edge – enabled by default • Uses CONNECT word instead of GET – routes may need update
  • 14. WebSockets Future • HTTP/3 WebSockets • WebTransport – WebSockets done right • Session with multiple QUIC streams • Multiple sessions on HTTP/3 connection • Prototype in progress
  • 15. YARP • Yet Another Reverse Proxy • https://microsoft.github.io/reverse-proxy • OSS: https://github.com/microsoft/reverse-proxy • Layer-7 proxy – terminates & re-issues requests • Other popular reverse proxies: Nginx, HAProxy, Envoy, Ocelot, …
  • 16. YARP and reverse proxies • Who used YARP? • Who used some Reverse Proxy? • Who knows what a reverse proxy is?
  • 17. What is a reverse proxy • Public endpoint • Load balancing between backend servers • Can offload work from backend servers: Encryption, Auth, Compression, Caching Reverse proxy contoso.com/orders contoso.com/store woodgrovebank.com Public Internet Private Network
  • 18. Reverse proxies – Why to use them? • Load balancing • A/B testing, or Version rollout • Health checks, health status • Indirection between URL-space and backend implementation • API Management – consistent API surface for customers • Offloading from backend • Auth, compression, encryption, static files (like CDN) • Authentication migration • Cloud to On-prem reverse tunnel (*) • Route local traffic to remote servers (single point of control and config) • k8s and Service Fabric ingress control • .NET Framework migration to .NET Core
  • 19. YARP • Library, not EXE • 2 releases: 1.0 & 1.1 • .NET 5.0+ support • Extensibility in C#, layered • x-plat • Great perf • Latest protocols (gRPC , HTTP/3, HTTP/2 WebSockets) • Drives innovation and perf improvements into .NET
  • 21. YARP – Azure App Service • Blog post • 160B+ requests/day … 1.9M RPS • 14M+ host names • .NET 6.0 + YARP • Why? • Perf improvements • 80% in throughput in perf tests • Lower CPU usage • More extensibility points • New customer scenarios: • gRPC, HTTP/3, per-host cipher suite config, custom error pages, …
  • 22. YARP – Dynamics 365 • Announced 2021 November at .NET Conf • >100B requests/month ... 38.5K RPS • >7.5PB/month … transferred data • ~700 instances of YARP • Original authors • Started on .NET Core 3.1
  • 23. YARP – Architecture with pipeline ASP.NET Routing TLS Termination Auth2 Static Files Other routes Config Session Affinity Load Balancing Request Transformations Http Forwarder Destination Enumeration HttpClient* Health checks Specific destination server http(s) http(s) Proxy process Kestrel Passive Health Checks
  • 24. YARP – Architecture Http Forwarder ASP.NET Routing† TLS Termination Auth2 Static Files Other routes Http Forwarder HttpClient* Specific destination server http(s) http(s) Proxy process Kestrel Your custom handler(s) Request Transformations Site Information / Cache Load balancing Health checks
  • 25. Summary • HTTP/3 and QUIC support in .NET 7.0 • GA quality • QUIC API shape may change in .NET 8.0 • Pro: Unreliable networks, Mobile scenarios • HTTP/2 WebSockets • Client needs new API call to reuse connection • Server needs ConnectMethod change • YARP • Library, extensible via C# • Micro-services world needs reverse proxies @ziki_cz

Editor's Notes

  • #2: About me: Work on .NET team for 17y For last 5 years Manager on Networking team and for YARP (cross-collaboration with ASP.NET team)
  • #5: RTT = Round-Trip time Between data centers, from Australia – matters a lot
  • #6: Known headers not in textual form, custom headers are – built-in compression of repeating headers (HPACK) 100 streams default, technically ok to have multiple connections TCP slow start, but less 2-3 RTT handshakes
  • #7: Most major browsers Akamai (CDN)
  • #9: Azure Networking – some reverse proxies (not all)
  • #10: Preview in .NET 6.0 – under a switch Validation: Non-msquic implementation
  • #13: You have to supply handler / HttpClient yourself to share HTTP/2 connection Automatic pooling is bad (ServicePoint) We throw for ConnectAsync without handler
  • #16: Why build yet another one? – Extensibility & Customizability
  • #18: Public endpoint to your sites & services, or as Service mesh For example: Ingress for k8s and Service Fabric
  • #19: API Management solution - consistent API surface for customers backed by multitude of micro-services (replace Azure API Management) Routing local traffic to remote servers (single point of control and config) Like forward proxy, but client does not have to be aware of it
  • #20: YARP 1.0 – November 2021 YARP 1.1 – May 2022 Not Lua / C++ … Nginx On Windows runs better than most other proxies Can run in IIS and HTTP.sys Public benchmarks Community: Node.js migration – throughput was ~6-7x greater on ASP .NET Core; P99 latency was ~2-4x better on ASP .NET Core.
  • #21: Also GH Discussions and Issues
  • #22: Announced 8/24 (2022)
  • #24: We are a library, not EXE Config from json, but interface pluggable Apply config change
  • #25: Advanced mode for even higher customization (large services)
  • #26: Feedback – did you like it or not?