I'm using Kong OSS (not container or k8s deployed) trying to load balance a backend two backend services for testing. My challenge is one requires authentication and different backend path port, whereas the other does not.
Frontend 1 - Kong API Gateway frontend
- Host: localhost
- Port: 8000
- Authentication: none
- Root Path: /
- Example Request: POST http://localhost:8000/ {JSON Data}
I'm expecting this front-end to have following backend
Backend A - local API service for testing
- Host: localhost
- Port: 80
- Authentication: none
- Root Path: /
- Example Request: POST http://localhost:80/ {JSON Data}
Backend B - hosted SaaS API service
- Host: s1.example.com
- Port: 443
- Authentication: API Key
- Root Path: /v7/guid/
- Example Request: POST https://s1.example.com/v7/guid/ {JSON Data}
Following the documentation, it seems I need to create 1 service to 2 upstream/targets, but not sure how to handle different upstream root paths?
Can the upstream config dynamically change the backend path based on selected upstream/target? Or maybe instead create a single route that load-balances between two services?
I'm trying to create 1 route with 1 service that has 2 upstream targets with different root paths and request-transformers for specific upstream targets