4

Hi I'm building an app in Node, using the Express framework.

I want to add http2 support and these are the options I've came across:

  1. Node.js HTTP/2
  2. node-spdy

My favorite is node-spdy, I've already implemented it and it works perfectly.
But I'm wandering if it's the right choice?

Node.js HTTP/2 as "native" solution seems like a great choice as well.
Should I stick with node-spdy or transition to the "native" http2?

I don't have much experience with these two, so any helpful information or guidance is appreciated.

Mihailo
  • 4,736
  • 4
  • 22
  • 30

1 Answers1

3

As you see HTTP/2 is still a experimental feature in Node.js. (https://nodejs.org/api/http2.html#http2_http_2)

I would recommend you to stick to node-spdy until its stable.

Also its not back compatible with HTTP/1 so you need to handle your own fallback

Santhosh S
  • 782
  • 5
  • 17
  • It's also good to know that some features like this https://stackoverflow.com/questions/41637076/http2-with-node-js-behind-nginx-proxy has no plans to be implemented. – Emeeus Jun 29 '18 at 12:18
  • 20
    It is no longer experimental – Chad Retz Oct 01 '18 at 18:33