tustvold commented on code in PR #5204:
URL: https://github.com/apache/arrow-rs/pull/5204#discussion_r1423290834


##########
object_store/src/client/mod.rs:
##########
@@ -350,17 +353,28 @@ impl ClientOptions {
     }
 
     /// Only use http1 connections
+    ///
+    /// This is on by default, since http2 is known to be significantly slower 
than http1.
     pub fn with_http1_only(mut self) -> Self {
+        self.http2_only = false.into();
         self.http1_only = true.into();
         self
     }
 
     /// Only use http2 connections
     pub fn with_http2_only(mut self) -> Self {
+        self.http1_only = false.into();
         self.http2_only = true.into();
         self
     }
 
+    /// Use http2 if supported, otherwise use http1.
+    pub fn with_either_http1_http2(mut self) -> Self {

Review Comment:
   ```suggestion
       pub fn with_http2(mut self) -> Self {
   ```
   Perhaps?
   
   Would also be good to add an option for this



##########
object_store/src/gcp/mod.rs:
##########
@@ -29,6 +29,13 @@
 //! to abort the upload and drop those unneeded parts. In addition, you may 
wish to
 //! consider implementing automatic clean up of unused parts that are older 
than one
 //! week.
+//!
+//! ## Using HTTP/2
+//!
+//! Google Cloud Storage supports both HTTP/2 and HTTP/1. HTTP/1 is used by 
default
+//! because it allows much higher throughput in our benchmarks (see
+//! [#5194](https://github.com/apache/arrow-rs/issues/5194)). HTTP/2 can be
+//! enabled by setting [crate::ClientConfigKey::Http2Only] to true.

Review Comment:
   Perhaps could add a key for HTTP2 to allow auto-upgrade if supported?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to