ASP.NET Core Interview Question #188

What is HTTP/2 and how can it benefit web applications?

Performance, Caching & HTTP Senior Advanced

Quick Interview Answer

HTTP/2 improves transport efficiency compared with HTTP/1.1 through features including multiplexing multiple request/response streams over one connection and compressed request headers.

Detailed Explanation

HTTP/2 improves transport efficiency compared with HTTP/1.1 through features including multiplexing multiple request/response streams over one connection and compressed request headers.

These improvements can reduce connection overhead and head-of-line limitations at the HTTP layer. ASP.NET Core servers such as Kestrel support modern HTTP protocols when the hosting and TLS configuration permit them.

Application-level performance still depends on efficient endpoints, database access, payload size, and network conditions.

Code Example

// Kestrel protocol configuration can be set in
// configuration or code when custom hosting settings
// are required. Many deployments use host defaults
// or reverse-proxy configuration.