Menu

Process-Local Deduplication Breaks the Moment You Add a Second Replica
📰

Process-Local Deduplication Breaks the Moment You Add a Second Replica

DEV Community: kubernetes·Zen Mesh Inc.·about 14 hours ago
#l37j0F8J
#devtokubernetes#devto#dev#replay#replica
Reading 0:00
15s threshold

This is article 6 of 10 in Beyond Kubernetes Defaults . Read article 5: A Running Pod Is Not an Admitted Workload first.

Single-process correctness can hide distributed-system bugs. Replay protection is a particularly clear example.

One replica, then two

A signed request arrives with a timestamp and a nonce. The application verifies the signature and records the nonce so it cannot be accepted twice. With one process and local state, this can look correct.

Now run two replicas behind a Kubernetes Service. The first request lands on replica A, which records nonce N locally. A replay lands on B, which has never seen N. B accepts the same signed request.

A Deployment or Service does not turn local security state into shared state. Scaling is not state synchronization.

Sticky routing is not a security boundary

Consistent hashing or sticky sessions can reduce the chance of a replay reaching another replica. But Pods restart, pools resize and endpoints change.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.