You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<span>▾</span></label><ul><li><ahref=/gateway/latest/docs/user-cases/stories/indexing_speedup_for_big_index_rebuild/>How an Insurance Group Improved the Indexing Speed by 200x Times</a></li><li><ahref=/gateway/latest/docs/user-cases/stories/a_cross_region_cluster_access_locality/>Nearest Cluster Access Across Two Cloud Providers</a></li></ul></li><li><ahref=/gateway/latest/docs/troubleshooting/>FAQs</a><ul></ul></li><li><ahref=/gateway/latest/docs/release-notes/>Release Notes</a><ul></ul></li></ul><ul><aclass=download-btnhref=https://release.infinilabs.com/gateway/>Download</a></ul></nav><script>(function(){varmenu=document.querySelector("aside.book-menu nav");addEventListener("beforeunload",function(event){localStorage.setItem("menu.scrollTop",menu.scrollTop);});menu.scrollTop=localStorage.getItem("menu.scrollTop");})();</script></aside><divclass=book-page><headerclass=book-header><divclass="flex align-center justify-between"><labelfor=menu-control><imgsrc=/gateway/latest/svg/menu.svgclass=book-iconalt=Menu></label>
20
20
<strong>Other Configurations</strong>
21
-
<labelfor=toc-control><imgsrc=/gateway/latest/svg/toc.svgclass=book-iconalt="Table of Contents"></label></div><asideclass="hidden clearfix"><navid=TableOfContents><ul><li><ahref=#other-configurations>Other Configurations</a><ul><li><ahref=#advanced-usage>Advanced Usage</a><ul><li><ahref=#templates>Templates</a></li><li><ahref=#environment-variables>Environment Variables</a></li></ul></li><li><ahref=#system-configuration>System Configuration</a></li><li><ahref=#local-disk-queue>Local Disk Queue</a></li><li><ahref=#s3>S3</a></li><li><ahref=#kafka>Kafka</a></li><li><ahref=#badger>Badger</a></li><li><ahref=#resource-limitations>Resource Limitations</a></li><li><ahref=#network-configuration>Network Configuration</a></li><li><ahref=#tls-configuration>TLS Configuration</a></li><li><ahref=#api>API</a></li><li><ahref=#misc>Misc</a></li></ul></li></ul></nav></aside></header><articleclass=markdown><h1id=other-configurations>Other Configurations
21
+
<labelfor=toc-control><imgsrc=/gateway/latest/svg/toc.svgclass=book-iconalt="Table of Contents"></label></div><asideclass="hidden clearfix"><navid=TableOfContents><ul><li><ahref=#other-configurations>Other Configurations</a><ul><li><ahref=#advanced-usage>Advanced Usage</a><ul><li><ahref=#templates>Templates</a></li><li><ahref=#environment-variables>Environment Variables</a></li></ul></li><li><ahref=#system-configuration>System Configuration</a></li><li><ahref=#local-disk-queue>Local Disk Queue</a></li><li><ahref=#s3>S3</a></li><li><ahref=#kafka>Kafka</a></li><li><ahref=#badger>Badger</a></li><li><ahref=#resource-limitations>Resource Limitations</a></li><li><ahref=#network-configuration>Network Configuration</a></li><li><ahref=#tls-configuration>TLS Configuration</a><ul><li><ahref=#auto-issue-tls-certificates>Auto-Issue TLS Certificates</a></li></ul></li><li><ahref=#api>API</a></li><li><ahref=#misc>Misc</a></li></ul></li></ul></nav></aside></header><articleclass=markdown><h1id=other-configurations>Other Configurations
<aclass=anchorhref=#badger>#</a></h2><p>Badger is a lightweight disk-based KeyValue storage engine used by the Gateway to implement the KV module.</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>badger.enabled</td><td>bool</td><td>Whether to enable the KV module implemented by Badger, default is <code>true</code></td></tr><tr><td>badger.single_bucket_mode</td><td>bool</td><td>Whether Badger module uses single bucket mode, default is <code>true</code></td></tr><tr><td>badger.sync_writes</td><td>bool</td><td>Whether Badger module uses synchronous writes, default is <code>false</code></td></tr><tr><td>badger.mem_table_size</td><td>int64</td><td>Size of the in-memory table used by Badger module, default is <code>10 * 1024 * 1024</code> (10485760)</td></tr><tr><td>badger.value_log_file_size</td><td>int64</td><td>Size of Badger module’s log files, default is <code>1<<30 - 1</code> (1GB)</td></tr><tr><td>badger.value_log_max_entries</td><td>int64</td><td>Maximum number of log entries for Badger module, default is <code>1000000</code></td></tr><tr><td>badger.value_threshold</td><td>int64</td><td>Value threshold for Badger module’s log files, default is <code>1048576</code> (1MB)</td></tr><tr><td>badger.num_mem_tables</td><td>int64</td><td>Number of in-memory tables for Badger module, default is <code>1</code></td></tr><tr><td>badger.num_level0_tables</td><td>int64</td><td>Number of Level0 in-memory tables for Badger module, default is <code>1</code></td></tr></tbody></table><h2id=resource-limitations>Resource Limitations
67
67
<aclass=anchorhref=#resource-limitations>#</a></h2><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>resource_limit.cpu.max_num_of_cpus</td><td>int</td><td>Maximum number of CPU cores allowed to be used, Linux only with <code>taskset</code> command available.</td></tr><tr><td>resource_limit.cpu.affinity_list</td><td>string</td><td>CPU affinity settings, e.g., <code>0,2,5</code> or <code>0-8</code>, Linux only with <code>taskset</code> command available.</td></tr><tr><td>resource_limit.memory.max_in_bytes</td><td>string</td><td>the max size of Memory to use, soft limit only</td></tr></tbody></table><h2id=network-configuration>Network Configuration
68
68
<aclass=anchorhref=#network-configuration>#</a></h2><p>Common network configurations.</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>*.network.host</td><td>string</td><td>Network address listened to by the service, for example, <code>192.168.3.10</code></td></tr><tr><td>*.network.port</td><td>int</td><td>Port address listened to by the service, for example, <code>8000</code></td></tr><tr><td>*.network.binding</td><td>string</td><td>Network binding address listened to by the service, for example, <code>0.0.0.0:8000</code></td></tr><tr><td>*.network.publish</td><td>string</td><td>External access address listened to by the service, for example, <code>192.168.3.10:8000</code></td></tr><tr><td>*.network.reuse_port</td><td>bool</td><td>Whether to reuse the network port for multi-process port sharing</td></tr><tr><td>*.network.skip_occupied_port</td><td>bool</td><td>Whether to automatically skip occupied ports</td></tr></tbody></table><h2id=tls-configuration>TLS Configuration
69
-
<aclass=anchorhref=#tls-configuration>#</a></h2><p>Common TLS configurations.</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>*.tls.enabled</td><td>bool</td><td>Whether TLS secure transmission is enabled or not, can auto generate cert files if not specified any cert files</td></tr><tr><td>*.tls.ca_file</td><td>string</td><td>Path to the public CA cert of the TLS security certificate</td></tr><tr><td>*.tls.cert_file</td><td>string</td><td>Path to the public key of the TLS security certificate</td></tr><tr><td>*.tls.key_file</td><td>string</td><td>Path to the private key of the TLS security certificate</td></tr><tr><td>*.tls.skip_insecure_verify</td><td>bool</td><td>Whether to ignore TLS certificate verification</td></tr><tr><td>*.tls.default_domain</td><td>string</td><td>The default domain for auto generated certs</td></tr><tr><td>*.tls.skip_domain_verify</td><td>bool</td><td>Whether to skip domain verify or not</td></tr><tr><td>*.tls.client_session_cache_size</td><td>int</td><td>Set the max cache of ClientSessionState entries for TLS session resumption</td></tr></tbody></table><h2id=api>API
</code></pre><p>Common TLS configurations.</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>*.tls.enabled</td><td>bool</td><td>Whether TLS secure transmission is enabled or not, can auto generate cert files if not specified any cert files</td></tr><tr><td>*.tls.ca_file</td><td>string</td><td>Path to the public CA cert of the TLS security certificate</td></tr><tr><td>*.tls.cert_file</td><td>string</td><td>Path to the public key of the TLS security certificate</td></tr><tr><td>*.tls.key_file</td><td>string</td><td>Path to the private key of the TLS security certificate</td></tr><tr><td>*.tls.skip_insecure_verify</td><td>bool</td><td>Whether to ignore TLS certificate verification</td></tr><tr><td>*.tls.default_domain</td><td>string</td><td>The default domain for auto generated certs</td></tr><tr><td>*.tls.skip_domain_verify</td><td>bool</td><td>Whether to skip domain verify or not</td></tr><tr><td>*.tls.client_session_cache_size</td><td>int</td><td>Set the max cache of ClientSessionState entries for TLS session resumption</td></tr></tbody></table><h3id=auto-issue-tls-certificates>Auto-Issue TLS Certificates
89
+
<aclass=anchorhref=#auto-issue-tls-certificates>#</a></h3><p>Both the <code>api</code> and <code>web</code> modules support auto-issuing TLS certificates via Let’s Encrypt. This feature can be configured under <code>*.tls.auto_issue</code>:</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>*.tls.auto_issue.enabled</td><td>bool</td><td>Enables automatic issuance of TLS certificates using Let’s Encrypt.</td></tr><tr><td>*.tls.auto_issue.path</td><td>string</td><td>Directory path where auto-issued certificates should be stored.</td></tr><tr><td>*.tls.auto_issue.email</td><td>string</td><td>Contact email for certificate issuance notifications and expiry warnings.</td></tr><tr><td>*.tls.auto_issue.include_default_domain</td><td>bool</td><td>Whether to include the <code>default_domain</code> in the list of domains for auto-issuance.</td></tr><tr><td>*.tls.auto_issue.domains</td><td>[]string</td><td>List of additional domains for which TLS certificates will be issued.</td></tr><tr><td>*.tls.auto_issue.provider</td><td>object</td><td>Specifies the DNS provider configuration for DNS-based domain validation.</td></tr></tbody></table><h4id=dns-provider-configuration-tencent-cloud>DNS Provider Configuration (Tencent Cloud)
90
+
<aclass=anchorhref=#dns-provider-configuration-tencent-cloud>#</a></h4><p>To support DNS-based verification with Tencent Cloud, configure the following within <code>*.tls.auto_issue.provider</code>:</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tencent_dns.secret_id</code></td><td>string</td><td>Secret ID for Tencent Cloud API access.</td></tr><tr><td><code>tencent_dns.secret_key</code></td><td>string</td><td>Secret Key for Tencent Cloud API access.</td></tr></tbody></table><p>To set up and store the Tencent Cloud credentials securely, use the keystore commands:</p><divclass=highlight><prestyle=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><codeclass=language-bashdata-lang=bash>./bin/coco keystore add TENCENT_DNS_ID
91
+
./bin/coco keystore add TENCENT_DNS_KEY
92
+
</code></pre></div><h2id=api>API
70
93
<aclass=anchorhref=#api>#</a></h2><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>api.enabled</td><td>bool</td><td>Whether to enable the API module, default is <code>true</code></td></tr><tr><td>api.network</td><td>object</td><td>Networking config, please refer to common network configuration section</td></tr><tr><td>api.tls</td><td>object</td><td>TLS config, please refer to common TLS configuration section</td></tr><tr><td>api.security</td><td>object</td><td>Security config for API module</td></tr><tr><td>api.security.enabled</td><td>bool</td><td>Whether security is enabled or not</td></tr><tr><td>api.security.username</td><td>string</td><td>The username for security</td></tr><tr><td>api.security.password</td><td>string</td><td>The password for security</td></tr><tr><td>api.cors.allowed_origins</td><td>[]string</td><td>The list of origins a cross-domain request can be executed from</td></tr><tr><td>api.websocket</td><td>object</td><td>Websocket config for API module</td></tr><tr><td>api.websocket.enabled</td><td>object</td><td>Whether websocket is enabled or not</td></tr><tr><td>api.websocket.permitted_hosts</td><td>[]string</td><td>The list of hosts that permitted to access the websocket service</td></tr><tr><td>api.websocket.skip_host_verify</td><td>bool</td><td>Whether websocket skip verify the host or not</td></tr></tbody></table><h2id=misc>Misc
71
94
<aclass=anchorhref=#misc>#</a></h2><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>preference.pipeline_enabled_by_default</td><td>map</td><td>Whether pipelines are enabled by default. If set to <code>false</code>, each pipeline must be explicitly configured with <code>enabled</code> set to <code>true</code></td></tr></tbody></table></article><footerclass=book-footer><divclass="flex flex-wrap justify-between"><div><aclass="flex align-center" href=https://github.com/infinilabs/gateway/edit/main/docs/content.en/docs/references/config.mdtarget=_blankrel=noopener><imgsrc=/gateway/latest/svg/edit.svgclass=book-iconalt=Edit>
0 commit comments