From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id C9A2F1FF133 for ; Mon, 11 May 2026 15:46:50 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A90FE1AEAA; Mon, 11 May 2026 15:46:50 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox{,-backup} v2 0/3] fix #6373: HTTP level keepalive for http2 backup reader/writer connection Date: Mon, 11 May 2026 15:46:07 +0200 Message-ID: <20260511134610.675164-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778507062077 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com,mod.rs,helpers.rs,lib.rs,h2service.rs] Message-ID-Hash: G5DKVVIBNO354X3T6244YRT7TIWMR2L2 X-Message-ID-Hash: G5DKVVIBNO354X3T6244YRT7TIWMR2L2 X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Patches implement a HTTP level keepalive mechanism to avoid of active but idle http2 connections established by the backup reader or writer being dropped by reverse proxies. Regular heartbeat requests are send to the Proxmox Backup Server, the frequency based on a given timeout. Heartbeat traffic is only send if no other requests have been send during the timeout period. The timeout given in seconds is read from the respective environment variable, PBS_READER_HEARTBEAT_TIMEOUT for readers and PBS_WRITER_HEARTBEAT_TIMEOUT for writers. If not set, no heartbeat traffic is being send. Since each HTTP request is being logged to the task log for http2 connections, implement a filtering logic allowing to exclude these request logs to avoid log flodding. Example configurations for testing can be found on the individual patch fixing the issue. Changes since RFC version (thanks @Fabian for comments and suggestions): - Implement heartbeat traffic also for backup writer, not just reader - Refactor and combine common logic for both variants - Fix request method to be get() instead of download() - Threat env variable parsing errors as errors instead of ignoring them Link to the bugtracker issue: https://bugzilla.proxmox.com/show_bug.cgi?id=6373 proxmox: Christian Ebner (1): rest-server: add request logfilter by method and path in h2 service proxmox-rest-server/src/h2service.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) proxmox-backup: Christian Ebner (2): api: add heartbeat endpoint for backup reader/writer http/2 clients fix #6373: HTTP level client heartbeat for proxy connection keepalive pbs-client/src/backup_reader.rs | 67 ++++++++++++++-- pbs-client/src/backup_writer.rs | 131 +++++++++++++++++++++++++++++--- pbs-client/src/lib.rs | 25 ++++++ src/api2/backup/mod.rs | 13 +++- src/api2/helpers.rs | 14 +++- src/api2/reader/mod.rs | 13 +++- 6 files changed, 238 insertions(+), 25 deletions(-) Summary over all repositories: 7 files changed, 254 insertions(+), 27 deletions(-) -- Generated by murpp 0.11.0