Parallel Event Outbox Tables for Microservice Bottleneck Resolution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In microservices architectures, the single events table becomes a bottleneck as the number of insert, update, query, and delete actions increases, leading to performance degradation and delayed user-initiated changes due to increased wait times for later events to complete.
Innovation Solution
Implementing a system with two parallel domain event outbox tables, one in serve mode and one in maintain mode, and a domain event indication table to manage events, switching modes at specific intervals or actions like purge events, to improve performance without unnecessary resource usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If a single events table is used to manage all events, then the system structure is simple, but performance degrades as the number of insert, update, query, and delete actions increases
Solution Approach 1:
The patent divides the single events table into multiple separate events tables (e.g., events table 108, 110, 112, 114) that can operate independently. This segmentation allows concurrent event processing across multiple tables, eliminating the bottleneck of a single table while maintaining manageable system complexity through organized distribution of event types or time periods.
2Productivity
If multiple events tables are implemented to improve performance, then event processing performance improves, but system complexity increases
Solution Approach 1:
The patent introduces an events broker (104) as an intermediary component that manages communication between producer domain services and consumer domain services across multiple events tables. This mediator handles event routing, filtering, and coordination, thereby simplifying the complexity of managing multiple tables by providing a centralized control point that abstracts the underlying table structure from service logic.
3Use of energy by moving object
If a single events table is used, then resource usage is efficient, but wait times increase for later events to complete
Solution Approach 1:
By segmenting events into multiple parallel tables, the system enables concurrent processing of event batches. Earlier events can be processed in one table while later events are simultaneously processed in another table, eliminating the sequential wait times that occur with a single table. This maintains resource efficiency by distributing the workload across multiple tables rather than concentrating it in one bottleneck.
Data Source
AI summary
In an example embodiment, to improve performance, a solution is provided that removes the bottleneck associated with a single events table. Specifically, the solution provides for three events tables rather than one table. Two of the three tables are domain event outbox tables that are parallel and equivalent to each other. The third table is a domain event indication table, which records which of the domain event outbox tables is in a serve mode versus a maintain mode. At any point in time, one of the two domain event outbox tables is in serve mode while the other is in maintain mode. Serve mode is used for event insert, update, and query, while maintain mode is used for event purge.


