Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HTTP/2 requests #1130

Closed
JustinBeckwith opened this issue Apr 24, 2018 · 13 comments
Closed

Add support for HTTP/2 requests #1130

JustinBeckwith opened this issue Apr 24, 2018 · 13 comments
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@JustinBeckwith
Copy link
Contributor

With the demise of batch, we need a better way to make requests in tight loops:
https://developers.googleblog.com/2018/03/discontinuing-support-for-json-rpc-and.html

We should try out the experimental HTTP/2 support in node.js core, and provide an API to turn it on.

@JustinBeckwith JustinBeckwith added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Apr 24, 2018
@yetithefoot
Copy link

Hello @JustinBeckwith, sadly batches were removed from library, I marked this day in calendar with a sad emoji. 😢

Would be great if you can give any recommendations on how to make thousands of homogeneous requests to Google Drive API. I have to perform similar actions (files.update) on a lot of files (thousands). I faced API quotas and have to limit requests pressure and backoff strategy from my side.

At the moment I'm using Batchelor to organise requests in batches, this requires a bit of extra auth routines and feels like a bit different. Is there a best practice how to perform mass similar operations to Google Drive?

@motin
Copy link

motin commented Nov 29, 2018

We should try out the experimental HTTP/2 support in node.js core, and provide an API to turn it on.

With Node v10 the http2 module has become a stable addition, and I trust that the Google API:s themselves support HTTP/2. What are the current blockers / steps towards supporting HTTP/2 requests? Does request need to support HTTP/2? Let us know the game plan, and we can help out in relevant ways :)

@nickbclifford
Copy link

Has this issue gone anywhere? I'm currently moving away from global batch endpoints and proper HTTP/2 support would be hugely helpful.

@bcoe
Copy link
Contributor

bcoe commented Oct 7, 2019

@nickbclifford we've released a variety of the APIs supported by google-api-nodejs-client as gRPC libraries, which use http2 for transport, a list can be found here:

https://github.com/googleapis/google-cloud-node

There's no immediate plan to add http2 support to google-api-nodejs-client.

@nickbclifford
Copy link

Is there a better solution available using other APIs that aren't available through Google Cloud (i.e. Gmail)? Since batching was removed, there's really no obvious first-party solution for many API requests.

@jlippold
Copy link

If there won't be http2 support in this library, can we have a example in how to use the /batch/library/v1 endpoints manually? I need to reduce the overhead in looping and making a ton of RESTful requests.

Thanks

@vilkatis
Copy link

I had success with using "request" to perform a batch request, but sadly this library is deprecated so I don't want to use it. I couldn't even get a curl to work but "request" worked fine, I don't what I'm doing wrong.
Seems like I will have to refrain from using the batch endpoints and send multiple requests at a time

@JustinBeckwith
Copy link
Contributor Author

Good news everyone! We have experimental HTTP/2 support brewing here:
#2246

For those interested in the gory details, the real magic is here:
googleapis/nodejs-googleapis-common#293

@JustinBeckwith
Copy link
Contributor Author

Since it's been a while since this landed, calling this done :) Please it out and leave feedback!
https://github.com/googleapis/google-api-nodejs-client#http2

@bramkragten
Copy link

What is the state of HTTP/2, when would this be ready to use in production?

@JustinBeckwith
Copy link
Contributor Author

Hey @bramkragten really I was just trying to get a few miles on the implementation before we called it good to go. Nobody has really complained or filed any bugs, so I assume it's working ok :) I'll go ahead and lift the "experimental" warning here next week.

@lespina
Copy link

lespina commented Jun 30, 2021

Hey Justin, my company is evaluating the usage of this flag in prod but still wary of the "experimental" warning -- is there a planned release coming that removes the warning?

@JustinBeckwith
Copy link
Contributor Author

Yeah, it's been a year now - I think it's time.
googleapis/nodejs-googleapis-common#401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

9 participants