diff --git a/src/Proto.Actor/Deduplication/DeduplicationContext.cs b/src/Proto.Actor/Deduplication/DeduplicationContext.cs index e55ecafe48..a6b87a1e8f 100644 --- a/src/Proto.Actor/Deduplication/DeduplicationContext.cs +++ b/src/Proto.Actor/Deduplication/DeduplicationContext.cs @@ -72,6 +72,8 @@ public async Task DeDuplicate(MessageEnvelope envelope, Func continuation) if (IsDuplicate(key!, cutoff)) { _logger.LogInformation("Request de-duplicated"); + // Update timestamp to keep a sliding window of TTL + _processed[key!]= now; return; } diff --git a/src/Proto.Cluster/ClusterConfig.cs b/src/Proto.Cluster/ClusterConfig.cs index a48169719a..a6678d1b1d 100644 --- a/src/Proto.Cluster/ClusterConfig.cs +++ b/src/Proto.Cluster/ClusterConfig.cs @@ -43,7 +43,7 @@ private ClusterConfig(string clusterName, IClusterProvider clusterProvider, IIde GossipFanout = 3; GossipMaxSend = 50; HeartbeatExpiration = TimeSpan.Zero; - ClusterRequestDeDuplicationWindow = TimeSpan.FromSeconds(30); + ClusterRequestDeDuplicationWindow = TimeSpan.FromMinutes(1); IdentityLookup = identityLookup; MemberStrategyBuilder = (_, _) => new SimpleMemberStrategy(); RemotePidCacheTimeToLive = TimeSpan.FromMinutes(15);