This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git

commit 7413ba584ad3507efa1cdb84f53f6dcd60f87153
Author: minyk <[email protected]>
AuthorDate: Mon Mar 18 22:01:31 2024 +0800

    [KYUUBI #6165] Add some HttpClient options for EngineUIProxyServlet
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    This pull request fixes #6165
    
    ## Describe Your Solution ๐Ÿ”ง
    
    Add HttpClient options for engine ui proxy servlet.
    - idleTimeout
    - maxConnections
    - maxThreads
    - requestBufferSize
    - responseBufferSize
    - timeout
    
    ## Types of changes :bookmark:
    
    - [ ] Bugfix (non-breaking change which fixes an issue)
    - [x] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
    
    ## Test Plan ๐Ÿงช
    
    #### Behavior Without This Pull Request :coffin:
    Engine UI proxy requests with large headers( > 4k) are failed with 500 http 
status.
    
    #### Behavior With This Pull Request :tada:
    Increase the value of 
`kyuubi.frontend.rest.proxy.jetty.client.requestBufferSize` properly(ex: 5k), 
request with large header has succeeded with 200 status.
    
    #### Related Unit Tests
    
    ---
    
    # Checklist ๐Ÿ“
    
    - [x] This patch was not authored or co-authored using [Generative 
Tooling](https://www.apache.org/legal/generative-tooling.html)
    
    **Be nice. Be informative.**
    
    Closes #6192 from minyk/kyuubi-6165.
    
    Closes #6165
    
    6ef26aa43 [minyk] fix kyuubi version of configs
    1812a96eb [minyk] apply spotless
    3527cada9 [minyk] set initial parameters to the httpclient of proxy 
servletholder.
    
    Authored-by: minyk <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 docs/configuration/settings.md                     | 120 +++++++++++----------
 .../org/apache/kyuubi/config/KyuubiConf.scala      |  48 +++++++++
 .../kyuubi/server/api/v1/ApiRootResource.scala     |  20 ++++
 3 files changed, 131 insertions(+), 57 deletions(-)

diff --git a/docs/configuration/settings.md b/docs/configuration/settings.md
index 66b551166..2d3e21e5f 100644
--- a/docs/configuration/settings.md
+++ b/docs/configuration/settings.md
@@ -227,63 +227,69 @@ You can configure the Kyuubi properties in 
`$KYUUBI_HOME/conf/kyuubi-defaults.co
 
 ### Frontend
 
-|                          Key                           |      Default       
|                                                                               
                                                                                
                                                                                
            Meaning                                                             
                                                                                
               [...]
-|--------------------------------------------------------|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 [...]
-| kyuubi.frontend.advertised.host                        | &lt;undefined&gt;  
| Hostname or IP of the Kyuubi server's frontend services to publish to 
external systems such as the service discovery ensemble and metadata store. Use 
it when you want to advertise a different hostname or IP than the bind host.    
                                                                                
                                                                                
                       [...]
-| kyuubi.frontend.bind.host                              | &lt;undefined&gt;  
| Hostname or IP of the machine on which to run the frontend services.          
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.bind.port                              | 10009              
| (deprecated) Port of the machine on which to run the thrift frontend service 
via the binary protocol.                                                        
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.frontend.connection.url.use.hostname            | true               
| When true, frontend services prefer hostname, otherwise, ip address. Note 
that, the default value is set to `false` when engine running on Kubernetes to 
prevent potential network issues.                                               
                                                                                
                                                                                
                    [...]
-| kyuubi.frontend.max.message.size                       | 104857600          
| (deprecated) Maximum message size in bytes a Kyuubi server will accept.       
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.max.worker.threads                     | 999                
| (deprecated) Maximum number of threads in the frontend worker thread pool for 
the thrift frontend service                                                     
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.min.worker.threads                     | 9                  
| (deprecated) Minimum number of threads in the frontend worker thread pool for 
the thrift frontend service                                                     
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.mysql.bind.host                        | &lt;undefined&gt;  
| Hostname or IP of the machine on which to run the MySQL frontend service.     
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.mysql.bind.port                        | 3309               
| Port of the machine on which to run the MySQL frontend service.               
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.mysql.max.worker.threads               | 999                
| Maximum number of threads in the command execution thread pool for the MySQL 
frontend service                                                                
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.frontend.mysql.min.worker.threads               | 9                  
| Minimum number of threads in the command execution thread pool for the MySQL 
frontend service                                                                
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.frontend.mysql.netty.worker.threads             | &lt;undefined&gt;  
| Number of thread in the netty worker event loop of MySQL frontend service. 
Use min(cpu_cores, 8) in default.                                               
                                                                                
                                                                                
                                                                                
                  [...]
-| kyuubi.frontend.mysql.worker.keepalive.time            | PT1M               
| Time(ms) that an idle async thread of the command execution thread pool will 
wait for a new task to arrive before terminating in MySQL frontend service      
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.frontend.protocols                              | THRIFT_BINARY,REST 
| A comma-separated list for all frontend protocols <ul> <li>THRIFT_BINARY - 
HiveServer2 compatible thrift binary protocol.</li> <li>THRIFT_HTTP - 
HiveServer2 compatible thrift http protocol.</li> <li>REST - Kyuubi defined 
REST API(experimental).</li>  <li>MYSQL - MySQL compatible text 
protocol(experimental).</li>  <li>TRINO - Trino compatible http 
protocol(experimental).</li> </ul>                              [...]
-| kyuubi.frontend.proxy.http.client.ip.header            | X-Real-IP          
| The HTTP header to record the real client IP address. If your server is 
behind a load balancer or other proxy, the server will see this load balancer 
or proxy IP address as the client IP address, to get around this common issue, 
most load balancers or proxies offer the ability to record the real remote IP 
address in an HTTP header that will be added to the request for other devices 
to use. Note that, because  [...]
-| kyuubi.frontend.rest.bind.host                         | &lt;undefined&gt;  
| Hostname or IP of the machine on which to run the REST frontend service.      
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.rest.bind.port                         | 10099              
| Port of the machine on which to run the REST frontend service.                
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.rest.jetty.stopTimeout                 | PT5S               
| Stop timeout for Jetty server used by the RESTful frontend service.           
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.rest.max.worker.threads                | 999                
| Maximum number of threads in the frontend worker thread pool for the rest 
frontend service                                                                
                                                                                
                                                                                
                                                                                
                   [...]
-| kyuubi.frontend.ssl.keystore.algorithm                 | &lt;undefined&gt;  
| SSL certificate keystore algorithm.                                           
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.ssl.keystore.password                  | &lt;undefined&gt;  
| SSL certificate keystore password.                                            
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.ssl.keystore.path                      | &lt;undefined&gt;  
| SSL certificate keystore location.                                            
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.ssl.keystore.type                      | &lt;undefined&gt;  
| SSL certificate keystore type.                                                
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.binary.bind.host                | &lt;undefined&gt;  
| Hostname or IP of the machine on which to run the thrift frontend service via 
the binary protocol.                                                            
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.binary.bind.port                | 10009              
| Port of the machine on which to run the thrift frontend service via the 
binary protocol.                                                                
                                                                                
                                                                                
                                                                                
                     [...]
-| kyuubi.frontend.thrift.binary.ssl.disallowed.protocols | SSLv2,SSLv3        
| SSL versions to disallow for Kyuubi thrift binary frontend.                   
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.binary.ssl.enabled              | false              
| Set this to true for using SSL encryption in thrift binary frontend server.   
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.binary.ssl.include.ciphersuites                     
|| A comma-separated list of include SSL cipher suite names for thrift binary 
frontend.                                                                       
                                                                                
                                                                                
                                                                                
                  [...]
-| kyuubi.frontend.thrift.http.bind.host                  | &lt;undefined&gt;  
| Hostname or IP of the machine on which to run the thrift frontend service via 
http protocol.                                                                  
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.bind.port                  | 10010              
| Port of the machine on which to run the thrift frontend service via http 
protocol.                                                                       
                                                                                
                                                                                
                                                                                
                    [...]
-| kyuubi.frontend.thrift.http.compression.enabled        | true               
| Enable thrift http compression via Jetty compression support                  
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.cookie.auth.enabled        | true               
| When true, Kyuubi in HTTP transport mode, will use cookie-based 
authentication mechanism                                                        
                                                                                
                                                                                
                                                                                
                             [...]
-| kyuubi.frontend.thrift.http.cookie.domain              | &lt;undefined&gt;  
| Domain for the Kyuubi generated cookies                                       
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.cookie.is.httponly         | true               
| HttpOnly attribute of the Kyuubi generated cookie.                            
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.cookie.max.age             | 86400              
| Maximum age in seconds for server side cookie used by Kyuubi in HTTP mode.    
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.cookie.path                | &lt;undefined&gt;  
| Path for the Kyuubi generated cookies                                         
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.max.idle.time              | PT30M              
| Maximum idle time for a connection on the server when in HTTP mode.           
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.path                       | cliservice         
| Path component of URL endpoint when in HTTP mode.                             
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.request.header.size        | 6144               
| Request header size in bytes, when using HTTP transport mode. Jetty defaults 
used.                                                                           
                                                                                
                                                                                
                                                                                
                [...]
-| kyuubi.frontend.thrift.http.response.header.size       | 6144               
| Response header size in bytes, when using HTTP transport mode. Jetty defaults 
used.                                                                           
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.ssl.exclude.ciphersuites                       
|| A comma-separated list of exclude SSL cipher suite names for thrift http 
frontend.                                                                       
                                                                                
                                                                                
                                                                                
                    [...]
-| kyuubi.frontend.thrift.http.ssl.keystore.password      | &lt;undefined&gt;  
| SSL certificate keystore password.                                            
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.ssl.keystore.path          | &lt;undefined&gt;  
| SSL certificate keystore location.                                            
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.ssl.protocol.blacklist     | SSLv2,SSLv3        
| SSL Versions to disable when using HTTP transport mode.                       
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.use.SSL                    | false              
| Set this to true for using SSL encryption in http mode.                       
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.http.xsrf.filter.enabled        | false              
| If enabled, Kyuubi will block any requests made to it over HTTP if an 
X-XSRF-HEADER header is not present                                             
                                                                                
                                                                                
                                                                                
                       [...]
-| kyuubi.frontend.thrift.max.message.size                | 104857600          
| Maximum message size in bytes a Kyuubi server will accept.                    
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.thrift.max.worker.threads              | 999                
| Maximum number of threads in the frontend worker thread pool for the thrift 
frontend service                                                                
                                                                                
                                                                                
                                                                                
                 [...]
-| kyuubi.frontend.thrift.min.worker.threads              | 9                  
| Minimum number of threads in the frontend worker thread pool for the thrift 
frontend service                                                                
                                                                                
                                                                                
                                                                                
                 [...]
-| kyuubi.frontend.thrift.worker.keepalive.time           | PT1M               
| Keep-alive time (in milliseconds) for an idle worker thread                   
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.trino.bind.host                        | &lt;undefined&gt;  
| Hostname or IP of the machine on which to run the TRINO frontend service.     
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.trino.bind.port                        | 10999              
| Port of the machine on which to run the TRINO frontend service.               
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.trino.jetty.stopTimeout                | PT5S               
| Stop timeout for Jetty server used by the Trino frontend service.             
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
-| kyuubi.frontend.trino.max.worker.threads               | 999                
| Maximum number of threads in the frontend worker thread pool for the Trino 
frontend service                                                                
                                                                                
                                                                                
                                                                                
                  [...]
-| kyuubi.frontend.worker.keepalive.time                  | PT1M               
| (deprecated) Keep-alive time (in milliseconds) for an idle worker thread      
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
+|                            Key                             |      Default    
   |                                                                            
                                                                                
                                                                                
               Meaning                                                          
                                                                                
              [...]
+|------------------------------------------------------------|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 [...]
+| kyuubi.frontend.advertised.host                            | 
&lt;undefined&gt;  | Hostname or IP of the Kyuubi server's frontend services to 
publish to external systems such as the service discovery ensemble and metadata 
store. Use it when you want to advertise a different hostname or IP than the 
bind host.                                                                      
                                                                                
                                 [...]
+| kyuubi.frontend.bind.host                                  | 
&lt;undefined&gt;  | Hostname or IP of the machine on which to run the frontend 
services.                                                                       
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.bind.port                                  | 10009           
   | (deprecated) Port of the machine on which to run the thrift frontend 
service via the binary protocol.                                                
                                                                                
                                                                                
                                                                                
                    [...]
+| kyuubi.frontend.connection.url.use.hostname                | true            
   | When true, frontend services prefer hostname, otherwise, ip address. Note 
that, the default value is set to `false` when engine running on Kubernetes to 
prevent potential network issues.                                               
                                                                                
                                                                                
                [...]
+| kyuubi.frontend.max.message.size                           | 104857600       
   | (deprecated) Maximum message size in bytes a Kyuubi server will accept.    
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.max.worker.threads                         | 999             
   | (deprecated) Maximum number of threads in the frontend worker thread pool 
for the thrift frontend service                                                 
                                                                                
                                                                                
                                                                                
               [...]
+| kyuubi.frontend.min.worker.threads                         | 9               
   | (deprecated) Minimum number of threads in the frontend worker thread pool 
for the thrift frontend service                                                 
                                                                                
                                                                                
                                                                                
               [...]
+| kyuubi.frontend.mysql.bind.host                            | 
&lt;undefined&gt;  | Hostname or IP of the machine on which to run the MySQL 
frontend service.                                                               
                                                                                
                                                                                
                                                                                
                                 [...]
+| kyuubi.frontend.mysql.bind.port                            | 3309            
   | Port of the machine on which to run the MySQL frontend service.            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.mysql.max.worker.threads                   | 999             
   | Maximum number of threads in the command execution thread pool for the 
MySQL frontend service                                                          
                                                                                
                                                                                
                                                                                
                  [...]
+| kyuubi.frontend.mysql.min.worker.threads                   | 9               
   | Minimum number of threads in the command execution thread pool for the 
MySQL frontend service                                                          
                                                                                
                                                                                
                                                                                
                  [...]
+| kyuubi.frontend.mysql.netty.worker.threads                 | 
&lt;undefined&gt;  | Number of thread in the netty worker event loop of MySQL 
frontend service. Use min(cpu_cores, 8) in default.                             
                                                                                
                                                                                
                                                                                
                                [...]
+| kyuubi.frontend.mysql.worker.keepalive.time                | PT1M            
   | Time(ms) that an idle async thread of the command execution thread pool 
will wait for a new task to arrive before terminating in MySQL frontend service 
                                                                                
                                                                                
                                                                                
                 [...]
+| kyuubi.frontend.protocols                                  | 
THRIFT_BINARY,REST | A comma-separated list for all frontend protocols <ul> 
<li>THRIFT_BINARY - HiveServer2 compatible thrift binary protocol.</li> 
<li>THRIFT_HTTP - HiveServer2 compatible thrift http protocol.</li> <li>REST - 
Kyuubi defined REST API(experimental).</li>  <li>MYSQL - MySQL compatible text 
protocol(experimental).</li>  <li>TRINO - Trino compatible http 
protocol(experimental).</li> </ul>                          [...]
+| kyuubi.frontend.proxy.http.client.ip.header                | X-Real-IP       
   | The HTTP header to record the real client IP address. If your server is 
behind a load balancer or other proxy, the server will see this load balancer 
or proxy IP address as the client IP address, to get around this common issue, 
most load balancers or proxies offer the ability to record the real remote IP 
address in an HTTP header that will be added to the request for other devices 
to use. Note that, beca [...]
+| kyuubi.frontend.rest.bind.host                             | 
&lt;undefined&gt;  | Hostname or IP of the machine on which to run the REST 
frontend service.                                                               
                                                                                
                                                                                
                                                                                
                                  [...]
+| kyuubi.frontend.rest.bind.port                             | 10099           
   | Port of the machine on which to run the REST frontend service.             
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.rest.jetty.stopTimeout                     | PT5S            
   | Stop timeout for Jetty server used by the RESTful frontend service.        
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.rest.max.worker.threads                    | 999             
   | Maximum number of threads in the frontend worker thread pool for the rest 
frontend service                                                                
                                                                                
                                                                                
                                                                                
               [...]
+| kyuubi.frontend.rest.proxy.jetty.client.idleTimeout        | PT30S           
   | The idle timeout in milliseconds for Jetty server used by the RESTful 
frontend service.                                                               
                                                                                
                                                                                
                                                                                
                   [...]
+| kyuubi.frontend.rest.proxy.jetty.client.maxConnections     | 32768           
   | The max number of connections per destination for Jetty server used by the 
RESTful frontend service.                                                       
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.rest.proxy.jetty.client.maxThreads         | 256             
   | The max number of threads of HttpClient's Executor for Jetty server used 
by the RESTful frontend service.                                                
                                                                                
                                                                                
                                                                                
                [...]
+| kyuubi.frontend.rest.proxy.jetty.client.requestBufferSize  | 4096            
   | Size of the buffer in bytes used to write requests for Jetty server used 
by the RESTful frontend service.                                                
                                                                                
                                                                                
                                                                                
                [...]
+| kyuubi.frontend.rest.proxy.jetty.client.responseBufferSize | 4096            
   | Size of the buffer in bytes used to read response for Jetty server used by 
the RESTful frontend service.                                                   
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.rest.proxy.jetty.client.timeout            | PT60S           
   | The total timeout in milliseconds for Jetty server used by the RESTful 
frontend service.                                                               
                                                                                
                                                                                
                                                                                
                  [...]
+| kyuubi.frontend.ssl.keystore.algorithm                     | 
&lt;undefined&gt;  | SSL certificate keystore algorithm.                        
                                                                                
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.ssl.keystore.password                      | 
&lt;undefined&gt;  | SSL certificate keystore password.                         
                                                                                
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.ssl.keystore.path                          | 
&lt;undefined&gt;  | SSL certificate keystore location.                         
                                                                                
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.ssl.keystore.type                          | 
&lt;undefined&gt;  | SSL certificate keystore type.                             
                                                                                
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.thrift.binary.bind.host                    | 
&lt;undefined&gt;  | Hostname or IP of the machine on which to run the thrift 
frontend service via the binary protocol.                                       
                                                                                
                                                                                
                                                                                
                                [...]
+| kyuubi.frontend.thrift.binary.bind.port                    | 10009           
   | Port of the machine on which to run the thrift frontend service via the 
binary protocol.                                                                
                                                                                
                                                                                
                                                                                
                 [...]
+| kyuubi.frontend.thrift.binary.ssl.disallowed.protocols     | SSLv2,SSLv3     
   | SSL versions to disallow for Kyuubi thrift binary frontend.                
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.binary.ssl.enabled                  | false           
   | Set this to true for using SSL encryption in thrift binary frontend 
server.                                                                         
                                                                                
                                                                                
                                                                                
                     [...]
+| kyuubi.frontend.thrift.binary.ssl.include.ciphersuites                       
  || A comma-separated list of include SSL cipher suite names for thrift binary 
frontend.                                                                       
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.http.bind.host                      | 
&lt;undefined&gt;  | Hostname or IP of the machine on which to run the thrift 
frontend service via http protocol.                                             
                                                                                
                                                                                
                                                                                
                                [...]
+| kyuubi.frontend.thrift.http.bind.port                      | 10010           
   | Port of the machine on which to run the thrift frontend service via http 
protocol.                                                                       
                                                                                
                                                                                
                                                                                
                [...]
+| kyuubi.frontend.thrift.http.compression.enabled            | true            
   | Enable thrift http compression via Jetty compression support               
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.http.cookie.auth.enabled            | true            
   | When true, Kyuubi in HTTP transport mode, will use cookie-based 
authentication mechanism                                                        
                                                                                
                                                                                
                                                                                
                         [...]
+| kyuubi.frontend.thrift.http.cookie.domain                  | 
&lt;undefined&gt;  | Domain for the Kyuubi generated cookies                    
                                                                                
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.thrift.http.cookie.is.httponly             | true            
   | HttpOnly attribute of the Kyuubi generated cookie.                         
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.http.cookie.max.age                 | 86400           
   | Maximum age in seconds for server side cookie used by Kyuubi in HTTP mode. 
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.http.cookie.path                    | 
&lt;undefined&gt;  | Path for the Kyuubi generated cookies                      
                                                                                
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.thrift.http.max.idle.time                  | PT30M           
   | Maximum idle time for a connection on the server when in HTTP mode.        
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.http.path                           | cliservice      
   | Path component of URL endpoint when in HTTP mode.                          
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.http.request.header.size            | 6144            
   | Request header size in bytes, when using HTTP transport mode. Jetty 
defaults used.                                                                  
                                                                                
                                                                                
                                                                                
                     [...]
+| kyuubi.frontend.thrift.http.response.header.size           | 6144            
   | Response header size in bytes, when using HTTP transport mode. Jetty 
defaults used.                                                                  
                                                                                
                                                                                
                                                                                
                    [...]
+| kyuubi.frontend.thrift.http.ssl.exclude.ciphersuites                         
  || A comma-separated list of exclude SSL cipher suite names for thrift http 
frontend.                                                                       
                                                                                
                                                                                
                                                                                
                [...]
+| kyuubi.frontend.thrift.http.ssl.keystore.password          | 
&lt;undefined&gt;  | SSL certificate keystore password.                         
                                                                                
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.thrift.http.ssl.keystore.path              | 
&lt;undefined&gt;  | SSL certificate keystore location.                         
                                                                                
                                                                                
                                                                                
                                                                                
                              [...]
+| kyuubi.frontend.thrift.http.ssl.protocol.blacklist         | SSLv2,SSLv3     
   | SSL Versions to disable when using HTTP transport mode.                    
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.http.use.SSL                        | false           
   | Set this to true for using SSL encryption in http mode.                    
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.http.xsrf.filter.enabled            | false           
   | If enabled, Kyuubi will block any requests made to it over HTTP if an 
X-XSRF-HEADER header is not present                                             
                                                                                
                                                                                
                                                                                
                   [...]
+| kyuubi.frontend.thrift.max.message.size                    | 104857600       
   | Maximum message size in bytes a Kyuubi server will accept.                 
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.thrift.max.worker.threads                  | 999             
   | Maximum number of threads in the frontend worker thread pool for the 
thrift frontend service                                                         
                                                                                
                                                                                
                                                                                
                    [...]
+| kyuubi.frontend.thrift.min.worker.threads                  | 9               
   | Minimum number of threads in the frontend worker thread pool for the 
thrift frontend service                                                         
                                                                                
                                                                                
                                                                                
                    [...]
+| kyuubi.frontend.thrift.worker.keepalive.time               | PT1M            
   | Keep-alive time (in milliseconds) for an idle worker thread                
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.trino.bind.host                            | 
&lt;undefined&gt;  | Hostname or IP of the machine on which to run the TRINO 
frontend service.                                                               
                                                                                
                                                                                
                                                                                
                                 [...]
+| kyuubi.frontend.trino.bind.port                            | 10999           
   | Port of the machine on which to run the TRINO frontend service.            
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.trino.jetty.stopTimeout                    | PT5S            
   | Stop timeout for Jetty server used by the Trino frontend service.          
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.trino.max.worker.threads                   | 999             
   | Maximum number of threads in the frontend worker thread pool for the Trino 
frontend service                                                                
                                                                                
                                                                                
                                                                                
              [...]
+| kyuubi.frontend.worker.keepalive.time                      | PT1M            
   | (deprecated) Keep-alive time (in milliseconds) for an idle worker thread   
                                                                                
                                                                                
                                                                                
                                                                                
              [...]
 
 ### Ha
 
diff --git 
a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala 
b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
index 2aa5030ca..04734ae92 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
@@ -571,6 +571,54 @@ object KyuubiConf {
       .version("1.6.2")
       .fallbackConf(FRONTEND_MAX_WORKER_THREADS)
 
+  val FRONTEND_REST_PROXY_JETTY_CLIENT_IDLE_TIMEOUT: ConfigEntry[Long] =
+    buildConf("kyuubi.frontend.rest.proxy.jetty.client.idleTimeout")
+      .doc("The idle timeout in milliseconds for Jetty server " +
+        "used by the RESTful frontend service.")
+      .version("1.10.0")
+      .timeConf
+      .createWithDefaultString("PT30S")
+
+  val FRONTEND_REST_PROXY_JETTY_CLIENT_MAX_CONNECTIONS: ConfigEntry[Int] =
+    buildConf("kyuubi.frontend.rest.proxy.jetty.client.maxConnections")
+      .doc("The max number of connections per destination for Jetty server " +
+        "used by the RESTful frontend service.")
+      .version("1.10.0")
+      .intConf
+      .createWithDefault(32768)
+
+  val FRONTEND_REST_PROXY_JETTY_CLIENT_MAX_THREADS: ConfigEntry[Int] =
+    buildConf("kyuubi.frontend.rest.proxy.jetty.client.maxThreads")
+      .doc("The max number of threads of HttpClient's Executor for Jetty 
server " +
+        "used by the RESTful frontend service.")
+      .version("1.10.0")
+      .intConf
+      .createWithDefault(256)
+
+  val FRONTEND_REST_PROXY_JETTY_CLIENT_REQUEST_BUFFER_SIZE: ConfigEntry[Int] =
+    buildConf("kyuubi.frontend.rest.proxy.jetty.client.requestBufferSize")
+      .doc("Size of the buffer in bytes used to write requests for Jetty 
server " +
+        "used by the RESTful frontend service.")
+      .version("1.10.0")
+      .intConf
+      .createWithDefault(4096)
+
+  val FRONTEND_REST_PROXY_JETTY_CLIENT_RESPONSE_BUFFER_SIZE: ConfigEntry[Int] =
+    buildConf("kyuubi.frontend.rest.proxy.jetty.client.responseBufferSize")
+      .doc("Size of the buffer in bytes used to read response for Jetty server 
" +
+        "used by the RESTful frontend service.")
+      .version("1.10.0")
+      .intConf
+      .createWithDefault(4096)
+
+  val FRONTEND_REST_PROXY_JETTY_CLIENT_TIMEOUT: ConfigEntry[Long] =
+    buildConf("kyuubi.frontend.rest.proxy.jetty.client.timeout")
+      .doc("The total timeout in milliseconds for Jetty server " +
+        "used by the RESTful frontend service.")
+      .version("1.10.0")
+      .timeConf
+      .createWithDefaultString("PT60S")
+
   val FRONTEND_REST_JETTY_STOP_TIMEOUT: ConfigEntry[Long] =
     buildConf("kyuubi.frontend.rest.jetty.stopTimeout")
       .doc("Stop timeout for Jetty server used by the RESTful frontend 
service.")
diff --git 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/ApiRootResource.scala
 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/ApiRootResource.scala
index 8abc23ff1..d518e67ca 100644
--- 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/ApiRootResource.scala
+++ 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/ApiRootResource.scala
@@ -29,6 +29,7 @@ import org.glassfish.jersey.servlet.ServletContainer
 
 import org.apache.kyuubi.KYUUBI_VERSION
 import org.apache.kyuubi.client.api.v1.dto._
+import org.apache.kyuubi.config.KyuubiConf._
 import org.apache.kyuubi.server.KyuubiRestFrontendService
 import org.apache.kyuubi.server.api.{ApiRequestContext, EngineUIProxyServlet, 
FrontendServiceContext, OpenAPIConfig}
 
@@ -86,6 +87,25 @@ private[server] object ApiRootResource {
   def getEngineUIProxyHandler(fe: KyuubiRestFrontendService): 
ServletContextHandler = {
     val proxyServlet = new EngineUIProxyServlet()
     val holder = new ServletHolder(proxyServlet)
+    val conf = fe.getConf
+    holder.setInitParameter(
+      "idleTimeout",
+      conf.get(FRONTEND_REST_PROXY_JETTY_CLIENT_IDLE_TIMEOUT).toString)
+    holder.setInitParameter(
+      "maxConnections",
+      conf.get(FRONTEND_REST_PROXY_JETTY_CLIENT_MAX_CONNECTIONS).toString)
+    holder.setInitParameter(
+      "maxThreads",
+      conf.get(FRONTEND_REST_PROXY_JETTY_CLIENT_MAX_THREADS).toString)
+    holder.setInitParameter(
+      "requestBufferSize",
+      conf.get(FRONTEND_REST_PROXY_JETTY_CLIENT_REQUEST_BUFFER_SIZE).toString)
+    holder.setInitParameter(
+      "responseBufferSize",
+      conf.get(FRONTEND_REST_PROXY_JETTY_CLIENT_RESPONSE_BUFFER_SIZE).toString)
+    holder.setInitParameter(
+      "timeout",
+      conf.get(FRONTEND_REST_PROXY_JETTY_CLIENT_TIMEOUT).toString)
     val proxyHandler = new 
ServletContextHandler(ServletContextHandler.NO_SESSIONS)
     proxyHandler.setContextPath("/engine-ui")
     proxyHandler.addServlet(holder, "/*")

Reply via email to