Project: CubeFS (Runtime / Cloud Native Storage)
File: proxy.md

`Proxy` is the proxy module, mainly responsible for message forwarding, volume allocation and renewal proxy, caching, etc., mainly to alleviate the service pressure of clustermgr. The configuration of the proxy is based on the , and the following configuration instructions mainly focus on the private configuration of the proxy. ::: tip Note Starting from version v3.3.0, Proxy node supports caching of volume and disk information. ::: | Configuration Item | Description | Required | |:--|:|:| | Public configuration | Such as service port, running logs, audit logs, etc., refer to the section | Yes | | host | Current host information, used for reporting to clustermgr for service discovery, for example, http://serviceip:bindport | Yes | | cluster_id | Cluster ID | Yes | | idc | IDC ID | Yes | | retainintervals | Renewal interval cycle, used in conjunction with the volume expiration time set by cm | Yes | | initvolumenum | The number of volumes requested from clustermgr when starting up, set according to the size of the cluster | Yes | | defaultallocvols_num | The number of volumes requested from clustermgr each time, set according to the size of the cluster | Yes | | mq | Kafka producer configuration | Yes | | diskvbasepath | Persistent path for caching volume and disk information | Yes | ```json { "heartbeatintervals": "Interval for sending heartbeat to Clustermgr. The heartbeat time is heartbeatTicks * tickInterval", "heartbeatticks": "Used in conjunction with heartbeatinterval_s", "expires_ticks": "", "diskvbasepath": "Local persistent path for caching information", "volume_capacity": "Capacity of memory volume information, default is 1M", "volumeexpirationseconds": "Expiration time of memory volume information, default is 0, which means no expiration", "disk_capacity": "Capacity of memory disk information, default is 1M", "diskexpirationseconds": "Expiration time of memory disk information, default is 0, which means no expiration", "clustermgr": { "hosts": "List of clustermgr hosts, [`http://ip:port`,`http://ip1:port`]", "rpc": "Refer to the rpc LbClient configuration introduction" }, "bidallocnums": "Maximum number of bids that access can request from proxy each time", "host": "Current host information, used for reporting to clustermgr for service discovery, for example, http://serviceip:bindport", "cluster_id": "Cluster ID", "idc": "IDC ID", "retainintervals": "Renewal interval cycle, used in conjunction with the volume expiration time set by cm", "initvolumenum": "The number of volumes requested from clustermgr when starting up, set according to the size of the cluster", "defaultallocvols_num": "The number of volumes requested from clustermgr each time, access allocation requests can trigger", "retainvolumebatch_num": "The number of retain volumes in batches, which can relieve the pressure of a single retain, the default is 400", "retainbatchinterval_s": "Batch retain interval", "metricreportinterval_s": "Time interval for proxy to report running status to Prometheus", "mq": { "blobdeletetopic": "Topic name for delete messages", "shardrepairtopic": "Topic name for repair messages", "shardrepairpriority_topic": "Messages with high-priority repair will be delivered to this topic, usually when a bid has missing chunks in multiple chunks", "version": "kafka version, default is 2.1.0", "msg_sender": { "kafka": "Refer to the Kafka producer usage configuration introduction" } } } ``` ```json { "bind_addr": ":9600", "host": "http://127.0.0.1:9600", "idc": "z0", "cluster_id": 1, "defaultallocvols_num" : 2, "initvolumenum": 4, "diskvbasepath": "./run/cache", "clustermgr": { "hosts": [ "http://127.0.0.1:9998", "http://127.0.0.1:9999", "http://127.0.0.1:10000" ] }, "mq": { "blobdeletetopic": "blob_delete", "shardrepairtopic": "shard_repair", "shardrepairprioritytopic": "shardrepair_prior", "version": "0.10.2.0", "msg_sender": { "broker_list": ["127.0.0.1:9092"] } }, "log": { "level": "info", "filename": "./run/logs/proxy.log" } } ```