What's New in API7 Enterprise: Route Priority and Optimized Upstream Configuration

·

3 min read

In modern microservices architecture, as business needs continue to evolve, flexibility and scalability have become critical considerations. To address complex network configuration requirements such as cross-service route migration and frequent upstream configuration changes, API7 Enterprise v3.2.14 has implemented several feature optimizations.

Support for Route Priority

Associating a route with a new service typically involves two steps: first configuring the route on the new service, and then removing the route configuration from the old service. However, during these two steps, the route configurations on both the new and old services may be active simultaneously, causing uncertain traffic distribution, which can lead to service conflicts and data inconsistencies.

To solve this issue, API7 Enterprise introduces the route priority feature. This feature allows you to specify priorities when configuring routes, with the system selecting the route path based on the specified priorities. By setting appropriate priorities, you can ensure smooth traffic transitions during service migration and route switching, thereby avoiding service conflicts and data inconsistencies.

Route Priority

When a service is deployed to a gateway group, if there are routes from different services within the same group with identical domain + path prefix + path + priority, the system will prompt a route conflict and prevent deployment. This ensures that requests received by the gateway are not processed by uncertain routes, thereby avoiding traffic distribution uncertainty.

Duplicate Route Path with Same Priority

However, if you need to configure routes with the same domain + path prefix + path in the same gateway group, you only need to assign a different priority to the new route, such as 1.

Duplicate Route Path with Different Priority

In this case, there will be a prompt upon deployment, but this prompt will not prevent the deployment and is only for reference before deployment.

Upstream Configuration Optimization

  1. The display tab for canary shifting has been optimized. When canary shifting within a service is in progress, the tab will show the splitting percentage of each upstream, allowing you to quickly understand the status.

Improved Display of Canary Shifting

  1. When deploying based on service templates to a gateway group, it is now possible to edit all upstream-related configurations during the deployment process. All upstream configurations have been upgraded to runtime configurations, allowing for edits even after the service is deployed, to better adapt to frequent upstream changes.

Flexible Upstream Configuration

  1. The configuration forms related to upstream connections have been optimized. Some form titles have been adjusted, and items with strong correlations have been aggregated, with clear indications of the default execution logic for certain configurations, thereby reducing the complexity during form filling.

Improved Display of Canary Shifting

Quick Route Addition for Services

When adding a service to a gateway group with the "Enforce Service Publishing" button disabled, the "Add First Route" switch can be seen. After enabling this switch, you can fill in the route configuration.

Optimized upstream connection configuration

After filling in the configuration, clicking "Add" will create a service and its first route within the service simultaneously, simplifying the process of deploying test routes in the test environment.

Support for Importing Gateway Groups and Generating Services via OpenAPI

In gateway groups with the forced publishing process disabled, it is now possible to add services directly by importing OpenAPI specifications.

Import OpenAPI to Add Service

Service Configuration of Importing API

Summary

API7 Enterprise v3.2.14 has implemented several optimizations to address the need for flexibility and scalability in a modern microservices architecture.

The introduction of route priority ensures smooth traffic transitions during service migration. The upstream configuration has been improved with optimized canary shifting displays and simplified configuration forms, making upstream changes more convenient. Additionally, new features for quickly adding routes and importing services via OpenAPI have simplified the service configuration process, enhancing operational efficiency.