Description
working to gather all related info in this ticket, and will track an effort to bring http/2 into either PillarJS (for routing compatibility only) or Express 5.x.
@dougwilson notes here (in 2015!) #2761 (comment) that PillarJS can be used alongside native module.. so we need to assess if this is going to be something that uses express.js or just PillarJS with HTTP/2
#3730 -- most recent work that picks up on #3390
#2781 notes request for push-promises
#3778 (comment) mentions HTTP2
#2237 mentions HTTP/2 support in 2015 for Express5.x
#3390 is a proposal PR for HTTP/2 via #3388
#3390 (comment) is probably the most comprehensive TODO List i have seen
notably he modifies also:
superagent
supertest
cookies
cookie-session
vhost
also since the start of these efforts we now have chatgpt to help us. after some trial and error i got ChatGPT to provide us a useful TODO list:
Integrate HTTP/2 Core Module:
Replace usage of the HTTP/1 module with Node.js's http2 for server creation, ensuring dual support for HTTP/1 and HTTP/2.
TLS Configuration for HTTP/2:
Implement mandatory TLS setup for HTTP/2, providing configuration options for SSL certificates.
Re-architecture Request/Response Objects:
Adapt Express.js request and response objects to handle HTTP/2's stream-based communication, ensuring API compatibility.
Support for HTTP/2 Streams:
Enable handling of HTTP/2 streams in middleware and routes, allowing for efficient data handling (e.g., file uploads/downloads).
Implement Header Compression:
Utilize HPACK compression for headers in both requests and responses to maximize efficiency as per HTTP/2 specification.
HTTP/2 Server Push:
Develop API methods for HTTP/2 server push, enabling servers to preemptively send resources to the client.
Graceful Fallback to HTTP/1.x:
Ensure the server can gracefully downgrade to HTTP/1.x for clients that do not support HTTP/2.
Optimize for HTTP/2 Features:
Leverage HTTP/2 features like multiplexing and prioritization to optimize request and response management.
Update Middleware for HTTP/2 Compatibility:
Audit and update existing Express middleware to be compatible with HTTP/2, focusing on stream and headers handling.
Comprehensive Test Suite:
Develop a test suite covering HTTP/2 functionality, including stream management, server push, and header compression.
Documentation & Examples:
Provide detailed documentation and examples on setting up and using HTTP/2 with Express.js, including TLS configuration.
Benchmarking & Performance Analysis:
Benchmark HTTP/2 performance against HTTP/1.x, addressing any bottlenecks identified.