You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: Implement Multi-Proxy and Load Balancer Strategy Support (gatewayd-io#577)
### Commit Title: Implement Multi-Proxy and Load Balancer Strategy Support This commit introduces significant enhancements to the server configuration by supporting multiple proxies and load balancing strategies. #### Key Changes: - **API Tests**: Updated to reflect the change from a single `Proxy` to a list of `Proxies`. - **Initialization and Configuration**: Modified `run.go` to support multiple proxies and load balancer strategies. - **Configuration Files**: Updated to include fields for multiple proxies and load balancer strategies. - **Global Configuration Validation**: Enhanced for clients, pools, and proxies. - **Load Balancer Configuration**: Added a new `loadBalancer` section in `gatewayd.yaml` for rules and strategies. - **Load Balancing Strategies**: Implemented strategy selection and the Round Robin strategy. - **Testing**: Added tests for load balancer strategies and updated existing tests. - **Error Handling**: Introduced a new error type `ErrorCodeLoadBalancerStrategyNotFound`. - **Proxy Connection Handling**: Improved and added informative comments. #### Configuration Example: - **gatewayd.yaml**: Updated to reflect support for multiple proxies and load balancer strategies. Ensure to update your configuration files accordingly. #### Testing: - Updated existing tests and added new tests for multi-proxy and load balancing functionality. - Verified configuration validation for proxies and load balancers. #### Impact: - Improved flexibility and scalability of server configuration. - Enabled robust proxy management and efficient load distribution. ### Additional Changes: - **Nested Map Structure**: Refactored maps to use nested structures for pools, clients, and proxies. - **Variable Names**: Refactored for consistency and clarity across multiple files. - **YAML Tags**: Added to struct fields for `Client`, `Pool`, and `Proxy` types to ensure compatibility with YAML parsers. - **Configuration Block Names**: Changed from kebab-case to camelCase. - **Tracing**: Avoided using the request context for tracing in the `GetPools` method. - **GetServers API**: Enhanced to include load balancer configuration and updated tests. ### Minor Fixes: - Corrected typos and resolved lint warnings. - Added comments and fixed formatting issues in configuration files. ### Sign-offs and Co-authors: - Co-authored-by: Mostafa Moradian <mstfmoradian@gmail.com> - Signed-off-by: sina <sinadarbouy@gmail.com>
0 commit comments