美文网首页
m3db m3dbnode 配置文件详解

m3db m3dbnode 配置文件详解

作者: 微苦的茶 | 来源:发表于2021-06-10 15:58 被阅读0次

    # 如果要启用嵌入式 M3 Coordinator 实例,请包含此字段

    coordinator:

      # M3 Coordinator 监听流量的地址。

      listenAddress: <url>

    # 数据库节点的配置(必填)

    db:

      # 数据库索引配置

      index:

        # 并发服务的未完成QueryID请求的最大数量

        maxQueryIDsConcurrency: <int>

        # 限制正则表达式确定性有限自动机使用的最大状态数

        # Default = 10000

        regexpDFALimit: <int>

        # 限制有限状态自动机使用的最大字节数

        # Default 10mb (10 million)

        regexpFSALimit: <int>

        # 当接近块边界时传入写入写入下一个块的可能性

        forwardIndexProbability: <float>

        # 前向写入的阈值,作为给定命名空间的 bufferFuture 的一部分

        forwardIndexThreshold: <float>

      # 用于转换传入写入的配置选项

      transforms:

        # 应用于传入写入的截断类型,有效选项:[none, block]

        # none = 没有截断发生

        # block = 将传入写入截断到此点时间戳之前的块边界

        truncateBy: <string>

        # 将所有传入的写入值设置为什么

        forceValue: <float>

      # 发出的最低日志级别。

      logging:

        #日志文件位置

        file: <string>

        # 错误日志级别

        level: <string>

        # 键值对发送到日志

        fields: <map_of_strings>

      # 发布指标的选项

      metrics:

        # 指标范围

        scope:

          # 为收集的指标添加前缀

          prefix: <string>

          # 收集指标的报告频率

          reportingInterval: <duration>

          # 由收集的指标共享的标签

          tags: <map of strings>

        # Prometheus 报告器的配置(如果使用)

        prometheus:

          # 应用程序的指标收集端点

          # Default = "/metrics"

          handlerPath: <string>

          # 监听指标地址

          # Default = "0.0.0.0:7203"

          listenAddress: <url>

          # 用于 Tally 计时器的默认 Prometheus 类型,有效选项:[histogram, summary]

          timerType: <string>

          # 设置报告者使用的默认直方图目标

          defaultHistogramBuckets:

            # 桶的上限

            upper: <float>

          # 设置报告者使用的默认摘要目标

          defaultSummaryObjectives:

            percentile: <float>

            allowedError: <float>

          # 监听指定监听地址或向 Prometheus 注册度量时出现错误怎么办,有效选项:[stderr, log, none]

          # 默认 = panic 并停止 goroutine 的执行

          onError: <string>

        # 指标清理类型,有效选项:[none, m3, prometheus]

        # Default = "none"

        sanitization: <string>

        # 指标采样率。最小值=0.0,最大值=1.0

        samplingRate: <float>

        # 启用 Go 运行时指标,有效选项:[无、简单、中等、详细]

        # 查看 https://github.com/m3db/m3/blob/master/src/x/instrument/extended.go#L39:L64 了解更多详情

        extended: <string>

    #监听节点服务的主机和端口

      # Default = "0.0.0.0:9000"

      listenAddress: <url>

    #监听集群服务的主机和端口

      # Default = "0.0.0.0:9001"

      clusterListenAddress: <url>

    #监听节点json/http api的主机和端口(主要用于调试)

      # Default = "0.0.0.0:9002" 

      httpNodeListenAddress: <url>

    #监听集群json/http api的主机和端口(主要用于调试)

      # Default = "0.0.0.0:9003" 

      httpClusterListenAddress: <url>

    #监听调试api (pprof等)的地址。

      # Default = "0.0.0.0:9004"

      debugListenAddress: <url>

      # 用于解析实例主机ID的配置。

      hostID:

        # 用来匹配主机ID的解析器,有效选项:[hostname, config, environment, file]

        resolver: <string>

        # 如果使用“environment”解析器,则是指定主机ID的环境变量

        envVarName: <string>

    #如果使用"file"解析器,是指定主机ID的文件路径

        file:

    #文件路径

          path: <string>

    #等待文件超时

          timeout: <duration>

    #如果使用“config”解析器,是配置指定的主机ID

        # Default = "m3db_local"

        value: m3db_local

    #如果使用"hostname"解析器,是指定主机的主机名

        hostname:

          # 要使用的自定义格式,使用 go 模板。

          format: <string>

      client:

        # 写入集群的一致性级别,有效选项:[none, one, most, all]

        writeConsistencyLevel: <string>

        # 从集群读取的一致性级别,有效选项:[none, one, unstrict_majority, most, unstrict_all, all]

        readConsistencyLevel: <string>

        # 写入数据的超时时间

        writeTimeout: <duration>

        # 任何给定查询的获取超时

        # 范围 = 30s 到 5m

        fetchTimeout: <duration>

        # 集群连接超时

        connectTimeout: <duration>

        # 重试写操作的配置

        writeRetry:

          initialBackoff: <duration>

          # 指数退避系数

          backoffFactor: <float>

          # 最大退避时间

          maxBackoff: <duration>

          # 最大重试次数

          maxRetries: <int>

          # 为等待间隔添加随机性

          jitter: <bool>

        # 重试获取操作的配置

        fetchRetry:

          initialBackoff: <duration>

          # 指数退避系数

          backoffFactor: <float>

          # 最大退避时间

          maxBackoff: <duration>

          # 最大重试次数

          maxRetries: <int>

          # 为等待间隔添加随机性

          jitter: <bool>

        # 在不考虑连接之前背景检查失败的次数

        backgroundHealthCheckFailLimit: <int>

        # 在健康检查失败和下一次检查之间休眠时主机连接时间的因素

        backgroundHealthCheckFailThrottleFactor: <float>

      # 初始垃圾回收目标百分比

      # Range = 0 to 100

      gcPercentage: <int>

      # 区块旋转后台处理的tick配置

      tick:

        # 在一个滴答中一起处理系列的批量大小

        seriesBatchSize: <int>

        # 在一个刻度批次完成时,每个系列的刻度睡眠

        perSeriesSleepDuration: <duration>

        # 节点的最小滴答间隔

        minimumInterval: <duration>

      # 异步编写新系列以快速摄取新的 ID 突发

      writeNewSeriesAsync: <bool>

      # 在新系列插入的批次之间写入新系列退避

      writeNewSeriesBackoffDuration: <duration>

      # 节点引导程序的配置

      bootstrap:

        # Boostrap 模式,有效选项:[默认,prefer_peers,exclude_commitlog]

        mode: <string>

        # 文件系统引导程序

        filesystem:

          # 将现有数据文件集迁移到哪个版本(如果有)

          migration:

            # 升级文件集到指定版本

            targetMigrationVersion: <int>

            # 执行迁移的并发工作线程数

            concurrency: <int>

        # 提交日志引导程序的配置

        commitlog:

          # 遇到损坏的 ommit 日志文件时返回未完成

          returnUnfulfilledForCorruptCommitLogFiles: <bool>

        # 对等引导程序的配置

        peers:

          # 有多少分片并行在对等点之间传输内存数据

          # Defaults = numCPU

          streamShardConcurrency: <int>

          # 有多少分片并行流式传输以用于对等点之间的历史流式传输

          # Default  = numCPU / 2

          streamPersistShardConcurrency: <int>

          # 控制有多少分片并行刷新历史数据流在对等点之间

          # Default = 1

          streamPersistShardFlushConcurrency: <int>

        # 单个引导程序是否跨所有命名空间、分片或块缓存系列元数据

        cacheSeriesMetadata: <bool>

        # 构建索引段的并发

        indexSegmentConcurrency: <int>

        # 验证检查以在引导期间启用

        verify:

          verifyIndexSegments: <bool>

      # 块检索策略

      blockRetrieve:

        # 并发从磁盘获取块

        fetchConcurrency: <int>

        # 全局启用/禁用用于缓存从磁盘获取的块的回调

        cacheBlocksOnRetrieve: <bool>

      # 数据库块的缓存策略

      cache:

        # 系列缓存策略

        series:

          # 使用策略,有效选项:[none, all, recent_read, lru]

          policy: <string>

          # 如果使用 LRU 策略

          lru:

            maxBlocks: <int>

            eventsChannelSize: <int>

        # PostingsList cache policy

        # PostingsList 缓存策略

          size: <int>

          cacheRegexp: <bool>

          cacheTerms: <bool>

        # 为查询正则表达式编译正则表达式缓存

        regexp:

          size: <int>

      # 提交日志配置

      commitlog:

        # 刷新提交日志前缓冲的最大字节数

        flushMaxBytes: <int>

        # 刷新提交日志前数据可以保持缓冲的最长时间

        flushEvery: <duration>

        # commitlog队列的配置。高吞吐量设置可能需要更高的

        # 值。更高的值使用更多的内存。

        queue:

          # 如何缩放计算大小,有效选项:[fixed, percpu]

          calculationType: <string>

          size: <int>

        # 实现提交日志队列的Golang通道

        queueChannel:

          # 如何缩放计算大小,有效选项:[fixed, percpu]

          calculationType: <string>

          size: <int>

      # 节点文件系统的配置

      filesystem:

        # 存放 M3DB 数据的目录

        filePathPrefix: <string>

        # 写入缓冲区大小

        writeBufferSize: <int>

        # 数据读取缓冲区大小

        dataReadBufferSize: <int>

        # 信息元数据文件读取缓冲区大小

        infoReadBufferSize: <int>

        # 求数据读取缓冲区大小

        seekReadBufferSize: <int>

        # 磁盘刷新吞吐量限制(以 Mb/s 为单位)

        throughputLimitMbps: <float>

        # 磁盘刷新吞吐量检查间隔

        throughputCheckEvery: <int>

        # 创建文件时使用的新文件权限模式,指定为三位数

        newFileMode: <string>

        # 创建目录时使用的新文件权限模式,指定为三位数

        newDirectoryMode: <string>

        # 映射配置

        mmap:

          # 大页面配置(仅限 Linux)

          hugeTLB:

            enabled: <bool>

            # 使用巨大 TLB 的阈值

            threshold: <int>

        # 强制存储索引查找字节的 mmap 为内存中的匿名区域

        force_index_summaries_mmap_memory: <bool>

        # 强制存储布隆过滤器字节的 mmap 成为内存中的匿名区域

        force_bloom_filter_mmap_memory: <bool>

        # 文件集文件布隆过滤器的目标误报百分比

        bloomFilterFalsePositivePercent: <float>

      # 集群间数据复制策略

      replication:

        # 复制数据的集群

        clusters:

          # 集群名称

          name: <string>

          # 用于构造客户端的配置

          client:

            config:

            # 写入集群的一致性级别,有效选项:[none, one, most, all]

            writeConsistencyLevel: <string>

            # 从集群中读取的一致性级别,有效选项:[none, one, unstrict_majority, most, unstrict_all, all]

            readConsistencyLevel: <string>

            # 连接集群的一致性级别,有效选项:[unknown, any, all, unrestrict_all, one, none, most, unstrict_majority]

            connectConsistencyLevel: <string>

            # 写入数据的超时时间

            writeTimeout: <duration>

            # 任何给定查询的获取超时

            # Range =  30s to 5m

            fetchTimeout: <duration>

            # 集群连接超时

            connectTimeout: <duration>

            # 重试写操作的配置

            writeRetry:

              initialBackoff: <duration>

              # 指数退避系数

              backoffFactor: <float>

              # 最大退避时间

              maxBackoff: <duration>

              # 最大重试次数

              maxRetries: <int>

              # 为等待间隔添加随机性

              jitter: <bool>

            # 重试获取操作的配置

            fetchRetry:

              initialBackoff: <duration>

              # 指数退避系数

              backoffFactor: <float>

              # 最大退避时间

              maxBackoff: <duration>

              # 最大重试次数

              maxRetries: <int>

              # 为等待间隔添加随机性

              jitter: <bool>

            # 日志错误采样率

            logErrorSampleRate: <float>

            # 在不考虑连接之前背景检查失败的次数

            backgroundHealthCheckFailLimit: <int>

            # 在健康检查失败和下一次检查之间休眠时主机连接时间的因素

            backgroundHealthCheckFailThrottleFactor: <float>

            # 将 ID 散列到分片配置

            hashing:

              # Murmur32 种子值

              seed: <int>

            # 特定于在 ProtoDataMode 下运行的配置

            proto:

              # 开启原型模式

              enabled: <bool>

              # 在启动/初始化时将客户端配置中的用户模式加载到模式注册表中

              schema_registry:

                messageName: <string>

                schemaDeployID: <string>

                schemaFilePath: <string>

            # 异步写入请求的工作池大小

            asyncWriteWorkerPoolSize: <int>

            # 异步写请求的最大并发

            asyncWriteMaxConcurrency: <int>

            # 将所有写入按指定的持续时间偏移到过去

            writeTimestampOffset: <duration>

            # 设置要从远程对等方的单个批次中检索的块数

            # Default = 4096

            fetchSeriesBlocksBatchSize: <int>

            # 是否写入正在初始化的分片

            # Defaults = true

            writeShardsInitializing: <bool>

            # 写入离开分片是否计入一致性

            # Default = false

            shardsLeavingCountTowardsConsistency: <bool>

      # 指定池化策略

      pooling:

        # 一个块的初始分配大小

        blockAllocSize: <int>

        # Thrift bytes pool 单个二进制字段的最大字节切片分配

        thriftBytesPoolAllocSize: <int>

        # 一般池type,有效选项:[简单]

        type: <string>

        # 分桶池配置

        bytesPool:

          # 池中桶的配置

          buckets:

            # 桶中的项目数

            count: <int>

            # 桶中每一项的容量

            capacity: <int>

          watermark:

            # 开始重新填充池的低水印

            # min=0.0, max=1.0

            low: <float>

            # 开始重新填充池的高水印

            # min=0.0, max=1.0

            high: <float>

      hashing:

        # Murmur32 种子值

        seed: <int>

      # 特定于在 ProtoDataMode 下运行的配置

      proto:

        # 开启原型模式

        enabled: <bool>

        # 在启动/初始化时将客户端配置中的用户模式加载到模式注册表中

        schema_registry:

          messageName: <string>

          schemaDeployID: <string>

          schemaFilePath: <string>

      # 启用跟踪,如果没有配置,则禁用跟踪

      tracing:

        # 跟踪服务的名称

        serviceName: <string>

        # 跟踪后端使用,有效选项:[jaeger, lightstep]

        backend: <string>

        # 如果使用 Jaeger,发送到跟踪后端的选项

        jaeger:

          # 要使用的服务名称

          serviceName: <string>

          # 禁用 jaeger 跟踪

          disabled: <bool>

          # Enable RPC metrics

          rpc_metrics: <bool>

          # 标签作为键/值对发送到跟踪后端

          tags: <array_of_strings>

          # Jaeger 采样配置

          sampler:

            # 采样器类型,有效选项:[const, probabilistic, rateLimiting, remote]

            type: <string>

            # 传递给采样器的值

            # 对于“const”采样器,0 或 1 分别表示总是假/真

            # 对于“概率”采样器,概率介于 0 和 1 之间

            # 对于“rateLimiting”采样器,每秒跨度数

            # 对于“远程”采样器,参数与“概率”相同,表示在实际采样率之前的初始采样率

            param: <float>

            # 可以为此服务提供采样策略的采样管理器的 URL

            samplingServerURL: <string>

            # 远程控制的采样器多久轮询采样管理器以获取适当的采样策略

            samplingRefreshInterval: <duration>

            # PerOperationSampler 跟踪的最大操作数

            maxOperations: <int>

            # 对于需要在使用 PerOperationSampler 时通过显式调用 SetOperationName 后期绑定跨度名称的应用程序

            operationNameLateBinding: <bool>

          # Jaeger 采样配置

          reporter:

            # 在开始丢弃新的跨度之前,记者可以在内存中保留多少跨度

            queueSize: <int>

            # 启用与主报告器并行运行的 LoggingReporter 并记录所有提交的跨度

            logSpans: <bool>

            # 指示报告者将跨度发送到此地址的 jaeger-agent

            localAgentHostPort: <string>

            # 禁用定期重新解析代理主机名并在发生更改时重新连接的 udp 连接助手

            disableAttemptReconnecting: <bool>

            # 将跨度发送到此 URL 的 jaeger-collector

            collectorEndpoint: <url>

            # 在向 jaeger-collector 发送 span 时包括一个用户进行基本的 http 身份验证

            user: <string>

            # 在向 jaeger 收集器发送跨度时包括基本 http 身份验证的密码

            password: <string>

            # 报告跨度时将这些标头添加到http请求中

            http_headers: <array_of_strings>

          # Jaeger 使用的标头键的值

          headers:

            # 强制将跟踪采样为“调试”跟踪

            jaegerDebugHeader: <string>

            # 当根跨度不存在时,在这个头部提交行李

            jaegerBaggageHeader: <string>

            # 用于传播追踪上下文

            TraceContextHeaderName: <string>

            # 用于传播行李,必须小写

            traceBaggageHeaderPrefix: <string>

          # 行李限制管理器将某些行李钥匙列入白名单

          baggage_restrictions:

            # 在从 Jaeger 代理检索限制之前拒绝或允许写入行李的启动失败模式

            denyBaggageOnInitializationFailure: <bool>

            # jaeger-agent 行李限制服务器的主机端口

            hostPort: <string>

            # 行李限制管理器多久查询一次 jaeger-agent 最近的行李限制

            refreshInterval: <duration>

          # 为客户端发送调试请求的速率配置节流器

          throttler:

            # jaeger-agent 信用服务器的主机端口

            hostPort: <string>

            # 节流器多久轮询 jaeger-agent 以获得更多节流积分

            refreshInterval: <duration>

            # 当第一次看到一个操作时,节流器应该同步地从代理中获取积分

            synchronousInitialization: <bool>

        # If using Lightstep, options to send to tracing backend

        # 如果使用 Lightstep,发送到跟踪后端的选项

          # API key for your LightStep project

          # LightStep 项目的 API 密钥

          access_token: <string>

          # 用于收集器的主机、端口和纯文本选项

          collector: <url>

          # 标签作为键/值对发送到跟踪后端

          tags: <array_of_strings>

          # 用于 LightStep Web API 的主机、端口和纯文本选项

          lightstep_api: <url>

          # 在将它们发送到收集器之前缓冲的最大跨度数

          max_buffered_spans: <int>

          # OpenTracing 日志记录键的最大允许大小(以字符为单位)

          max_log_key_lenmax_log_key_len: <int>

          # OpenTracing 日志值的最大允许大小(以字符为单位)。更长的值被截断。仅适用于可变长度的值类型(字符串、接口{} 等)

          max_log_value_len: <int>

          # 限制单个span中的日志数量

          max_logs_per_span: <int>

          # 限制客户端发送的grpc消息的字节大小

          grpc_max_call_send_msg_size_bytes: <int>

          # 将跨度发送到收集器之间的最大持续时间

          reporting_period: <duration>

          # 将跨度发送到收集器之间的最小持续时间

          min_reporting_period: <duration>

          # 向收集器发送跨度超时

          report_timeout: <duration>

          # 将所有 Span 上的日志事件转换为无操作

          drop_span_logs: <bool>

          # 强制使用 HTTP 连接

          use_http: <bool>

          # 强制使用 gRPC 连接

          usegrpc: <bool>

          # 重新连接到收集器的连接超时

          reconnect_period: <duration>

          # 启用 Lightstep 元事件日志记录

          meta_event_reporting_enabled: <bool>

      # 定义广泛操作的限制,优化跨任意查询范围的查询完整性而不是速度

      limits:

        # 在给定的回溯期内从磁盘读取的时间序列字节的上限

        maxRecentlyQueriedSeriesDiskBytesRead:

          # 限制的最大值

          value: <int>

          # 实施资源限制的时间段

          lookback: <duration>

        # 给定回顾期内时间序列块计数的上限

        maxRecentlyQueriedSeriesBlocks:

          # 限制的最大值

          value: <int>

          # 实施资源限制的时间段

          lookback: <duration>

        # 服务器在开始拒绝请求之前允许的最大未完成写入请求数

        maxOutstandingWriteRequests: <int>

        # 服务器在开始拒绝请求之前允许的最大未完成读取请求数

        maxOutstandingReadRequests: <int>

        # 作为修复过程的一部分可以加载到内存中的最大字节数

        maxOutstandingRepairedBytes: <int>

        # 一个块中允许的最大编码器数量

        maxEncodersPerBlock: <int>

        # 每秒写入新的系列限制以限制新 ID 爆发期间的压倒性

        writeNewSeriesPerSecond: <int>

      # 通过优化跨任意查询范围而不是速度的查询完整性来配置与常规路径不同的广泛操作。

      wide:

        # 批量操作的批量大小。这对应于在单个“块”内处理了多少系列

        # 更大的批量可以更快地完成查询,但会增加内存消耗

        batchSize: <int>

      # TChannel configuration

      tchannel:

        # Maximum idle time

        # 最大空闲时间

        # Idle check interview

        # 空闲检查面试

        idleCheckInterval: <duration>

      #调试配置

      debug:

        # 设置 runtime.SetMutexProfileFraction 报告互斥量争用事件

        # 有关该值的更多详细信息,请参阅 https://tip.golang.org/pkg/runtime/#SetMutexProfileFraction

        mutexProfileFraction: <int>

        # Sets runtime.BlockProfileRate to report blocking events

        # See https://golang.org/pkg/runtime/#SetBlockProfileRate for more details about the value.   

        blockProfileRate: <int>

      # Enable cold writes for all namespaces

      forceColdWritesEnabled: <bool>

      # etcd configuration

      discovery:

        # 使用的发现配置类型,有效选项:[config, m3db_single_node, m3db_cluster, m3aggregator_cluster]

        type: <string>

        # 通过 etcd 定义 M3DB 发现

        m3dbCluster:

          env: <string>

          zone: <string>

          endpoints: <array_of_strings>

    相关文章

      网友评论

          本文标题:m3db m3dbnode 配置文件详解

          本文链接:https://www.haomeiwen.com/subject/pktpeltx.html