Hi,
I am using tyk oss gateway for all our gRPC services. I have configure gRPC passthrough proxy (gRPC Proxy)
The API configuration is as follows:
{
"name": "<api_name>",
"api_id": "<api_id>",
"org_id": "<org_id>",
"proxy": {
"listen_path": "/",
"target_url": "h2c://<k8s_service_endpoint>:9090",
"strip_listen_path": false
},
"use_keyless": false,
"version_data": {
"not_versioned": true,
"default_version": "",
"versions": {
"Default": {
"name": "Default"
}
}
},
"active": true,
"definition": {
"location": "header",
"key": "version"
},
"auth": {
"auth_header_name": "authorization"
}
}
As seen we are proxying the request to k8s service endpoint.
I am having issues in load balacing the requests. On doing some perf tests, we are observing that the requests when going through tyk is getting distributed only to 2 downstream pods of service even though we have more 3 running relicas. Increasing the service replicas to 4-5 still distributes it to only 2 pods.
I tried bypassing the tyk by directly accessing the k8s service. In this case the load is distributed across all pods.
Even though the target url is h2c://<k8s_service_endpoint>:9090, why isn’t k8s balacing the load? Do we need to enable anything specific on tyk for balancing the load ?