Self-Refreshing Webhooks Cache
CybusMQ self-refreshing webhooks cache enables efficient authentication and authorization at scale by proactively refreshing cached objects.
Last updated
Was this helpful?
CybusMQ self-refreshing webhooks cache enables efficient authentication and authorization at scale by proactively refreshing cached objects.
CybusMQ includes a self-refreshing webhooks cache that enables efficient authentication and authorization at scale. The cache proactively refreshes authorization objects and prioritizes low-latency message routing over strict expiration enforcement.
You can use webhooks endpoints to implement custom authentication and authorization logic. CybusMQ caches authorization objects for faster reuse, but these cached objects have an expiration time after which they need to be re-authenticated through the webhook endpoint.
CybusMQ uses a refreshing mechanism that proactively updates cached authorization objects before they expire. Instead of waiting until an MQTT publish operation to discover an object has expired, the cache refreshes objects in the background. This approach:
Eliminates delays in publish operations caused by re-authentication.
Distributes webhook requests smoothly over time instead of in bursts.
Prevents overloading the webhook endpoint during specific traffic patterns.
To support environments with hundreds of thousands of authorization objects, the cache uses an allowing approach. When the webhook endpoint cannot keep up with the broker's performance and gets overloaded with requests, expired objects automatically have their validity extended.
This design prioritizes low-latency message routing over strict authorization expiration, based on the observation that authorization changes happen relatively rarely in typical deployments.
Low latency: Publish operations don't wait for authorization checks.
Smooth endpoint load: Webhook requests are distributed evenly over time.
High scalability: Handles authorization objects at this scale.
Graceful degradation: Continues operating when webhook endpoints are overloaded.
Last updated
Was this helpful?
Was this helpful?

