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
Updating IngesterClient MaxCallRecvMsgSize to be configurable vs fixed size (#712)
* Adding command line arg support for setting the max message size in the ingester client.
* Updating ingester config lifecycle to include initialization of ingester client config
* moving CompressToIngester setting to be contained within the ingesterClient config.
* Updating ingester client flags to have the a compress flag under the ingester.client namespace, but also leaving a (deprecated) fallback flag under distributor for back compat
// RegisterFlags adds the flags required to config this to the given FlagSet
86
86
func (cfg*Config) RegisterFlags(f*flag.FlagSet) {
87
87
flag.BoolVar(&cfg.EnableBilling, "distributor.enable-billing", false, "Report number of ingested samples to billing system.")
88
88
cfg.BillingConfig.RegisterFlags(f)
89
-
89
+
cfg.IngesterClientConfig.RegisterFlags(f)
90
90
flag.IntVar(&cfg.ReplicationFactor, "distributor.replication-factor", 3, "The number of ingesters to write to and read from.")
91
91
flag.DurationVar(&cfg.RemoteTimeout, "distributor.remote-timeout", 2*time.Second, "Timeout for downstream ingesters.")
92
92
flag.DurationVar(&cfg.ClientCleanupPeriod, "distributor.client-cleanup-period", 15*time.Second, "How frequently to clean up clients for ingesters that have gone away.")
93
93
flag.Float64Var(&cfg.IngestionRateLimit, "distributor.ingestion-rate-limit", 25000, "Per-user ingestion rate limit in samples per second.")
94
94
flag.IntVar(&cfg.IngestionBurstSize, "distributor.ingestion-burst-size", 50000, "Per-user allowed ingestion burst size (in number of samples).")
95
-
flag.BoolVar(&cfg.CompressToIngester, "distributor.compress-to-ingester", false, "Compress data in calls to ingesters.")
// Config is the configuration struct for the ingester client
51
+
typeConfigstruct {
52
+
MaxRecvMsgSizeint
53
+
CompressToIngesterbool
54
+
legacyCompressToIngesterbool
55
+
}
56
+
57
+
// RegisterFlags registers configuration settings used by the ingester client config
58
+
func (cfg*Config) RegisterFlags(f*flag.FlagSet) {
59
+
// We have seen 20MB returns from queries - add a bit of headroom
60
+
f.IntVar(&cfg.MaxRecvMsgSize, "ingester.client.max-recv-message-size", 64*1024*1024, "Maximum message size, in bytes, this client will receive.")
61
+
flag.BoolVar(&cfg.CompressToIngester, "ingester.client.compress-to-ingester", false, "Compress data in calls to ingesters.")
62
+
// moved from distributor pkg, but flag prefix left as back compat fallback for existing users.
63
+
flag.BoolVar(&cfg.legacyCompressToIngester, "distributor.compress-to-ingester", false, "Compress data in calls to ingesters. (DEPRECATED: use ingester.client.compress-to-ingester instead")
// RegisterFlags adds the flags required to config this to the given FlagSet
98
98
func (cfg*Config) RegisterFlags(f*flag.FlagSet) {
99
99
cfg.RingConfig.RegisterFlags(f)
100
100
cfg.userStatesConfig.RegisterFlags(f)
101
-
101
+
cfg.clientConfig.RegisterFlags(f)
102
102
f.IntVar(&cfg.NumTokens, "ingester.num-tokens", 128, "Number of tokens for each ingester.")
103
103
f.DurationVar(&cfg.HeartbeatPeriod, "ingester.heartbeat-period", 5*time.Second, "Period at which to heartbeat to consul.")
104
104
f.DurationVar(&cfg.JoinAfter, "ingester.join-after", 0*time.Second, "Period to wait for a claim from another ingester; will join automatically after this.")
0 commit comments