Event-Based Service Notification Gateway
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing distributed systems face scalability issues with notification protocols, as the partition key concept is too fine-grained, complaint-based mechanisms are not always available, pre-fetching into the cache is common, and notifications are often implemented as non-paged long-polls, leading to latency and inefficiencies.
Innovation Solution
The introduction of event-based service change notifications, where gateways manage filters named based on a naming format, receive configuration updates from a failover manager, and provide notifications to clients when a filter name matches a service name, allowing for efficient endpoint updates and caching, with features like prefix matching and versioning to optimize notification delivery.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If long-polling based solutions are used for service location notifications, then clients can receive updates about service locations, but the solution does not scale with the number of hosted services and poll notifications become very large and unmanageable
Solution Approach 1:
The notification system is segmented by introducing partition keys that divide the service namespace into manageable partitions. Instead of notifying clients about all services, notifications are partitioned and sent only for relevant service partitions, making the system scalable while maintaining reliable update delivery.
Solution Approach 2:
The system adds a new dimension to the notification protocol by introducing partition keys as an additional filtering criterion. This allows clients to subscribe to specific partitions rather than receiving all service notifications, transforming the notification approach from broadcast-all to targeted-delivery based on partition dimensions.
2Adaptability or versatility
If partition-based notifications are used at fine-grained granularity, then specific service partitions can be targeted, but the notification protocol becomes too complex and does not provide required scalability for distributed systems
Solution Approach 1:
The notification protocol is designed with universal structures that can handle both fine-grained partition notifications and coarse-grained service-wide notifications using the same framework. The partition key mechanism serves multiple purposes: filtering, routing, and scaling, reducing protocol complexity while maintaining adaptability.
Solution Approach 2:
The system implements partial notification delivery by sending notifications only for partitions that match client subscriptions rather than all partitions. This partial action approach reduces protocol complexity and improves scalability while maintaining the capability to target specific partitions when needed.
3Reliability
If non-paged long-polls are used for notifications, then periodic updates can be received, but large notification requests or replies experience latencies dependent on poll interval and constant polling is not desirable
Solution Approach 1:
The system performs preliminary filtering of notifications at the gateway level before sending them to clients. By pre-processing and filtering notifications based on partition keys and client subscriptions, the system prepares only relevant notifications for delivery, reducing latency and eliminating the need for constant polling intervals.
Solution Approach 2:
The gateway acts as an intermediary between the service registry and clients, buffering and filtering notifications before delivery. This intermediary layer decouples the polling mechanism from the notification delivery, allowing the system to reduce poll intervals and latency without requiring clients to constantly poll.
Data Source
AI summary
Embodiments are directed to a cluster of nodes configured to run one or more services. A gateway on each node is configured to provide communication between the node and clients. The gateways manage filters designated by the clients, wherein the filters are named based upon a naming format used to name the services. The gateways receive configuration updates broadcast by a failover manager. The configuration updates comprise service endpoint changes for services running on the nodes. The gateways provide notifications to clients when a filter name matches at least a portion of a service name in a configuration update. The configuration updates identify a configuration version, and the gateways may provide notifications with endpoint information from more than one configuration update version. Notifications may be configured to be sent only when the endpoint for a primary replica of a service has changed.


