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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
*[FEATURE] Querier: Implement Resource Based Throttling in Querier. #7442
13
13
*[ENHANCEMENT] Upgrade prometheus alertmanager version to v0.32.1. #7462
14
14
*[ENHANCEMENT] Tenant Federation: Avoid purging the regex resolver LRU cache on user-sync ticks when the set of known users has not changed. #7489
15
+
*[ENHANCEMENT] Memberlist: Add `-memberlist.packet-read-timeout`, `-memberlist.max-packet-size`, and `-memberlist.max-concurrent-connections` flags to bound inbound gossip TCP connections, preventing slow-read, OOM, and connection-flood attacks on the gossip port. #7518
15
16
*[ENHANCEMENT] Parquet Converter: Add a ring status page to expose the ring status. #7455
16
17
*[ENHANCEMENT] Ingester: Add WAL record metrics to help evaluate the effectiveness of WAL compression type (e.g. snappy, zstd): `cortex_ingester_tsdb_wal_record_part_writes_total`, `cortex_ingester_tsdb_wal_record_parts_bytes_written_total`, and `cortex_ingester_tsdb_wal_record_bytes_saved_total`. #7420
f.IntVar(&cfg.BindPort, prefix+"memberlist.bind-port", 7946, "Port to listen on for gossip messages.")
73
83
f.DurationVar(&cfg.PacketDialTimeout, prefix+"memberlist.packet-dial-timeout", 5*time.Second, "Timeout used when connecting to other nodes to send packet.")
74
84
f.DurationVar(&cfg.PacketWriteTimeout, prefix+"memberlist.packet-write-timeout", 5*time.Second, "Timeout for writing 'packet' data.")
85
+
f.DurationVar(&cfg.PacketReadTimeout, prefix+"memberlist.packet-read-timeout", 5*time.Second, "Timeout for reading packet data from inbound connections. 0 = no limit.")
86
+
f.Int64Var(&cfg.MaxPacketSize, prefix+"memberlist.max-packet-size", 1*1024*1024/*1MB*/, "Maximum size in bytes of an inbound gossip packet. 0 = no limit.")
87
+
f.IntVar(&cfg.MaxConcurrentConnections, prefix+"memberlist.max-concurrent-connections", 100, "Maximum number of concurrent inbound TCP connections. 0 = no limit.")
75
88
f.BoolVar(&cfg.TransportDebug, prefix+"memberlist.transport-debug", false, "Log debug transport messages. Note: global log.level must be at debug level as well.")
76
89
77
90
f.BoolVar(&cfg.TLSEnabled, prefix+"memberlist.tls-enabled", false, "Enable TLS on the memberlist transport layer.")
@@ -90,6 +103,9 @@ type TCPTransport struct {
90
103
tcpListeners []net.Listener
91
104
tlsConfig*tls.Config
92
105
106
+
// connSemaphore limits the number of concurrent inbound TCP connections.
107
+
connSemaphore*semaphore.Weighted
108
+
93
109
shutdown atomic.Int32
94
110
95
111
advertiseMu sync.RWMutex
@@ -107,6 +123,10 @@ type TCPTransport struct {
107
123
sentPacketsBytes prometheus.Counter
108
124
sentPacketsErrors prometheus.Counter
109
125
unknownConnections prometheus.Counter
126
+
rejectedConnections prometheus.Counter
127
+
activeConnections prometheus.Gauge
128
+
packetReceiveDuration prometheus.Histogram
129
+
packetReceiveBytes prometheus.Histogram
110
130
}
111
131
112
132
// NewTCPTransport returns a new tcp-based transport with the given configuration. On
0 commit comments