Service Router Policy Database for Microservice Routing Flexibility
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Microservice architectures face challenges in routing requests between service instances with flexibility, as existing methods lack the ability to adapt to various business scenarios without modifying the operation logic.
Innovation Solution
Implementing a service router with a routing policy database that applies routing policies based on service request addresses, allowing for flexible routing actions such as load balancing, A/B testing, and resource management, and prioritizing policies to determine the appropriate destination for service requests.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If a service router uses simple random or round-robin scheduling to route requests, then the operation is straightforward and simple, but the system lacks flexibility to adapt to different business scenarios
Solution Approach 1:
The patent segments the routing logic by introducing a routing policy database that separates routing strategies from the service router core. Each routing policy is an independent unit that can be configured separately, allowing multiple routing strategies (random, round-robin, weighted, etc.) to coexist without modifying the router's core operation logic. This segmentation enables flexibility while maintaining operational simplicity.
Solution Approach 2:
The patent applies preliminary action by pre-configuring routing policies in the routing policy database before requests arrive. Each policy is prepared in advance with its own routing logic and parameters, so when a request comes in, the router simply needs to select and apply the appropriate pre-prepared policy rather than making complex routing decisions in real-time. This maintains operational simplicity while enabling versatile routing scenarios.
2Adaptability or versatility
If routing policies are added to provide flexibility in various scenarios, then adaptability improves, but the system complexity increases
Solution Approach 1:
The routing policy database acts as an intermediary layer between the service router and service instances. It mediates the routing decisions by storing and managing multiple routing policies, allowing the router to remain simple while the database handles the complexity of policy management. This intermediary structure enables flexibility without increasing router complexity.
Solution Approach 2:
The routing policy database serves multiple functions: it stores routing policies, manages policy configurations, handles policy selection, and provides a interface for policy updates. By consolidating these diverse functions into a single universal component, the system achieves high adaptability without proportionally increasing overall system complexity.
3Adaptability or versatility
If the service router queries the routing policy database for each service request, then flexible routing decisions can be made, but the processing time increases
Solution Approach 1:
Routing policies are pre-configured and stored in the routing policy database before requests arrive. The matching criteria and routing logic are prepared in advance, so when a request comes in, the router only needs to perform a simple query and match operation rather than performing complex routing calculations in real-time. This preliminary preparation reduces processing time while maintaining flexible routing capabilities.
Solution Approach 2:
The routing policy database stores copies of routing policies that can be quickly queried and applied. Instead of computing routing logic from scratch for each request, the system uses pre-computed policy copies that contain all necessary routing information, enabling fast matching and decision-making while preserving routing flexibility.
Data Source
AI summary
A microservice architecture includes service instances collectively configured to cooperate with one another to provide a service, and a service router associated with the service instances and configured to receive a service request from a computing device. The service request includes a service request address. The service router includes a routing policy database with routing policies, with each routing policy including a routing policy address and a routing action. The service router queries the routing policy database with the service request address to find a routing policy having a routing policy address matching the service request address, and executes the routing action specified by the matched routing policy to complete routing of the service.


