Performance Optimization Proposal for High-Frequency Updates - Include Simple Values in Backplane Messages #482
svetoslav-sportinno
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
We're huge fans of FusionCache's architecture and how it handles the complexity of distributed caching!
I'm reaching out regarding a potential optimization for FusionCache that could significantly improve performance in high-frequency update scenarios.
Our Use Case: Sports Betting Platform
We're building a real-time sports betting platform where we need to update event data extremely frequently:
Currently, every update triggers:
With 10 consumer nodes and 1k updates/second, this creates 10,000 Redis read operations per second just for cache synchronization.
Proposed Optimization: Include Simple Values in Backplane Messages
For simple value types like long, int, etc., we propose including the actual value directly in the backplane notification message instead of just the key and timestamp.
Current Flow:
Producer: Update Redis → Send Backplane(key, timestamp, SET)
Consumer: Receive notification → Fetch from Redis → Update L1
Optimized Flow:
Producer: Update Redis → Send Backplane(key, timestamp, SET, value)
Consumer: Receive notification → Update L1 directly (no Redis fetch)
Performance Impact:
Size Considerations:
Implementation Suggestions:
Proposed BackplaneMessage Enhancement:
public class BackplaneMessage {
public string SourceId;
public string CacheKey;
public BackplaneMessageAction Action;
public long Timestamp;
public byte[]? SerializedValue; // NEW: Optional serialized value or maybe T?
public bool HasValue; // NEW: Flag indicating value is included
}
This optimization would be particularly valuable for scenarios like ours where:
Would you be interested in discussing this enhancement? We'd be happy to contribute to the implementation or provide more detailed performance testing if this aligns with FusionCache's roadmap.
Best regards,
Svetoslav Mitov.
Beta Was this translation helpful? Give feedback.
All reactions